Skip to content

Commit 23c0726

Browse files
committed
ci: try to optimize manual stage checker for gitlab ci
Signed-off-by: Huaqi Fang <[email protected]>
1 parent ea20a3d commit 23c0726

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.gitlab-ci.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,21 @@ cache:
202202
203203
.job_rules:
204204
interruptible: true
205+
# Rules are evaluated when the pipeline is created, and evaluated in order.
206+
# When a match is found, no more rules are checked
205207
rules:
208+
- if: $CI_JOB_STAGE == "manual"
209+
changes:
210+
- conf/**/*
211+
- .github/**/*
212+
- Makefile*
213+
- .gitlab-ci.yml
214+
- buildroot
215+
- opensbi
216+
- freeloader
217+
- linux
218+
- u-boot
219+
when: manual
206220
- changes:
207221
- conf/**/*
208222
- .github/**/*
@@ -252,10 +266,6 @@ cache:
252266
# Manual job template
253267
.build_linux_sdk_manual_template: &build_linux_sdk_manual_job_def
254268
extends: .job_rules
255-
rules:
256-
# manual trigger this deploy job on not merge request pipeline
257-
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
258-
when: manual
259269
artifacts:
260270
name: "bootimages-${SOC}-${CORE}-${BOOT_MODE}-${CI_COMMIT_SHA::8}"
261271
paths:

0 commit comments

Comments
 (0)