Skip to content
Snippets Groups Projects
Commit 2b22c4c7 authored by Malte Bauch's avatar Malte Bauch
Browse files

Merge branch 'revert-a181a3de' into 'develop'

Revert "Merge branch '142-add-rules-to-pipelines' into 'develop'"

See merge request !216
parents a181a3de ea8dba6c
No related branches found
No related tags found
6 merge requests!246Develop,!245Develop into Master,!244Master into develop2 into master,!219Draft: Testing,!216Revert "Merge branch '142-add-rules-to-pipelines' into 'develop'",!138Develop
Pipeline #86770 failed
...@@ -13,19 +13,8 @@ stages: ...@@ -13,19 +13,8 @@ stages:
- deploy - deploy
- .post - .post
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
- if: '$CI_PIPELINE_SOURCE == "push"'
when: always
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: always
include: include:
- local: '/.gitlab/ci/.ruleset.yml'
- local: '/.gitlab/ci/.build-container.yml' - local: '/.gitlab/ci/.build-container.yml'
- local: '/.gitlab/ci/.code-quality-ci.yml' - local: '/.gitlab/ci/.code-quality-ci.yml'
- local: '/.gitlab/ci/.security-and-compliance-ci.yml' - local: '/.gitlab/ci/.security-and-compliance-ci.yml'
......
...@@ -21,16 +21,7 @@ build-testing-image: ...@@ -21,16 +21,7 @@ build-testing-image:
variables: variables:
TAG: develop TAG: develop
BUILDARGS: -race BUILDARGS: -race
- !reference [.push_event, rules] - when: always
- !reference [.merge_request, rules]
before_script:
# replace all slashes in the tag with hyphen, because slashes are not allowed in tags
- TAG=${TAG//\//-}
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" >/kaniko/.docker/config.json
needs: []
build-testing-image:
script: script:
- /kaniko/executor - /kaniko/executor
--cache=true --cache=true
......
...@@ -9,6 +9,5 @@ code-quality: ...@@ -9,6 +9,5 @@ code-quality:
codequality: gl-code-quality-report.json codequality: gl-code-quality-report.json
paths: paths:
- gl-code-quality-report.json - gl-code-quality-report.json
rules:
- !reference [.merge_request, rules]
needs: [] needs: []
\ No newline at end of file
...@@ -43,8 +43,6 @@ variables: ...@@ -43,8 +43,6 @@ variables:
name: ${CLAB_NAME} name: ${CLAB_NAME}
paths: paths:
- ${CLAB_NAME}.clab.yml - ${CLAB_NAME}.clab.yml
rules:
- !reference [.merge_request, rules]
# JOBS # JOBS
containerlab:template:integration: containerlab:template:integration:
...@@ -68,9 +66,6 @@ containerlab:deploy:integration: ...@@ -68,9 +66,6 @@ containerlab:deploy:integration:
artifacts: artifacts:
reports: reports:
dotenv: ${CI_PROJECT_DIR}/build.env dotenv: ${CI_PROJECT_DIR}/build.env
rules:
- !reference [.merge_request, rules]
containerlab:destroy: containerlab:destroy:
...@@ -89,8 +84,6 @@ containerlab:destroy: ...@@ -89,8 +84,6 @@ containerlab:destroy:
- docker volume rm -f ${CLAB_NAME}-volume - docker volume rm -f ${CLAB_NAME}-volume
- docker image rm -f ${GOSDN_IMAGE} - docker image rm -f ${GOSDN_IMAGE}
allow_failure: true allow_failure: true
rules:
- !reference [.containerlab_cleanup, rules]
#containerlab:template:develop: #containerlab:template:develop:
......
...@@ -26,8 +26,6 @@ integration-test:nucleus: ...@@ -26,8 +26,6 @@ integration-test:nucleus:
- go test -race -v -run TestGnmi_GetIntegration - go test -race -v -run TestGnmi_GetIntegration
- go test -race -v -run TestGnmi_SubscribeIntegration - go test -race -v -run TestGnmi_SubscribeIntegration
- go test -race -v -run TestGnmi_CapabilitiesIntegration - go test -race -v -run TestGnmi_CapabilitiesIntegration
rules:
- !reference [.merge_request, rules]
integration-test:api: integration-test:api:
<<: *integration-test <<: *integration-test
...@@ -36,5 +34,3 @@ integration-test:api: ...@@ -36,5 +34,3 @@ integration-test:api:
script: script:
- cd ./api - cd ./api
- go test -race -v -run TestApiIntegration - go test -race -v -run TestApiIntegration
rules:
- !reference [.merge_request, rules]
.push_event:
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
when: on_success
.merge_request:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: on_success
.containerlab_cleanup:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
.merge_request_and_changed_dependency:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- go.mod
- go.sum
when: always
.nightly_pipeline:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: always
.nightly_develop_pipeline:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_NIGHTLY == "develop"'
when: always
.nightly_main_pipeline:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_NIGHTLY == "mainline"'
when: always
...@@ -16,24 +16,23 @@ include: ...@@ -16,24 +16,23 @@ include:
- template: Security/SAST.gitlab-ci.yml - template: Security/SAST.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml - template: Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml - template: Security/License-Scanning.gitlab-ci.yml
# - template: Security/Secret-Detection.gitlab-ci.yml # - template: Security/Secret-Detection.gitlab-ci.yml
- template: Security/Container-Scanning.gitlab-ci.yml - template: Security/Container-Scanning.gitlab-ci.yml
license_scanning:
rules:
- !reference [.merge_request_and_changed_dependency, rules]
gemnasium-dependency_scanning: gemnasium-dependency_scanning:
rules: <<: *rules
- !reference [.merge_request_and_changed_dependency, rules]
gosec-sast: gosec-sast:
rules: <<: *rules
- !reference [.nightly_pipeline, rules]
license_scanning:
<<: *rules
semgrep-sast: semgrep-sast:
rules: <<: *rules
- !reference [.nightly_pipeline, rules]
#secret_detection:
# <<: *rules
container_scanning: container_scanning:
stage: analyze stage: analyze
...@@ -45,5 +44,5 @@ container_scanning: ...@@ -45,5 +44,5 @@ container_scanning:
DOCKER_IMAGE: "${GOSDN_IMAGE}" DOCKER_IMAGE: "${GOSDN_IMAGE}"
DOCKER_USER: "${CI_REGISTRY_USER}" DOCKER_USER: "${CI_REGISTRY_USER}"
DOCKER_PASSWORD: "${CI_REGISTRY_PASSWORD}" DOCKER_PASSWORD: "${CI_REGISTRY_PASSWORD}"
needs: needs:
- build-image - build-image
...@@ -21,16 +21,11 @@ unit-test: ...@@ -21,16 +21,11 @@ unit-test:
after_script: after_script:
- go tool cover -func=coverage.out - go tool cover -func=coverage.out
<<: *test <<: *test
rules:
- !reference [.push_event, rules]
- !reference [.merge_request, rules]
controller-test: controller-test:
script: script:
- gotestsum --junitfile report.xml --format testname -- -race -v -run TestRun - gotestsum --junitfile report.xml --format testname -- -race -v -run TestRun
<<: *test <<: *test
rules:
- !reference [.merge_request, rules]
test-build: test-build:
artifacts: artifacts:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment