I have a Jenkins pipeline like:
node("slave1"){
echo "Building very very complicated things"
}
If the node "slave1" does not exist in my Jenkins setup, the build is stuck
forever.
I know I could use timeout keyword and wrap the node command. However, this
is not good since timeout can happen because of inexistent node or
long-taking build. That's not really a solution.
Any calls that I can do to check if a node exists or not?
I understand I can use timeout and wrap something like this :
node("slave1"){echo
"Hello"} . That way I can test if node exists. However, this actually makes
a connection to the node (in my case, spawns a container in
OpenShift/Kubernetes and wastes it immediately)
I use Jenkins 2.32.2 and pipeline plugin version 2.1.
--
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/CABoO8LeRUxvBypta8jcSVkD5WONxsKO8xwvRLaznN2rUamckeg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.