-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
83 lines (79 loc) · 2.26 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
stages:
- build
- deploy
frontend:
image: node:12.18-alpine3.12
stage: build
script:
# git is required for yarn to be able to checkout the shared components
- apk add --no-cache git
- sh ./build/setup_headers.sh
- yarn install
- yarn lint
- yarn test
- yarn build
cache:
key: ${CI_COMMIT_REF_SLUG}-node
paths:
- frontend/node_modules/
artifacts:
paths:
- build/bundle.js
reports:
junit: junit.xml
tags:
- gnm
- docker
only:
- master
- merge_requests
validationtool:
image: golang:1.15-alpine
stage: build
script:
- cd menuvalidator
- go build
artifacts:
paths:
- menuvalidator/menu-validator
tags:
- gnm
- docker
only:
- master
- merge_requests
deploy:
image: docker:19.03.11
stage: deploy
services:
- docker:19.03.11-dind
before_script:
- docker login -u ${DOCKER_USER} -p "${DOCKER_PAT}"
script:
- cd build
- cp ../menuvalidator/menu-validator .
- docker build . -t "guardianmultimedia/pluto-start:$CI_PIPELINE_IID"
- docker push "guardianmultimedia/pluto-start:$CI_PIPELINE_IID"
- "echo ci_commit_branch: \\\"${CI_COMMIT_BRANCH}\\\" >> build-info.yaml"
- "echo ci_commit_ref_name: ${CI_COMMIT_REF_NAME} >> build-info.yaml"
- "echo ci_commit_sha: ${CI_COMMIT_SHA} >> build-info.yaml"
- "echo ci_commit_timestamp: ${CI_COMMIT_TIMESTAMP} >> build-info.yaml"
- "echo ci_commit_title: \\\"${CI_COMMIT_TITLE}\\\" >> build-info.yaml"
- "echo ci_job_url: ${CI_JOB_URL} >> build-info.yaml"
- "echo ci_project_name: ${CI_PROJECT_NAME} >> build-info.yaml"
- "echo ci_merge_request_project_url: \\\"${CI_MERGE_REQUEST_PROJECT_URL}\\\" >> build-info.yaml"
- "echo ci_merge_request_title: \\\"${CI_MERGE_REQUEST_TITLE}\\\" >> build-info.yaml"
- "echo ci_pipeline_iid: ${CI_PIPELINE_IID} >> build-info.yaml"
- "echo built_image: guardianmultimedia/pluto-start:$CI_PIPELINE_IID >> build-info.yaml"
- cd ../keysync
- docker build . -t "guardianmultimedia/pluto-start-keysync:$CI_PIPELINE_IID"
- docker push "guardianmultimedia/pluto-start-keysync:$CI_PIPELINE_IID"
artifacts:
paths:
- build/build-info.yaml
tags:
- gnm
- docker
only:
- master
- merge_requests