Forcing throught comments


Is there some way to force given task to run via parsing commit comments?


Could you perhaps elaborate your use case a bit more? What are you trying to accomplish and what have you tried so far?


I would like to force given pipeline step by making commit with defined comment. Say id like to specify inside ‘only’ section a regex or so to define this step should run when commit has keyword ‘FORCE’. Id checked documentation and could not find any filtering based on comment.


Any solution for this? The only thing i see now is writing my custom shell script to check git push comments, but this would make useless all the only -> changes features of gitlab CI. @dplanella?


Well, we have

COMMIT_MESSAGE=$(git log -1 --pretty=%B)'

if [[ ${COMMIT_MESSAGE} == *\[skip\ test\]* ]]; then

in one of our scripts (to be able to skip long-running test when we have to change stuff at night), so I guess you’ll have to do something similar. But it would be good if gitlab offered it in a prettier way.


Thanks for answer @grove. I had similar script to compare with last green build and then removed it once found only -> changes feature. Basically these two would not live together. Gitlab developers, create one more filter based on commit comment.


It would seem then that this workflow/feature not supported, but perhaps the posted workaround can help. In terms of proposing this for implementation, I’d suggest filing an issue at