Skip to content

Commit 2e80597

Browse files
committed
Add build system
1 parent 05cdf2c commit 2e80597

12 files changed

+8448
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/@connectedcars/setup/.babelrc"
3+
}

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mysqldata/
2+
node_modules
3+
build
4+
Dockerfile

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[*]
2+
end_of_line = lf
3+
insert_final_newline = true
4+
trim_trailing_whitespace = true
5+
charset = utf-8
6+
7+
[*.js,*.ts]
8+
indent_style = space
9+
indent_size = 2
10+
11+
[{package.json,*.yml,*.cjson,*.json}]
12+
indent_style = space
13+
indent_size = 2

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/@connectedcars/setup/.eslintrc"
3+
}

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
62+
63+
build
64+
.vscode
65+
mysqldata
66+
cache/

.npmignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/.github/
2+
/.vscode/
3+
/bin/
4+
/bin/**/*.it.*
5+
/bin/**/*.test.*
6+
/build/dist/**/*.it.*
7+
/build/dist/**/*.test.*
8+
/build/dist/tsconfig.tsbuildinfo
9+
/cache/
10+
/coverage/
11+
/mysql-context/
12+
/mysqldata/
13+
/mysqldata-context/
14+
/sample/
15+
/src/
16+
/src/**/*.it.*
17+
/src/**/*.test.*
18+
/.babelrc
19+
/.dockerignore
20+
/.editorconfig
21+
/.eslintignore
22+
/.eslintrc
23+
/.gitignore
24+
/.travis.yml
25+
/benchmark.js
26+
/cloudbuild.yaml
27+
/Dockerfile
28+
/jest.config.js
29+
/jsconfig.json
30+
/tsconfig.json
31+
# Custom
32+
build/dist/src/test/resources/

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ARG NODE_VERSION=stable
2+
3+
FROM gcr.io/connectedcars-staging/node-builder.master:$NODE_VERSION as builder
4+
5+
ARG NPM_TOKEN
6+
ARG COMMIT_SHA=master
7+
8+
WORKDIR /app
9+
10+
USER builder
11+
12+
# Copy application code.
13+
COPY --chown=builder:builder . /app
14+
15+
RUN npm i
16+
17+
RUN npm run build
18+
19+
RUN npm run ci-auto

cloudbuild.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
steps:
2+
- name: 'gcr.io/connectedcars-staging/cloudbuilder-wrapper.master'
3+
args: ['--secret-build-vars=NPM_TOKEN', '--build-timeout=20m', '--skip-push', '--update-url=https://build-api.connectedcars.io/cloudbuilder']
4+
secretEnv:
5+
- 'NPM_TOKEN'
6+
env:
7+
- 'REPO_NAME=$REPO_NAME'
8+
- 'GCP_PROJECT_ID=$PROJECT_ID'
9+
- 'BUILD_ID=$BUILD_ID'
10+
- 'BRANCH_NAME=$BRANCH_NAME'
11+
- 'TAG_NAME=$TAG_NAME'
12+
- 'COMMIT_SHA=$COMMIT_SHA'
13+
secrets:
14+
- kmsKeyName: projects/connectedcars-staging/locations/global/keyRings/cloudbuilder/cryptoKeys/connectedcars-builder
15+
secretEnv:
16+
NPM_TOKEN: CiQAg7wCPRLVNzCKg+NMXRanl3WmpnMKu2t+ufAPuPXLEDgheDISUQBefMgeLbcPimMQUK7wQyKw0A+DYrzXBA2vdBHvs/9EcChdsQXsVeC3DMBgufqUP73TWL6aH3a94zyC1zuo1JzyBL+dsZIEl47l3eYW6nFK3A==
17+
timeout: 3600s

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
...require('./node_modules/@connectedcars/setup/jest.config.js'),
3+
roots: ['<rootDir>/src']
4+
}

0 commit comments

Comments
 (0)