-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
56 lines (50 loc) · 1.03 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Use controls group runners unless overrriden in jobs
default:
tags:
- controls
stages:
- test
- build-app
- integration-build
- deploy
.node_test:
stage: test
before_script:
- npm ci
script:
- npm test -- --coverage
- npm run lint
- npx tsc
node 16:
extends: .node_test
image: node:16
build-app:
stage: build-app
image: node:16
script:
- npm ci
# Environment variables are captured at build time.
- export REACT_APP_CONIQL_SOCKET=coniql.diamond.ac.uk:443
- export REACT_APP_CONIQL_SSL=true
- export REACT_APP_VERSION=$CI_UPSTREAM_TAG
- export REACT_APP_BUILD_TIME=$(date --iso=minutes)
- npm run build
artifacts:
paths:
- build/
integration-build:
stage: integration-build
only:
- integration
trigger:
project: controls/kubernetes/cs-web-proto
branch: integration
deploy:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
trigger:
project: controls/kubernetes/cs-web-proto
branch: master
variables:
CI_UPSTREAM_TAG: $CI_COMMIT_TAG