Hi Craig,

thanks for your reply!

It is indeed possible to retrieve changes since the last build by 
iterating currentBuild.changeSets.

But I'm actually looking for a way to visualize any / the changes since the 
last build in a Job View.

I would like to indicate in the job that new changes are available that 
have not been build yet, as a way to visualize that a new build is needed.

Any ideas on that?

Regards,
Wouter


On Thursday, September 6, 2018 at 5:14:55 PM UTC+2, Craig Rodrigues wrote:
>
> If you look at the currentBuild variable ( 
> https://ci.jenkins.io/pipeline-syntax/globals#currentBuild ), it has
> a few things you can use:
> - previousBuild
> - changeSets
>
> You can try playing around with those, and see if you can get the 
> changesets for the current build,
> and the previous build.
>
> currentBuild is of type RunWrapper, and you can see the full documentation 
> for those methods here:
>
>
> https://javadoc.jenkins.io/plugin/workflow-support/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.html
>
> If you get something to work, please post a code snippet.
> --
> Craig
>
> On Thu, Sep 6, 2018 at 6:43 AM Wouter Slob <[email protected] <javascript:>> 
> wrote:
>
>> Hi,
>>
>> I've got several pipeline and for each pipeline I would like to indicate 
>> in the view if the last not failed build was on the latest changes.
>> In other words: I would like to indicate per pipeline if there are 
>> changes not yet build.
>>
>> I've did a lot of searching, but could only find references to the 
>> "Changes Since Last Success Plugin", which does not support pipeline (and 
>> is quite out-dated).
>>
>> Does anybody know of an alternative?
>>
>> Thnx!
>> Wouter
>>
>> -- 
>> 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/eec2945c-025c-488a-8d29-22a4862dbd96%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/eec2945c-025c-488a-8d29-22a4862dbd96%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/2013eec1-e95f-4447-9085-f2190809ffd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to