Skip to content

Commit 83b932b

Browse files
committed
NEXT-21750 - Add downstream stage and move security into unit stage
1 parent dd70edb commit 83b932b

11 files changed

+66
-64
lines changed

.gitlab-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ stages:
77
- E2E
88
# quarantined tests
99
- quarantine
10-
# search for vulnerabilities in code and dependencies
11-
- security
10+
# downstream pipelines trigger by this pipeline
11+
- downstream
1212
# build artifacts used in deploy
1313
- build
1414
# deploy artifacts build in the `build` stage

.gitlab/lib/rules.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
|| $CI_MERGE_REQUEST_LABELS =~ /.*unit::skip.*/ && $CI_JOB_STAGE == "unit"
66
|| $CI_MERGE_REQUEST_LABELS =~ /.*E2E::skip.*/ && $CI_JOB_STAGE == "E2E"
77
|| $CI_MERGE_REQUEST_LABELS =~ /.*quarantine::skip.*/ && $CI_JOB_STAGE == "quarantine"
8-
|| $CI_MERGE_REQUEST_LABELS =~ /.*security::skip.*/ && $CI_JOB_STAGE == "security"
8+
|| $CI_MERGE_REQUEST_LABELS =~ /.*downstream::skip.*/ && $CI_JOB_STAGE == "downstream"
99
|| $CI_MERGE_REQUEST_LABELS =~ /.*build::skip.*/ && $CI_JOB_STAGE == "build"
1010
|| $CI_MERGE_REQUEST_LABELS =~ /.*deploy::skip.*/ && $CI_JOB_STAGE == "deploy"
1111
|| $CI_MERGE_REQUEST_LABELS =~ /.*visual::skip.*/ && $CI_JOB_STAGE == "visual"
@@ -17,7 +17,7 @@
1717
|| $CI_MERGE_REQUEST_LABELS =~ /.*unit::all.*/ && $CI_JOB_STAGE == "unit"
1818
|| $CI_MERGE_REQUEST_LABELS =~ /.*E2E::all.*/ && $CI_JOB_STAGE == "E2E"
1919
|| $CI_MERGE_REQUEST_LABELS =~ /.*quarantine::all.*/ && $CI_JOB_STAGE == "quarantine"
20-
|| $CI_MERGE_REQUEST_LABELS =~ /.*security::all.*/ && $CI_JOB_STAGE == "security"
20+
|| $CI_MERGE_REQUEST_LABELS =~ /.*downstream::all.*/ && $CI_JOB_STAGE == "downstream"
2121
|| $CI_MERGE_REQUEST_LABELS =~ /.*build::all.*/ && $CI_JOB_STAGE == "build"
2222
|| $CI_MERGE_REQUEST_LABELS =~ /.*deploy::all.*/ && $CI_JOB_STAGE == "deploy"
2323
|| $CI_MERGE_REQUEST_LABELS =~ /.*visual::all.*/ && $CI_JOB_STAGE == "visual"'
@@ -28,7 +28,7 @@
2828
|| $CI_MERGE_REQUEST_LABELS =~ /.*unit::all.*/ && $CI_JOB_STAGE == "unit"
2929
|| $CI_MERGE_REQUEST_LABELS =~ /.*E2E::all.*/ && $CI_JOB_STAGE == "E2E"
3030
|| $CI_MERGE_REQUEST_LABELS =~ /.*quarantine::all.*/ && $CI_JOB_STAGE == "quarantine"
31-
|| $CI_MERGE_REQUEST_LABELS =~ /.*security::all.*/ && $CI_JOB_STAGE == "security"
31+
|| $CI_MERGE_REQUEST_LABELS =~ /.*downstream::all.*/ && $CI_JOB_STAGE == "downstream"
3232
|| $CI_MERGE_REQUEST_LABELS =~ /.*build::all.*/ && $CI_JOB_STAGE == "build"
3333
|| $CI_MERGE_REQUEST_LABELS =~ /.*deploy::all.*/ && $CI_JOB_STAGE == "deploy"
3434
|| $CI_MERGE_REQUEST_LABELS =~ /.*visual::all.*/ && $CI_JOB_STAGE == "visual")'

.gitlab/stages/01-lint.yml .gitlab/stages/10-lint.yml

-58
Original file line numberDiff line numberDiff line change
@@ -193,61 +193,3 @@ NPM CI:
193193
- "12-alpine"
194194
- "14-alpine"
195195
- "16-alpine"
196-
197-
rufus:
198-
stage: lint
199-
variables:
200-
RUFUS_BRANCH: trunk
201-
PLATFORM_BRANCH: '${CI_COMMIT_BRANCH}${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}'
202-
rules:
203-
- !reference [ .rules, skip ]
204-
# target branch is release branch -> rufus should have the same branch
205-
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^6\.\d+\.\d+\.\d+/
206-
variables:
207-
RUFUS_BRANCH: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
208-
# release branch -> rufus should also be a release branch
209-
- if: $CI_COMMIT_BRANCH =~ /^6\.\d+\.\d+\.\d+/
210-
variables:
211-
RUFUS_BRANCH: $CI_COMMIT_BRANCH
212-
- !reference [ .rules, run ]
213-
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
214-
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
215-
- when: manual
216-
allow_failure: true
217-
inherit:
218-
variables:
219-
- PLATFORM_BRANCH
220-
- RUFUS_BRANCH
221-
trigger:
222-
project: shopware/6/product/rufus
223-
branch: $RUFUS_BRANCH
224-
strategy: depend
225-
226-
commercial:
227-
stage: lint
228-
variables:
229-
COMMERCIAL_BRANCH: trunk
230-
PLATFORM_BRANCH: '${CI_COMMIT_BRANCH}${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}'
231-
rules:
232-
- !reference [ .rules, skip ]
233-
# target branch is release branch -> commercial should have the same branch
234-
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^6\.\d+\.\d+\.\d+/
235-
variables:
236-
COMMERCIAL_BRANCH: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
237-
# release branch -> commercial should also be a release branch
238-
- if: $CI_COMMIT_BRANCH =~ /^6\.\d+\.\d+\.\d+/
239-
variables:
240-
COMMERCIAL_BRANCH: $CI_COMMIT_BRANCH
241-
- !reference [ .rules, run ]
242-
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
243-
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
244-
- when: manual
245-
allow_failure: true
246-
inherit:
247-
variables:
248-
- PLATFORM_BRANCH
249-
- COMMERCIAL_BRANCH
250-
trigger:
251-
project: shopware/6/product/commercial
252-
branch: $COMMERCIAL_BRANCH
253-
strategy: depend
File renamed without changes.

.gitlab/stages/04-security.yml .gitlab/stages/21-security.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Symfony security check:
44
extends: .long-running
5-
stage: security
5+
stage: unit
66
needs: []
77
image: shopware/development:7.4-composer-2
88
before_script: []
File renamed without changes.
File renamed without changes.

.gitlab/stages/40-downstream.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
rufus:
3+
stage: downstream
4+
needs: []
5+
variables:
6+
RUFUS_BRANCH: trunk
7+
PLATFORM_BRANCH: '${CI_COMMIT_BRANCH}${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}'
8+
rules:
9+
- !reference [ .rules, skip ]
10+
# target branch is release branch -> rufus should have the same branch
11+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^6\.\d+\.\d+\.\d+/
12+
variables:
13+
RUFUS_BRANCH: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
14+
# release branch -> rufus should also be a release branch
15+
- if: $CI_COMMIT_BRANCH =~ /^6\.\d+\.\d+\.\d+/
16+
variables:
17+
RUFUS_BRANCH: $CI_COMMIT_BRANCH
18+
- !reference [ .rules, run ]
19+
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
20+
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
21+
- when: manual
22+
allow_failure: true
23+
inherit:
24+
variables:
25+
- PLATFORM_BRANCH
26+
- RUFUS_BRANCH
27+
trigger:
28+
project: shopware/6/product/rufus
29+
branch: $RUFUS_BRANCH
30+
strategy: depend
31+
32+
commercial:
33+
stage: downstream
34+
needs: []
35+
variables:
36+
COMMERCIAL_BRANCH: trunk
37+
PLATFORM_BRANCH: '${CI_COMMIT_BRANCH}${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}'
38+
rules:
39+
- !reference [ .rules, skip ]
40+
# target branch is release branch -> commercial should have the same branch
41+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^6\.\d+\.\d+\.\d+/
42+
variables:
43+
COMMERCIAL_BRANCH: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
44+
# release branch -> commercial should also be a release branch
45+
- if: $CI_COMMIT_BRANCH =~ /^6\.\d+\.\d+\.\d+/
46+
variables:
47+
COMMERCIAL_BRANCH: $CI_COMMIT_BRANCH
48+
- !reference [ .rules, run ]
49+
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
50+
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
51+
- when: manual
52+
allow_failure: true
53+
inherit:
54+
variables:
55+
- PLATFORM_BRANCH
56+
- COMMERCIAL_BRANCH
57+
trigger:
58+
project: shopware/6/product/commercial
59+
branch: $COMMERCIAL_BRANCH
60+
strategy: depend
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)