Re: Gracefully ignoring unavailable agents

2021-01-05 Thread 'Mark Raynsford' via Jenkins Users
On 2021-01-04T22:33:55 +0100 ST wrote: > As mentioned by Mark, nodesByLabel will give you control over what agents > are currently available. But you will need a script {} section in an > initialization stage and probably set an env variable that you then check > in the when {} section of the win

Re: Gracefully ignoring unavailable agents

2021-01-04 Thread ST
As mentioned by Mark, nodesByLabel will give you control over what agents are currently available. But you will need a script {} section in an initialization stage and probably set an env variable that you then check in the when {} section of the windows stages. So not purely declarative anymore.

Re: Gracefully ignoring unavailable agents

2021-01-02 Thread Mark Waite
Apologies for the empty message that preceded this one. Fat fingers on an unfamiliar keyboard. I've been using the pipeline step 'nodesByLabel' in scripted pipelines to select label based subsets of agents that are currently available. I'm not sure that the same technique can be used with declar

Re: Gracefully ignoring unavailable agents

2021-01-02 Thread Mark Waite
On Thu, Dec 31, 2020 at 2:27 PM 'Mark Raynsford' via Jenkins Users < jenkinsci-users@googlegroups.com> wrote: > Hello! > > Let's say I'm using a declarative pipeline setup like this: > > ~~ > #!groovy > > pipeline { > > agent none > > stages { > stage('Build') { > parallel { >

Gracefully ignoring unavailable agents

2020-12-31 Thread 'Mark Raynsford' via Jenkins Users
Hello! Let's say I'm using a declarative pipeline setup like this: ~~ #!groovy pipeline { agent none stages { stage('Build') { parallel { stage('Build Linux') { stages { stage('Build:linux:openjdk-11-hotspot') { agent {