簡體   English   中英

為什么我的忽略命令在我的 Gitlab 管道 yaml 文件中被忽略了?

[英]Why is my ignore command being ignored in my Gitlab pipeline yaml file?

將我的代碼提交到其 Gitlab 存儲庫會觸發管道(應該如此)。 但是,我有一條指令告訴它不要運行驗證作業,除非提交消息包含短語“trigger ci”。

但是,即使該短語不在提交消息中,它也會運行該作業。 我哪里錯了?

include:
  - '/gitlab-ci/includes.yml'
  - '/idt-test-stub/gitlab-ci.yml'

variables:
  ALPINE_VERSION: "3.16"
  NODE_VERSION: "14-alpine"
  ESLINT_CONFIG_PATH: "./.eslintrc.js"
  SOURCE_DIR: "."
  RULESET: MAVEN_CI
  BUILD_TYPE: MAVEN
  MVN_CLI_OPTS: "--batch-mode"
  MVN_OPTS: "-Dmaven.repo.local=.m2-local -f wiremock-java/pom.xml"
  MAVEN_IMAGE: "maven:3-jdk-11"

stages:
  - test
  - code-quality
  - code-test
  - code-analysis
  - verify
  - transform
  - application-build
  - image-build
  - move-container-tests
  - container-image-test
  - image-push

.branches: &branches
  only:
    - branches

todo-check:
  <<: *branches

shell-check:
  <<: *branches

docker-lint:
  <<: *branches

unit-test:
  <<: *branches
  artifacts:
    expire_in: 20 mins
    paths:
      - ./coverage

verify:
  only:
    variables:
      - $CI_COMMIT_MESSAGE =- /trigger ci/   
  <<: *branches
  stage: verify
  image: node:$NODE_VERSION
  script:
    - npm install
    - ./run-verify.sh
  tags:
    - docker-in-docker-privileged

檢查正則表達式模式的正確語法=~而不是=-

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM