-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
61 lines (53 loc) · 1.52 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
stages:
- fetch
- build
- export-ci
- export-prod
variables:
DOCKER_TLS_CERTDIR: "/certs"
services:
- docker:19.03.9-dind
before_script:
- |
echo "Environment:"
echo "======================================================================"
echo "CI_PIPELINE_SOURCE=\"$CI_PIPELINE_SOURCE\""
echo "CI_REPOSITORY_URL=\"$CI_REPOSITORY_URL\""
echo "CI_COMMIT_SHA=\"$CI_COMMIT_SHA\""
echo "IMAGE=\"$IMAGE\""
echo "MACHINE=\"$MACHINE\""
echo "MANIFEST=\"$MANIFEST\""
echo "REGISTRY=\"$REGISTRY\""
echo "REGISTRY_USER=\"$REGISTRY_USER\""
echo "REGISTRY_PASSWORD=\"$REGISTRY_PASSWORD\""
echo "REGISTRY_PATH=\"$REGISTRY_PATH\""
echo "======================================================================"
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_COMMIT_BRANCH'
.prod:
rules:
- if: '$CI_COMMIT_BRANCH != "main"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
when: manual
- if: '$FORCE == "yes"'
when: manual
- when: never
.manual:
allow_failure: true
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
when: manual
- if: '$FORCE == "yes"'
when: manual
- when: never
include:
- local: '/.gitlab-ci/jobs/fetch.yml'
- local: '/.gitlab-ci/jobs/build.yml'
- local: '/.gitlab-ci/jobs/export-ci.yml'
- local: '/.gitlab-ci/jobs/export-prod.yml'