Unable to skip Jenkins Build by SCM Skip Plugin

Viewed 1003

I am working on a pipeline script in Jenkins to build the project based on a commit message. From Jenkins' forum, I noticed that we can use SCM skip plugin. I installed the plugin and added the below stage as the forum suggests:

scmSkip(deleteBuild: true, skipPattern:'.*\\[ci skip\\].*')

When I commit a change with the following commit message:

git commit -m "[ci skip] Updated Audit Test Data Files with scan status"

The build is not skipped. It progresses with the other stages.

In console logs, I see the message

SCM Skip: Changelog is empty!

How do I construct the scmSkip call to skip the build when a commit message including "[ci skip]" is found? Are there alternatives that are easier to implement?

Thanks, Karthik P.

1 Answers

It's probably because you didn't checkout first the repository

Related