I have a pipeline, I want to optimize it. Is it possible to use this type of links in CI? When using anchor links, I always get a syntax error
jobs:describe_version:rules:rule if invalid expression syntax
I can’t figure out the syntax, is this option supported or not?
.default_rules:
rules:
# master branch engaged
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: always
# version tag engaged
- if: '$CI_COMMIT_TAG =~ /^(v[0-9]+.[0-9]+.[0-9]+)(.[0-9]+)?$/'
when: always
# triggered manually from web
- if: '$CI_PIPELINE_SOURCE =~ /^web/'
when: always
.default_condition: &default_condition
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG =~ /^(v[0-9]+.[0-9]+.[0-9]+)(.[0-9]+)?$/ || $CI_PIPELINE_SOURCE =~ /^web/'
.job_rules:
default:
- if: *default_condition
prego:
- if: '(*default_condition) && $PREGO_BUILD =~ /true/i'
checkouts:
- if: '(*default_condition) && $CHECKOUTS_GROUP =~ /^./'
pubdocs:
- if: '(*default_condition) && ($PUBLIC_DOCS_GROUP =~ /^./ || $PUBLIC_DOCS_LINKS =~ /^./)'
redmine:
- if: '$REDMINE_FETCH_REPO =~ /^./'
describe_version:
stage: describe
image: bitnami/git:latest
rules:
- !reference [.job_rules, default]
What am I doing wrong?