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

Add ability to set network for Docker Custom Build Environment plugin #1340

Merged
merged 3 commits into from
Jun 2, 2023

Conversation

guetta14
Copy link
Contributor

@guetta14 guetta14 commented May 28, 2023

This PR is for adding the ability to configure the network parameter of docker when running inside a container.
When configuring the "build inside docker" section of a job - under advanced options - you have the ability to configure manually the network and change it from "bridge" (the default) to "host"
in the job-dsl-plugin it was not exposed so I added it.
I added a new function "network" in docker context and exposed it in the wrapper.

Picture of the Maven clean install (after I added some tests for the new ability):

image

Picture of the actual use of the plugin after installing it on testing Jenkins:

image

image

https://issues.jenkins.io/browse/JENKINS-70542

-->

Submitter checklist

  • 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

@guetta14 guetta14 requested a review from a team as a code owner May 28, 2023 14:42
@guetta14
Copy link
Contributor Author

Hi @basil, This is a really minor enhancement that would mean a lot to us, can you please review it and give your opinion?

@basil basil changed the title Adding ability to set network as host when running inside docker Adding ability to set network as host when running inside Docker Jun 2, 2023
Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@basil basil changed the title Adding ability to set network as host when running inside Docker Add ability to set network for Docker Custom Build Environment plugin Jun 2, 2023
@basil basil merged commit 94956e2 into jenkinsci:master Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants