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

Pass DefaultMountsFile to podman build #9094

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Jan 25, 2021

The --default-mounts-file path was not being handled in
podman build. This will enable it to use for testing.

Signed-off-by: Daniel J Walsh [email protected]

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2021
@rhatdan
Copy link
Member Author

rhatdan commented Jan 25, 2021

@edsantiago Do you want to throw me a test for this?

@edsantiago
Copy link
Member

@rhatdan that was fast, thank you! #9091 already has the test written, just commented out with FIXMEs. If it passes and merges, you could rebase then enables lines 191-192, 204-205 in 070-build.bats

@edsantiago
Copy link
Member

Followup: I pulled your PR, ran my tests against it (with changes as described in my previous comment): it passes. I confirmed that the test is really running by adding sdfsdf to the is line that checks for the secret, and confirming that it fails, and that the command log shows the true secret. In short: your code works, and my test works. Thanks again.

@edsantiago
Copy link
Member

@rhatdan #9091 is merged. At your convenience feel free to rebase and apply the following diff

diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 9e5e3ee1d..05518d8fc 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -188,8 +188,7 @@ ADD mycmd /bin/mydefaultcmd
 RUN chmod 755 /bin/mydefaultcmd
 RUN chown 2:3 /bin/mydefaultcmd

-#FIXME FIXME FIXME: enable if/when 'podman build' passes mounts.conf to buildah
-#RUN $CAT_SECRET
+RUN $CAT_SECRET

 CMD ["/bin/mydefaultcmd","$s_echo"]
 EOF
@@ -201,8 +200,7 @@ EOF
     local iid="${lines[-1]}"

     # Make sure 'podman build' had the secret mounted
-    #FIXME FIXME: enable if/when 'podman build' passes mounts.conf to buildah
-    #is "$output" ".*$secret_contents.*" "podman build has /run/secrets mounted"
+    is "$output" ".*$secret_contents.*" "podman build has /run/secrets mounted"

     if is_remote; then
         ENVHOST=""

The --default-mounts-file path was not being handled in
podman build.  This will enable it to use for testing.

Signed-off-by: Daniel J Walsh <[email protected]>
@edsantiago
Copy link
Member

Restarted flake, #9026. LGTM. All new tests pass.

/lgtm
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2021
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 26, 2021
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@vrothberg
Copy link
Member

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit 79565d1 into containers:master Jan 26, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants