Re: Indicate changes since last build

2018-09-06 Thread Wouter Slob
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 > 
> 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 jenkinsci-use...@googlegroups.com .
>> 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_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 jenkinsci-users+unsubscr...@googlegroups.com.
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.


Indicate changes since last build

2018-09-06 Thread Wouter Slob
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/eec2945c-025c-488a-8d29-22a4862dbd96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Configure Node/Job Priority

2018-08-16 Thread Wouter Slob
Hi,

I'm working with pipeline jobs where we use different kind of nodes.
The nodes have only one executor each.
I'm trying to find a way to give priority to certain jobs, in such a way 
that they are executed once a node is available, even though another job 
already requested to use the node.

To illustrate my case consider a *Low Prio Job*, with a pipeline like:
def steps = [:]

steps['s1'] = {
stage("LP1") {
node("X") {
println "Low Prio Job, Step 1"
sleep 30
}
}
}
steps['s2'] = {
stage("LP2") {
node("X") {
println "Low Prio Job, Step 2"
sleep 30
}
}
}
parallel steps


And a *High Prio Job*, with a pipeline like:
def steps = [:]
steps['s1'] = {
stage("HP1") {
node("X") {
println "High Prio Job, Step 1"
sleep 30
}
}
}
steps['s2'] = {
stage("HP2") {
node("X") {
println "High Prio Job, Step 2"
sleep 30
}
}
}
parallel steps

I start the *Low Prio Job* first and the *High Prio Job* a couple of 
seconds later.

What happens is that both stages of the Low Prio Job are executed and then 
the two stages of the High Prio Job.
So in time over both jobs the output is:
Low Prio Job, Step 1
Low Prio Job, Step 2
High Prio Job, Step 1
High Prio Job, Step 2

I would like to be able to change this behavior such that the High Prio Job 
gets to use the node as soon as it is available, making the output in time 
look like:
Low Prio Job, Step 1
High Prio Job, Step 1
High Prio Job, Step 2
Low Prio Job, Step 2

I've tried to use the Priority Sorter Plugin 
, but it 
looks like this plugin only impacts the initial start of a build, not 
during the build.

Does anybody have any suggestions on how to solve this challenge?
Any other plugins I could look into? Or any extension point that could be 
used to do this?

Thnx!

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ac5029b1-ca63-4d89-a486-7411a8566054%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.