Skip to content

Commit 77c2b5c

Browse files
authored
Init CI (DataDog#2)
* Init CI * Use node image * switch to yarn
1 parent 1a3aa3f commit 77c2b5c

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.gitlab-ci.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
variables:
2+
APP: "browser-agent"
3+
CURRENT_CI_IMAGE: 2
4+
BUILD_STABLE_REGISTRY: "486234852809.dkr.ecr.us-east-1.amazonaws.com"
5+
CI_IMAGE: "$BUILD_STABLE_REGISTRY/ci/$APP:$CURRENT_CI_IMAGE"
6+
7+
stages:
8+
- ci-image
9+
- test
10+
11+
ci-image:
12+
stage: ci-image
13+
when: manual
14+
except: [tags, schedules]
15+
tags: ["runner:docker", "size:large"]
16+
image: $BUILD_STABLE_REGISTRY/docker:18.03.1
17+
script:
18+
- docker build --tag $CI_IMAGE .
19+
- docker push $CI_IMAGE
20+
21+
format:
22+
stage: test
23+
tags: ["runner:main", "size:large"]
24+
image: $CI_IMAGE
25+
script:
26+
- yarn
27+
- yarn format
28+
29+
lint:
30+
stage: test
31+
tags: ["runner:main", "size:large"]
32+
image: $CI_IMAGE
33+
script:
34+
- yarn
35+
- yarn lint
36+
37+
build:
38+
stage: test
39+
tags: ["runner:main", "size:large"]
40+
image: $CI_IMAGE
41+
script:
42+
- yarn
43+
- yarn build

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM node:11.6.0-slim

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"build": "webpack --config webpack.config.js --mode=production",
77
"dev": "webpack-dev-server --mode=development",
8-
"format": "prettier --check \"**/*.{ts,js,json,md}\" \"!dist/**\"",
8+
"format": "prettier --check \"**/*.{ts,js,json,md,yml}\" \"!dist/**\"",
99
"lint": "tslint -c ./tslint.json -p ./tsconfig.json"
1010
},
1111
"devDependencies": {

0 commit comments

Comments
 (0)