Hi
Can you try checking it’s online or not and then try again.
Ex: Jenkins.instance.getNode('my-node').toComputer().isOnline()
I am not sure. Just a suggestion.
On Wed, 17 Aug 2022 at 11:07 PM, Rita Morgan <[email protected]> wrote:
> Using a Jenkinsfile, I have 2 agents (master, nodeA).
>
> I prefer my job to run on nodeA. If its not available (its a ec2
> instance), i want it to run on master.
>
> Is there a way to declare this in a pipeline? I know there is a feature to
> prefer an agent or explicity set it as a label but I really want the logic
> to be in a pipeline.
>
> --
> 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/ec7bccba-4698-4ce3-9c07-4cb19100d156n%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/ec7bccba-4698-4ce3-9c07-4cb19100d156n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Thanks & Regards
Yamuna Devi
--
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/CAJTe5V1AaE18geh%3DrVCtj_6pe_z7gskDDS0sN3-CL4bNCzN2ug%40mail.gmail.com.