Predefined variables are empty during workflow rules
Workflow:rules in the CI YAML appears to be unable to access $CI_PROJECT_DIR, $CI_RUNNER_DESCRIPTION, $CI_RUNNER_ID or $CI_RUNNER_SHORT_TOKEN
This example always sets variable1 to failure.
variables:
DESCRIPTION: $CI_RUNNER_DESCRIPTION
workflow:
rules:
- if: $CI_RUNNER_DESCRIPTION == $DESCRIPTION
variables:
VARIABLE1: "SUCCESS"
- if: $CI_RUNNER_DESCRIPTION == $UNSET_VARIABLE
variables:
VARIABLE1: "FAILURE"
- when: always
Edited by Peter Duffin