Skip to content
Snippets Groups Projects
Verified Commit 9540fdef authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

[CI] Allow each stage of pipeline to be launched manually

The pipeline will automatically build the image whenever some files are changed.

But for some tasks, you may want to enable certain stages manually.
This is what this commit does.
parent 13037ffa
No related branches found
No related tags found
No related merge requests found
Pipeline #54476 failed
......@@ -56,14 +56,18 @@ set-variables:
script:
- chmod +x ./get-modified-image.sh
- ./get-modified-image.sh
# If the Dockerfile is changed, force the build.
# Otherwise, may be triggered manually.
rules:
- changes:
- **/Dockerfile
- **/docker-compose.yml
when: always
- when: manual
only:
changes:
- "**/Dockerfile"
- "**/docker-compose.yml"
refs:
- master
- dev-ci
- dev-sympa
# Build the image that was modified
build:
......@@ -78,9 +82,14 @@ build:
- docker push $MODIFIED_IMAGE_FULL_TEST
after_script:
- docker logout $REGISTRY
# If the Dockerfile is changed, force the build.
# Otherwise, may be triggered manually.
rules:
- changes:
- **/Dockerfile
when: always
- when: manual
only:
changes:
- "**/Dockerfile"
refs:
- master
- dev-ci
......@@ -101,11 +110,14 @@ clair:
paths:
- clair-report.json
- clair.log
only:
changes:
rules:
- changes:
- "**/Dockerfile"
- "**/docker-compose.yml"
- "**/clair-whitelist.yml"
when: always
- when: manual
only:
refs:
- master
- dev-ci
......@@ -133,10 +145,13 @@ docker-bench-security:
- report.txt
after_script:
- docker logout $REGISTRY
only:
changes:
rules:
- changes:
- "**/Dockerfile"
- "**/docker-compose.yml"
when: always
- when: manual
only:
refs:
- master
- dev-ci
......@@ -155,9 +170,6 @@ push-prod:
after_script:
- docker logout $REGISTRY_PROD
only:
changes:
- "**/Dockerfile"
- "**/docker-compose.yml"
refs:
- master
- dev-ci
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment