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

fix(KFLUXBUGS-1328): pull secrets in rpm-ostree #1054

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions task/rpm-ostree/0.1/rpm-ostree.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ spec:
ssh $SSH_ARGS "$SSH_HOST" mkdir -p "$BUILD_DIR/workspaces" "$BUILD_DIR/scripts" "$BUILD_DIR/tmp"

rsync -ra $(workspaces.source.path)/ "$SSH_HOST:$BUILD_DIR/workspaces/source/"
rsync -ra "$HOME/.docker/" "$SSH_HOST:$BUILD_DIR/.docker/"
cat >scripts/script-build.sh <<'REMOTESSHEOF'
#!/bin/sh
set -o verbose
Expand Down Expand Up @@ -173,6 +174,7 @@ spec:
-e COMMIT_SHA="$COMMIT_SHA" \
--rm \
-v "$BUILD_DIR/workspaces/source:$(workspaces.source.path):Z" \
-v "$BUILD_DIR/.docker/:/root/.docker:Z" \
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused by this one, is it really necessary? It seems to expose the pull secret to the container itself, but I don't think we need that here FWIW.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh good catch, this is a different use case than the buildah-remote task. This one wants to use the credentials to pull the BUILDER_IMAGE itself, and there's no need to pass the credentials to that image again

I think we need to rsync the docker credentials to the $HOME of the VM user

Copy link
Contributor

Choose a reason for hiding this comment

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

You need to either sync the credentials to the $HOME/.docker dir, or explicitly tell podman which credentials file to use.

-v $BUILD_DIR/scripts:/script:Z \
--user=0 \
--entrypoint bash \
Expand Down