Variable within another variable in .gitlab-ci.yml

,

Is it possible to nest a variable within another variable in .gitlab-ci.yml? I would like to configure my CD/CD pipeline to run a job on any commit in a branch with the name feature-sf-SOMENUMBER where “SOMENUMBER” is a number as follows:
stages:
- test

test-feature:
    stage: test
    only:
        variables:
            - $CI_COMMIT_BRANCH == 'feature-sf-${*}'
    script:
        - echo "Some test"

Is this possible, and if so, how?

1 Like

I don’t think this is possible yet, but there’s an epic up for improving CI variables.