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 option to disable the use of host network #209

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Conversation

j-dunham
Copy link
Contributor

@j-dunham j-dunham commented Jul 18, 2023

What's changing?

Adds a new CLI flag --no-host-network to prevent the use of the host network while running the docker commands. If the flag is not present then the docker run command is generate as it was before with the --network=host. When the new flag is present the --network=host will not be added.

Relates to #172

How's this tested?

specs and 👀

Closes github/valet/issues/6619

@github-actions
Copy link

github-actions bot commented Jul 18, 2023

Unit Test Results

41 tests  ±0   41 ✔️ ±0   0s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ±0 

Results for commit ecf894c. ± Comparison against base commit befb118.

♻️ This comment has been updated with latest results.

@j-dunham j-dunham changed the title Add flag to disable use of host network Add option to disable the use of host network Jul 18, 2023
@j-dunham j-dunham marked this pull request as ready for review July 18, 2023 16:04
@j-dunham j-dunham requested a review from a team as a code owner July 18, 2023 16:04
Copy link
Contributor

@Chaseshak Chaseshak left a comment

Choose a reason for hiding this comment

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

Command works for me and shows up in the help menu!

➜  gh-actions-importer git:(no-host-network) dotnet run --project src/ActionsImporter/ActionsImporter.csproj -- dry-run bamboo build -p PAN-NOD -o tmp/bamboo
[2023-07-18 16:10:36] Logs: 'tmp/bamboo/log/valet-20230718-161036.log'
[2023-07-18 16:10:38] Output file(s):
[2023-07-18 16:10:38]   tmp/bamboo/build/panda/nodeplan/.github/workflows/nodeplan.yml
➜  gh-actions-importer git:(no-host-network) ✗ dotnet run --project src/ActionsImporter/ActionsImporter.csproj -- dry-run bamboo build -p PAN-NOD -o tmp/bamboo --no-host-network
[2023-07-18 16:10:50] Logs: 'tmp/bamboo/log/valet-20230718-161050.log'
[2023-07-18 16:10:51] Output file(s):
[2023-07-18 16:10:51]   tmp/bamboo/build/panda/nodeplan/.github/workflows/nodeplan.yml
➜  gh-actions-importer git:(no-host-network) ✗ dotnet run --project src/ActionsImporter/ActionsImporter.csproj -- dry-run bamboo build --help

src/ActionsImporter/Commands/Common.cs Outdated Show resolved Hide resolved
Co-authored-by: Ethan Dennis <ethanis@github.com>
@j-dunham j-dunham merged commit 93163ee into main Jul 18, 2023
5 checks passed
@j-dunham j-dunham deleted the no-host-network branch July 18, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants