Using "label1 || label2" in a pipeline, with the labels targeting cloud labels, is kicking off multiple agents of that cloud until one is able to have an executor.
I have tested this with two different cloud plugins (EC2 and Anka Build) and repeated the same steps for version 2.319.1 to make sure this is a Core issue and not a plugin issue.
- Install fresh Jenkins 2.319.2
- Install EC2 Plugin 1.66
- Set up two different labels in the EC2 Cloud
- Validate both of them can run properly (security groups, roles, keys, whatever is needed for your AWS)
- Create a basic pipeline job with this code:
- replace "label1" and "label2" with the two labels you set up in the cloud
You can replace the sleep with whatever you want.
You can do the same with the anka-build plugin.
spinning up instances of only label1 non-stop. I aborted the job after 6 since these cost money. Screenshot attached.
Multiplle VMs are spinning up until the first one connects.
a single instance from each label is spun up.
: A single VM is spun up.
++EC2 console before running the job, after running the job on 2.319.2 and after running it again on 2.319.1.