-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
116 lines (110 loc) · 2.9 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
116 lines (110 loc) · 2.9 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# yaml-language-server: $schema=https://gitlab.com/gitlab-org/gitlab-foss/-/raw/master/app/assets/javascripts/editor/schema/ci.json
default:
cache: []
retry:
max: 2
when:
- data_integrity_failure
- job_execution_timeout
- runner_configuration_error
- runner_external_dependency_failure
- runner_interrupted
- runner_system_failure
- scheduler_failure
- stale_schedule
- stuck_or_timeout_failure
- unknown_failure
variables: &common_variables
ARTIFACT_COMPRESSION_LEVEL: "slowest"
CACHE_COMPRESSION_LEVEL: "slowest"
FF_USE_FASTZIP: "1"
PHOENIX_CI: 1
PHOENIX_CI_TYPE: "gitlab"
PHOENIX_DEV_BRANCH: "dev"
PHOENIX_FEDORA_VERSION: "44"
PHOENIX_PROD_BRANCH: "pages"
TRANSFER_METER_FREQUENCY: "2s"
stages:
- lint
- wiki
- build
- release
# Fast, lightweight gate: shellcheck + shfmt over the shell scripts.
# Runs first so a lint failure stops the pipeline before the multi-hour builds.
# Uses a minimal image and is NOT namespace-gated, so it also runs for forks / contributor pipelines.
lint:
image: fedora:$PHOENIX_FEDORA_VERSION
stage: lint
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH
variables:
<<: *common_variables
before_script:
- set -euo pipefail
- /bin/sudo /bin/dnf update -y --refresh
- /bin/sudo /bin/dnf install -y bash curl shasum tar
- /bin/bash scripts/get_sources.sh shellcheck
- /bin/bash scripts/get_sources.sh shfmt
script:
- set -euo pipefail
- /bin/bash scripts/lint.sh
wiki:
image: fedora:$PHOENIX_FEDORA_VERSION
stage: wiki
tags:
- saas-linux-2xlarge-amd64
variables:
<<: *common_variables
script:
- set -euo pipefail
- /bin/bash scripts/ci-update-wiki.sh
rules:
- if: $CI_COMMIT_BRANCH == $PHOENIX_DEV_BRANCH
build:
image: fedora:$PHOENIX_FEDORA_VERSION
stage: build
tags:
- saas-linux-2xlarge-amd64
variables:
<<: *common_variables
script:
- set -euo pipefail
- /bin/bash scripts/ci-build.sh
artifacts:
untracked: false
when: always
access: all
expire_in: "30 days"
paths:
- $CI_PROJECT_DIR/artifacts/logs/**/*
rules:
- if: $CI_PROJECT_NAMESPACE != 'celenityy'
when: never
- changes:
- scripts/**/*
- .gitlab-ci.yml
- if: $CI_COMMIT_TAG
when: never
release:
image: fedora:$PHOENIX_FEDORA_VERSION
stage: release
interruptible: true
needs:
- job: "build"
optional: false
rules:
- if: $CI_PROJECT_NAMESPACE != 'celenityy'
when: never
- if: $CI_COMMIT_TAG
when: never
- if: $CI_COMMIT_BRANCH == $PHOENIX_PROD_BRANCH && $CI_COMMIT_MESSAGE =~ /\[skip-release\]/
when: never
- if: $CI_COMMIT_BRANCH == $PHOENIX_PROD_BRANCH
tags:
- saas-linux-2xlarge-amd64
variables:
<<: *common_variables
script:
- set -euo pipefail
- /bin/bash scripts/ci-publish-release.sh