Skip to content
Snippets Groups Projects
Commit 699da7f1 authored by Felix Ohms's avatar Felix Ohms
Browse files

Add rules for integration tests

parent bb945c3c
No related branches found
No related tags found
1 merge request!207Add rules to pipelines
Pipeline #85144 failed
This commit is part of merge request !207. Comments created here will be created in the context of that merge request.
...@@ -4,6 +4,15 @@ variables: ...@@ -4,6 +4,15 @@ variables:
CLAB_DIR: "/mnt" CLAB_DIR: "/mnt"
CLAB_NAME: "clab${CI_PIPELINE_IID}" 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 # Templates for Job Types
.containerlab_deploy: &containerlab_deploy .containerlab_deploy: &containerlab_deploy
stage: apply stage: apply
...@@ -65,6 +74,9 @@ containerlab:deploy:integration: ...@@ -65,6 +74,9 @@ containerlab:deploy:integration:
artifacts: artifacts:
reports: reports:
dotenv: ${CI_PROJECT_DIR}/build.env dotenv: ${CI_PROJECT_DIR}/build.env
rules:
- !reference [.integration_test_conditions, rules]
containerlab:destroy: containerlab:destroy:
...@@ -79,7 +91,8 @@ containerlab:destroy: ...@@ -79,7 +91,8 @@ containerlab:destroy:
- docker volume rm -f ${CLAB_NAME}-volume - docker volume rm -f ${CLAB_NAME}-volume
- docker image rm -f ${GOSDN_CONTAINER_IMAGE} - docker image rm -f ${GOSDN_CONTAINER_IMAGE}
allow_failure: true allow_failure: true
when: always rules:
- !reference [.integration_test_conditions, rules]
#containerlab:template:develop: #containerlab:template:develop:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment