Skip to content
Snippets Groups Projects

Add rules to pipelines

Merged Felix Ohms requested to merge 142-add-rules-to-pipelines into develop
1 file
+ 14
1
Compare changes
  • Side-by-side
  • Inline
@@ -4,6 +4,15 @@ variables:
CLAB_DIR: "/mnt"
CLAB_NAME: "clab${CI_PIPELINE_IID}"
.integration_test_conditions:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"'
when: always
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
when: always
# Templates for Job Types
.containerlab_deploy: &containerlab_deploy
stage: apply
@@ -65,6 +74,9 @@ containerlab:deploy:integration:
artifacts:
reports:
dotenv: ${CI_PROJECT_DIR}/build.env
rules:
- !reference [.integration_test_conditions, rules]
containerlab:destroy:
@@ -79,7 +91,8 @@ containerlab:destroy:
- docker volume rm -f ${CLAB_NAME}-volume
- docker image rm -f ${GOSDN_CONTAINER_IMAGE}
allow_failure: true
when: always
rules:
- !reference [.integration_test_conditions, rules]
#containerlab:template:develop:
Loading