Skip to content

Commit 1b095db

Browse files
first commit
0 parents  commit 1b095db

File tree

531 files changed

+62174
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

531 files changed

+62174
-0
lines changed

.circleci/config.yml

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
version: 2.1
2+
orbs:
3+
codecov: codecov/codecov@1
4+
executors:
5+
node:
6+
docker:
7+
- image: cimg/node:14.5
8+
publisher:
9+
docker:
10+
- image: cimg/openjdk:11.0
11+
helm:
12+
docker:
13+
- image: hypertrace/helm-gcs-packager:0.1.1
14+
commands:
15+
update-submodule:
16+
description: 'Pull Submodules'
17+
steps:
18+
- run:
19+
name: Pull Submodules
20+
command: git submodule update --init
21+
- run:
22+
name: Ensure submodules point to commit from master branch
23+
command: git submodule foreach "git merge-base --is-ancestor HEAD origin/master"
24+
25+
setup_for_building:
26+
description: 'Checks out code and restores node modules'
27+
steps:
28+
- checkout
29+
- update-submodule
30+
- restore_cache:
31+
keys:
32+
- node_modules-3-{{ checksum "package.json" }}-{{ checksum "package-lock.json"}}
33+
setup_for_publishing:
34+
description: 'Checks out code, sets up credentials, docker and attaches workspace'
35+
steps:
36+
- add_ssh_keys:
37+
fingerprints:
38+
- '2c:f1:1d:8b:a2:b4:6a:28:46:1d:5b:7c:b1:92:d4:ba'
39+
- checkout
40+
- update-submodule
41+
- attach_workspace:
42+
at: dist
43+
- setup_remote_docker
44+
jobs:
45+
npm-install-if-needed:
46+
executor: node
47+
steps:
48+
- setup_for_building
49+
- run:
50+
name: Install if cache missing
51+
command: |
52+
if [ ! -d node_modules ] ;
53+
then npm ci ;
54+
else echo "package.json and package-lock.json unchanged. Using cache." ;
55+
fi
56+
- run:
57+
name: Fail if git dirty after install
58+
command: test -z "$(git status --porcelain)"
59+
- save_cache:
60+
paths:
61+
- node_modules
62+
key: node_modules-3-{{ checksum "package.json" }}-{{ checksum "package-lock.json"}}
63+
build:
64+
executor: node
65+
steps:
66+
- setup_for_building
67+
- run: npm run build:ci
68+
- persist_to_workspace:
69+
root: dist
70+
paths:
71+
- hypertrace-ui
72+
lint:
73+
executor: node
74+
steps:
75+
- setup_for_building
76+
- run: npm run lint
77+
- run: npm run prettier:check
78+
test:
79+
executor: node
80+
parallelism: 2
81+
steps:
82+
- setup_for_building
83+
- run: npm run test:ci -- $(circleci tests glob "{projects,src}/**/*.{spec,test}.ts" | circleci tests split --split-by=timings | xargs -n 1 echo --testPathPattern)
84+
- codecov/upload
85+
- store_test_results:
86+
path: test-results/hypertrace-ui
87+
- store_artifacts:
88+
path: test-results/hypertrace-ui
89+
destination: test-results
90+
validate-charts:
91+
executor: helm
92+
steps:
93+
- checkout
94+
- run:
95+
name: Helm Charts Lint and Template Render
96+
command: |
97+
helm lint --strict ./helm/
98+
helm template ./helm/
99+
publish:
100+
executor: publisher
101+
steps:
102+
- setup_for_publishing
103+
- run: ./gradlew :tag -Prelease
104+
- run:
105+
name: Push git tag
106+
command: git push origin $(./gradlew -q :printVersion)
107+
- run: ./gradlew dockerPushImages
108+
package-charts:
109+
executor: helm
110+
steps:
111+
- checkout
112+
- run:
113+
name: Package and Publish Helm Charts
114+
command: |
115+
CHART_VERSION=$(git describe --abbrev=0)
116+
CHART_NAME=$(awk '/^name:/ {print $2}' ./helm/Chart.yaml)
117+
export GOOGLE_APPLICATION_CREDENTIALS=${HOME}/helm-gcs-key.json
118+
echo ${HELM_GCS_CREDENTIALS} > ${GOOGLE_APPLICATION_CREDENTIALS}
119+
helm repo add helm-gcs ${HELM_GCS_REPOSITORY}
120+
helm package --version ${CHART_VERSION} --app-version ${CHART_VERSION} ./helm/
121+
helm gcs push ${CHART_NAME}-${CHART_VERSION}.tgz helm-gcs --public --retry
122+
workflows:
123+
version: 2
124+
build-and-publish:
125+
jobs:
126+
- npm-install-if-needed
127+
- build:
128+
requires:
129+
- npm-install-if-needed
130+
- test:
131+
requires:
132+
- npm-install-if-needed
133+
- lint:
134+
requires:
135+
- npm-install-if-needed
136+
- validate-charts
137+
- publish:
138+
context: hypertrace-publishing
139+
requires:
140+
- build
141+
- test
142+
- lint
143+
- validate-charts
144+
filters:
145+
branches:
146+
only:
147+
- master
148+
- package-charts:
149+
context: hypertrace-publishing
150+
requires:
151+
- publish
152+
filters:
153+
branches:
154+
only:
155+
- master

.codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: auto
6+
threshold: 0.05%
7+
patch:
8+
default:
9+
target: auto
10+
threshold: 0.05%

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Each line is a file pattern followed by one or more owners.
2+
3+
# global
4+
* @hypertrace/ui

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
4+
# Update npm
5+
- package-ecosystem: "npm"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
commit-message:
10+
prefix: "chore:"
11+
include: "scope"
12+
13+
# Update core-ui submodule
14+
- package-ecosystem: "gitsubmodule"
15+
directory: "/"
16+
schedule:
17+
interval: "daily"
18+
commit-message:
19+
prefix: "chore:"
20+
include: "scope"

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
build
8+
9+
# dependencies
10+
/**/node_modules
11+
12+
13+
# IDEs and editors
14+
/.idea
15+
*.iml
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# IDE - VSCode
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
30+
# misc
31+
/.sass-cache
32+
/connect.lock
33+
/coverage
34+
/libpeerconnection.log
35+
npm-debug.log
36+
yarn-error.log
37+
testem.log
38+
/typings
39+
/test-results
40+
/documentation
41+
42+
# System Files
43+
.DS_Store
44+
Thumbs.db
45+
46+
.gradle
47+
48+
# Helm Charts
49+
*.tgz
50+
51+
# Angular
52+
projects/__ngcc_entry_points__.json

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "hypertrace-core-ui"]
2+
path = hypertrace-core-ui
3+
url = [email protected]:hypertrace/hypertrace-core-ui.git

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@hypertrace:registry=https://api.bintray.com/npm/hypertrace/npm

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
helm*
2+
*.kts
3+
*.svg
4+
*.png
5+
*.xml
6+
*.ico
7+
gradle/
8+
gradle*
9+
*.gradle
10+
Dockerfile
11+
.idea
12+
nginx/
13+
.*
14+
browserslist

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 120,
4+
"trailingComma": "none",
5+
"arrowParens": "avoid"
6+
}

0 commit comments

Comments
 (0)