我正在尝试根据以下标准构建 ci:
标签可能会在不改变其他文件的情况下发生变化并且不需要运行程序集,我试过这个
if: $CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG =~ /^$/
但如果文件和标签都发生了变化,则不起作用。
我很乐意提供帮助
我的 .gitlab-ci.yml
image: busybox:latest
build1:
stage: build
rules:
- if: $CI_COMMIT_MESSAGE =~ /\[run ci\]/
- if: $CI_COMMIT_BRANCH == "master"
- when: manual
allow_failure: false
script:
- echo "Do your build here"
test1:
stage: test
rules:
- if: $CI_COMMIT_MESSAGE =~ /\[run ci\]/
- if: $CI_COMMIT_BRANCH == "master"
- allow_failure: false
script:
- echo "Do a test here"
- echo "For example run a test suite"
deploy:
stage: deploy
rules:
- if: $CI_COMMIT_MESSAGE =~ /\[run ci\]/
- if: $CI_COMMIT_BRANCH == "master"
- allow_failure: false
script:
- echo "Do a test here"
- echo "For example run a test suite"