Loading .gitlab-ci.yml +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ stages: - release include: - local: .gitlab/ci/rules.gitlab-ci.yml - local: .gitlab/ci/build.gitlab-ci.yml - local: .gitlab/ci/shellcheck.gitlab-ci.yml - local: .gitlab/ci/test.gitlab-ci.yml Loading .gitlab/ci/build.gitlab-ci.yml +2 −0 Original line number Diff line number Diff line build: extends: - .rules:except-docs stage: build image: docker:19.03.5 services: Loading .gitlab/ci/chart.gitlab-ci.yml +12 −4 Original line number Diff line number Diff line variables: SAST_DISABLE_DIND: "true" SCAN_KUBERNETES_MANIFESTS: "true" include: - template: SAST.gitlab-ci.yml Loading @@ -10,6 +9,8 @@ stages: - release .chart-job: extends: - .rules:except-docs image: "$BUILD_IMAGE_NAME" before_script: - cd assets/auto-deploy-app Loading @@ -20,7 +21,17 @@ chart:lint: script: - helm lint . # Redefines kubesec-sast from SAST.gitlab-ci.yml, because using `extends` in a # job inherited from a template resets the inheritance chain. I.e. the job will # only inherit from the jobs specified in `extends` (not from the template) kubesec-sast: extends: - .sast-analyzer - .rules:except-docs image: name: "$SAST_ANALYZER_IMAGE" variables: SAST_ANALYZER_IMAGE: "$SECURE_ANALYZERS_PREFIX/kubesec:$SAST_ANALYZER_IMAGE_TAG" variables: KUBESEC_HELM_CHARTS_PATH: 'assets/auto-deploy-app' KUBESEC_HELM_OPTIONS: '-f assets/auto-deploy-app/values.yaml' Loading @@ -28,9 +39,6 @@ kubesec-sast: - cd assets/auto-deploy-app - helm repo add stable https://charts.helm.sh/stable - helm dependency build . # we are using merge request pipelines, so we need to override the rules rules: - if: $SCAN_KUBERNETES_MANIFESTS == 'true' chart:test: extends: .chart-job Loading .gitlab/ci/release.gitlab-ci.yml +0 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ # See README.md for more information # * If there is a new release it will tag the repository with the new release as the `ops-gitlab-net` # user .semantic-release: image: node:12 stage: release Loading .gitlab/ci/rules.gitlab-ci.yml 0 → 100644 +11 −0 Original line number Diff line number Diff line # Shared rules to be used with `extends`. # # NOTE: Since `rules` is an array, the child job definition cannot # extend the rules further. Specifying rules in the child job would # override the inherited rules entirely. .rules:except-docs: rules: - if: '$CI_COMMIT_MESSAGE =~ /\Adocs:/' when: never - when: on_success Loading
.gitlab-ci.yml +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ stages: - release include: - local: .gitlab/ci/rules.gitlab-ci.yml - local: .gitlab/ci/build.gitlab-ci.yml - local: .gitlab/ci/shellcheck.gitlab-ci.yml - local: .gitlab/ci/test.gitlab-ci.yml Loading
.gitlab/ci/build.gitlab-ci.yml +2 −0 Original line number Diff line number Diff line build: extends: - .rules:except-docs stage: build image: docker:19.03.5 services: Loading
.gitlab/ci/chart.gitlab-ci.yml +12 −4 Original line number Diff line number Diff line variables: SAST_DISABLE_DIND: "true" SCAN_KUBERNETES_MANIFESTS: "true" include: - template: SAST.gitlab-ci.yml Loading @@ -10,6 +9,8 @@ stages: - release .chart-job: extends: - .rules:except-docs image: "$BUILD_IMAGE_NAME" before_script: - cd assets/auto-deploy-app Loading @@ -20,7 +21,17 @@ chart:lint: script: - helm lint . # Redefines kubesec-sast from SAST.gitlab-ci.yml, because using `extends` in a # job inherited from a template resets the inheritance chain. I.e. the job will # only inherit from the jobs specified in `extends` (not from the template) kubesec-sast: extends: - .sast-analyzer - .rules:except-docs image: name: "$SAST_ANALYZER_IMAGE" variables: SAST_ANALYZER_IMAGE: "$SECURE_ANALYZERS_PREFIX/kubesec:$SAST_ANALYZER_IMAGE_TAG" variables: KUBESEC_HELM_CHARTS_PATH: 'assets/auto-deploy-app' KUBESEC_HELM_OPTIONS: '-f assets/auto-deploy-app/values.yaml' Loading @@ -28,9 +39,6 @@ kubesec-sast: - cd assets/auto-deploy-app - helm repo add stable https://charts.helm.sh/stable - helm dependency build . # we are using merge request pipelines, so we need to override the rules rules: - if: $SCAN_KUBERNETES_MANIFESTS == 'true' chart:test: extends: .chart-job Loading
.gitlab/ci/release.gitlab-ci.yml +0 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ # See README.md for more information # * If there is a new release it will tag the repository with the new release as the `ops-gitlab-net` # user .semantic-release: image: node:12 stage: release Loading
.gitlab/ci/rules.gitlab-ci.yml 0 → 100644 +11 −0 Original line number Diff line number Diff line # Shared rules to be used with `extends`. # # NOTE: Since `rules` is an array, the child job definition cannot # extend the rules further. Specifying rules in the child job would # override the inherited rules entirely. .rules:except-docs: rules: - if: '$CI_COMMIT_MESSAGE =~ /\Adocs:/' when: never - when: on_success