how can i use a regex in a if then statement in a gitlab-ci pipline? i need to set a Variable if the branchname begins with feature/..... or develop/......
i have tryed:
before_script:
- >
if [[${CI_COMMIT_BRANCH} =~ feature\/.*]]; then
echo "Feature Branch Found !"
else
echo "Production Branch Found !"
fi;
i have try the Regex with https://regex101.com/ regex101 say the regex matcht!
but its dont work, what is my mistake?