-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
54 lines (51 loc) · 1.79 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
stages:
- buildntest
- docker
buildntest:
image: node:12.18-alpine3.12
stage: buildntest
script:
- apk add git --no-cache
- sh ./ci-scripts/setup_headers.sh
- yarn install
- yarn test
- yarn compile
cache:
key: ${CI_COMMIT_REF_SLUG}-node
paths:
- node_modules/
artifacts:
paths:
- build/bundle.js
reports:
junit: junit.xml
validatemeta:
image: python:3.8-alpine
stage: buildntest
script:
- cd vs-metadata
- for x in `ls metadata/`; do python validate.py "metadata/$x"; if [ "$?" != "0" ]; then echo Test failed.; exit 1; fi; done
docker:
image: docker:19.03.11
stage: docker
services:
- docker:19.03.11-dind
script:
- cd build
- docker login -u "${DOCKER_USER}" -p "${DOCKER_PAT}"
- docker build . -t guardianmultimedia/pluto-mediabrowser:$CI_PIPELINE_IID
- docker push guardianmultimedia/pluto-mediabrowser:$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-mediabrowser:$CI_PIPELINE_IID >> build-info.yaml"
artifacts:
paths:
- build/build-info.yaml