diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85103f02b178be4de586b4bdb237812fc42baa96..5b4b6eaebcc248328659b56f591161df4440d2eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,10 @@ variables: CEOS_IMAGE: "${CI_PCONTAINERS_REGISTRY_IMAGE}/ceos:4.28.0F" GOLANG_VERSION: "1.18" +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == 'push' + stages: - build - test diff --git a/.gitlab/ci/.build-container.yml b/.gitlab/ci/.build-container.yml index d4122a62259caca73b7a2cd97b496963c2007d1a..b29f906ea3e1cb7c11e5467d0aabba79a5d30404 100644 --- a/.gitlab/ci/.build-container.yml +++ b/.gitlab/ci/.build-container.yml @@ -27,8 +27,6 @@ build-testing-image: build-image: rules: - - if: '$CI_PIPELINE_SOURCE != "merge_request_event"' - when: never - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH variables: TAG: $CI_DEFAULT_BRANCH diff --git a/.gitlab/ci/.integration-test-containerlab.yml b/.gitlab/ci/.integration-test-containerlab.yml index 8498e1bbf33ac199c1109d2819971a7cab6f354e..169ef22172a969a02aa322899ae54dc35d4f1d89 100644 --- a/.gitlab/ci/.integration-test-containerlab.yml +++ b/.gitlab/ci/.integration-test-containerlab.yml @@ -5,10 +5,6 @@ variables: containerlab-deploy: stage: integration-test - rules: - - if: '$CI_PIPELINE_SOURCE != "merge_request_event"' - when: never - - when: on_success tags: - shell-containerlab needs: ["build-image", "build-testing-image"] @@ -43,10 +39,6 @@ containerlab-deploy: containerlab-destroy: - rules: - - if: '$CI_PIPELINE_SOURCE != "merge_request_event"' - when: never - - when: always stage: integration-test tags: - shell-containerlab diff --git a/.gitlab/ci/.integration-test.yml b/.gitlab/ci/.integration-test.yml index 2f6ee1b73eb43fbfef02a8259ece988b7536f2a0..ae7525b17076bc3f2080663be4d7bdef667c209d 100644 --- a/.gitlab/ci/.integration-test.yml +++ b/.gitlab/ci/.integration-test.yml @@ -1,10 +1,6 @@ .integration-test: &integration-test image: $GOSDN_TESTING_IMAGE stage: integration-test - rules: - - if: '$CI_PIPELINE_SOURCE != "merge_request_event"' - when: never - - when: on_success needs: ["containerlab-deploy"] variables: diff --git a/.gitlab/ci/.security-and-compliance-ci.yml b/.gitlab/ci/.security-and-compliance-ci.yml index 97b3cf69aa2c1294dd8fcb2774c41d47f180d24b..adede9dbd64860a95b64dc4157344b9f1abb6352 100644 --- a/.gitlab/ci/.security-and-compliance-ci.yml +++ b/.gitlab/ci/.security-and-compliance-ci.yml @@ -1,9 +1,5 @@ .rules: &rules stage: analyze - rules: - - if: '$CI_PIPELINE_SOURCE != "merge_request_event"' - when: never - - when: always needs: [] sast: @@ -36,10 +32,6 @@ semgrep-sast: container_scanning: stage: analyze - rules: - - if: '$CI_PIPELINE_SOURCE != "merge_request_event"' - when: never - - when: always variables: DOCKER_IMAGE: "${GOSDN_IMAGE}" DOCKER_USER: "${CI_REGISTRY_USER}"