-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
74 lines (59 loc) · 1.76 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
stages:
- docker # create images that are needed by the rest of the build
- build # create any outputs of the project (binaries, containers, charts…)
- test # all quality checks
- deploy # export the outputs (publish to an artifact registry, deploy on a server…)
include:
- remote: https://gitlab.com/opensavvy/ci-templates/-/raw/main/version.gitlab-ci.yml
- remote: https://gitlab.com/opensavvy/ci-templates/-/raw/main/mirror.gitlab-ci.yml
- local: docs/website/.gitlab-ci.yml
variables:
# https://gitlab.com/opensavvy/automation/containers
ci_containers: 0.5.0
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_PIPELINE_SOURCE == 'schedule'
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
hello-world:
image: alpine:latest
script:
- echo 'Hello world'
interruptible: true
# region Automatically mirror the previous layer of the playground
mirror-playground:
stage: deploy
extends: [ .os.mirror ]
needs: [ ]
variables:
url: "$playground_parent"
name: "$playground_parent_name"
key: "$playground_mirroring_key"
key_public: "$playground_mirroring_key_public"
rules:
- if: $playground_parent == null || $playground_parent_name == null
when: never
- if: $playground_mirroring_key == null || $playground_mirroring_key_public == null
when: never
- if: $CI_PIPELINE_SOURCE == 'schedule'
- when: manual
allow_failure: true
# endregion
# region GitLab Pages
pages:
image: alpine:latest
stage: deploy
needs:
- job: mkdocs
artifacts: true
script:
- mkdir -p public
- mv docs-website public/docs
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_TAG
interruptible: false
# endregion