Thanks a lot 

On Thursday, February 14, 2019 at 11:33:17 PM UTC+2, Tom Duerr wrote:
>
> Hi,
> We use a when clause to run the stage or not based on finding
> a specific string in the commit message
>
> stage('Publish') {
>     // if we dont find SKIP_PUBLISH in git log
>     // then we proceed with push
>     // note, we're checking the status of the grep command
>     // not the output. grep status will be 0 if we find the
>     // string and 1 if we dont find
>     when {
>         branch 'master'
>         expression {
>             grepStatus = sh(returnStatus: true,
>                     script: 'git log -1 | grep  SKIP_PUBLISH')
>             return 1 == grepStatus
>         }
>
>     }
>
>
> On Thu, Feb 14, 2019 at 2:29 AM Eldad Cohen <[email protected] 
> <javascript:>> wrote:
>
>> Thanks on the tip
>>>
>>> Can you please elaborate how did you exit ?
>>  
>>
>> -- 
>> 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/55df0cca-759d-41f5-abc6-6c16370c1f63%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/55df0cca-759d-41f5-abc6-6c16370c1f63%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/8c339be4-c779-4d94-a039-7b2486c34c3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to