I want to run pipeline always for a specific branch and for other branches pipeline should only run if the commit message contains a specific string in it.
stages: - running_test tests_execution: stage: running_test image: image:X.X.X script: - echo $CI_COMMIT_MESSAGE only: refs: - testing except: variables: - $CI_COMMIT_MESSAGE =~ /pipeline/
In the above example I am trying to execute pipeline for testing branch always and for other branches If the commit message contains
/pipeline/ in it only then pipeline will be executed.
It is not working correctly, can anyone tell me what I am doing wrong?