Thus far I have tried:
* success ("...") -- build stops with "failed" status
* sh "exit 0" -- build doesn't stop (continues to the next stage in the
pipeline)
I think "exit 0" is the way to go, but didn't yet figure out exactly how...
On Saturday, March 25, 2017 at 1:01:15 PM UTC+3, Stephen Connolly wrote:
>
> Skipping polling from the git plugin is not an option for branch sources
>
> The branch source tracks last revision built for each branch and fires a
> build of the current revision is not equal to the last.
>
> What you want is a build step that stops the build with an "ignore" status
> of some sort.
>
> On Sat 25 Mar 2017 at 09:52, Idan Adar <[email protected] <javascript:>>
> wrote:
>
>> As Mark mentioned, the alternative is to trigger an exception... (which
>> will in turn show the row in red color).
>> I do it as follows. After checking out, if a git commit includes "[ci
>> skip]" I use a "success" keyword (this keyword does not exit) hence the
>> build stops.
>>
>> I would love for this keyword to exist, so that the job will stop with a
>> green row instead of a red row... Is this possible?
>>
>> stage ("Checkout SCM") {
>> steps {
>> script {
>> STAGE_NAME = "Checkout SCM"
>>
>> checkout scm
>> result = sh (script: "git log -1 | grep '.*\\[ci skip\\].*'",
>> returnStatus: true)
>> if (result == 0) {
>> echo ("'ci skip' spotted in git commit. Aborting.")
>> success ("'ci skip' spotted in git commit. Aborting.")
>> }
>> }
>> }
>> }
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/cd25bb36-d893-4281-a04e-d5a6bb54f6b8%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jenkinsci-users/cd25bb36-d893-4281-a04e-d5a6bb54f6b8%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Sent from my phone
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/720a5799-1150-462a-afe8-55d3e01636ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.