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

Created method that would allow to programmatically add new slave templates to an EC2Cloud #850

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

drullar
Copy link
Contributor

@drullar drullar commented Apr 25, 2023

PR Description:

  • Added a method which would access the templates SlaveTemplate list and add a new one if a template with the same description doesn't already exist.

  • Added Unit test to verify that the new SlaveTemplate has been added successfully

Use Case:

We have a few packer jobs that create new slave template agents on demand, the issue with the current state of the ec2-plugin (prior to the changes) is that whenever we run a packer job someone will have to go and manually add the new SlaveTemplete to the EC2Cloud.
I found out that there was a partial solution in this PR #154, but it assumes that there is a SlaveTemplate to modify, where in our case we need to add new templates.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Local Test Result:
image

Tests run: 165, Failures: 0, Errors: 0, Skipped: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  09:03 min
[INFO] Finished at: 2023-04-25T13:50:39+03:00
[INFO] ------------------------------------------------------------------------

Possible Relevant Jira Issue
https://issues.jenkins.io/browse/JENKINS-71002

@res0nance res0nance added the enhancement Feature additions or enhancements label Sep 2, 2023
@res0nance res0nance merged commit 4f0663d into jenkinsci:master Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature additions or enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants