32 lines
811 B
YAML
32 lines
811 B
YAML
---
|
|||
|
|
# Tests that workflow.rules and job.rules accept the nested-array (AND-group)
|
||
|
|
# form where each outer entry can itself be a sequence of rule conditions.
|
||
|
|
workflow:
|
||
|
|
name: "${PIPELINE_NAME}"
|
||
|
|
auto_cancel:
|
||
|
|
on_new_commit: interruptible
|
||
|
|
rules:
|
||
|
|
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
|
||
|
|
variables:
|
||
|
|
PIPELINE_NAME: "main"
|
||
|
|
- - if: "$CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH =~ /^feat\\///"
|
||
|
|
variables:
|
||
|
|
PIPELINE_NAME: "feature"
|
||
|
|
- - if: "$CI_COMMIT_TAG"
|
||
|
|
- if: "$DEPLOY"
|
||
|
|
variables:
|
||
|
|
PIPELINE_NAME: "deploy"
|
||
|
|
|
||
|
|
variables:
|
||
|
|
DEPLOY: "false"
|
||
|
|
|
||
|
|
build:
|
||
|
|
stage: build
|
||
|
|
script: echo building
|
||
|
|
rules:
|
||
|
|
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
|
||
|
|
- - if: "$CI_PIPELINE_SOURCE == 'push'"
|
||
|
|
allow_failure: true
|
||
|
|
- if: "$DEPLOY"
|
||
|
|
when: manual
|