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

[gen-dockerfile] Make /code directory creation idempotent #1956

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

tclasen
Copy link
Contributor

@tclasen tclasen commented Apr 3, 2024

Summary

Resolves:

How was it tested?

  • Note: I don't recommend applying the patch below used to test this PR. Building an actual Dockerfile is way more of an integration test and I feel it is out of scope.
diff --git a/testscripts/generate/dockerfile.test.txt b/testscripts/generate/dockerfile.test.txt
index d63680b3..ec561564 100644
--- a/testscripts/generate/dockerfile.test.txt
+++ b/testscripts/generate/dockerfile.test.txt
@@ -1,3 +1,5 @@
 exec devbox init
 exec devbox generate dockerfile
 exists Dockerfile
+exec devbox add docker
+exec devbox run -- docker build .

Followed by:

$ go test ./testscripts -run TestScripts/dockerfile

which results in a successfully built dockerfile.

@mohsenari mohsenari self-requested a review April 3, 2024 18:22
@mohsenari
Copy link
Collaborator

Thanks for this.

@mohsenari mohsenari merged commit 53c8fff into jetify-com:main Apr 3, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants