Commit 1d26a11c authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Merge branch 'enable-docs-only-branches' into 'master'

ci: skip most jobs on 'docs:' commits

See merge request gitlab-org/cluster-integration/auto-deploy-image!178
parents 437a23b1 6183584e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
build:
  extends:
    - .rules:except-docs
  stage: build
  image: docker:19.03.5
  services:
+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
@@ -10,6 +9,8 @@ stages:
  - release

.chart-job:
  extends:
    - .rules:except-docs
  image: "$BUILD_IMAGE_NAME"
  before_script:
    - cd assets/auto-deploy-app
@@ -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'
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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
+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