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 {
>         stage('Build Linux') {
>           stages {
>             stage('Build:linux:openjdk-11-hotspot') {
>               agent {
>                 label 'linux'
>               }
>               ...
>             }
>             stage('Build:linux:openjdk-15-hotspot') {
>               agent {
>                 label 'linux'
>               }
>               ...
>             }
>           }
>         }
>
>         stage('Build Windows') {
>           stages {
>             stage('Build:windows:openjdk-11-hotspot') {
>               agent {
>                 label 'windows'
>               }
>               ...
>             }
>             stage('Build:windows:openjdk-15-hotspot') {
>               agent {
>                 label 'windows'
>               }
>               ...
>             }
>           }
>         }
>       }
>     }
>   }
> }
> ~~
>
> As you can see, I use labels to select agents to run builds on specific
> operating systems and with a fixed set of specific JDK versions. This
> all works fine. However: With my current hardware setup, the Windows
> node is _not_ going to be online 24/7 (the Linux node is always
> available).
>
> Is there a way I can adapt the above pipeline to basically say "If
> there's a Windows node online, run the stages, otherwise trivially
> succeed"? Right now, if no Windows node is available, the pipeline will
> hang until either one becomes available or the entire job times out.
>
> --
> Mark Raynsford | https://www.io7m.com
>
> --
> 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/20201231212628.447a21b5%40sunflower.int.arc7.info
> .
>

-- 
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/CAO49JtF93ptAXbZzCXtBTFuVhCz2P62TgNPvFu8H8E%3DKfAXB8Q%40mail.gmail.com.

Reply via email to