Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support swarm agent provisioning when label is assigned dynamically #62

Merged

Conversation

hsarbia
Copy link

@hsarbia hsarbia commented Oct 29, 2019

Hi,
In a multi-configuration project, the groovy-label-assignment plugin is used to assign labels dynamically to various job configurations (variants). It allows to provision a different docker agent depending of the variant to build within a same project (docker image is different depending of the variant).

Here are the small changes required to trigger and provision the docker-swarm agent using Docker Swarm Plugin with Groovy Label Assignment.

@Roemer
Copy link
Collaborator

Roemer commented Sep 2, 2020

Is this change fully backwards-compatible? I'm not really deep into Jenkins so I wonder if there are downsides from switching from bi.task.getAssignedLabel() to bi.getAssignedLabel()?

@Roemer
Copy link
Collaborator

Roemer commented Feb 24, 2021

Thank you. The change is merged.

@Roemer Roemer merged commit f22f784 into jenkinsci:master Feb 24, 2021
@Roemer
Copy link
Collaborator

Roemer commented Feb 25, 2021

I had to revert this PR because it caused exceptions (see #108). Can you look at it and test if it works for you?

@hsarbia
Copy link
Author

hsarbia commented Feb 26, 2021

Hi, I will try to test that again at some point and check the impacts mentioned in issue 108.

At the moment I had to use the traditional Docker plugin to meet my needs as the Docker Swarm plugin was not handling dynamic assignment of labels for a same multi-configuration build.

Thanks for your feedback @Roemer and sorry for the non-working PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants