Start ssh agent.
This commit is contained in:
parent
8e4e323389
commit
3411d0cd39
@ -73,6 +73,15 @@ spec:
|
||||
tee /home/user/.config/buildkit/buildkitd.toml <<EOF
|
||||
$(params.BUILDKITD_TOML)
|
||||
EOF
|
||||
cat > /home/user/.config/buildkit/entrypoint.sh <<EOF
|
||||
#!/usr/bin/env sh
|
||||
#
|
||||
set -euo pipefail
|
||||
eval \$(ssh-agent)
|
||||
ssh-add /tekton/creds/.ssh/id_*
|
||||
exec buildctl-daemonless.sh build --ssh default=\$SSH_AUTH_SOCK "\${@}"
|
||||
EOF
|
||||
chmod +x /home/user/.config/buildkit/entrypoint.sh
|
||||
volumeMounts:
|
||||
- name: buildkitd
|
||||
mountPath: /home/user/.local/share/buildkit
|
||||
@ -85,9 +94,8 @@ spec:
|
||||
- name: build-and-push
|
||||
image: $(params.BUILDER_IMAGE)
|
||||
workingDir: "$(workspaces.source.path)"
|
||||
command: ["buildctl-daemonless.sh"]
|
||||
command: ["/home/user/.config/buildkit/entrypoint.sh"]
|
||||
args:
|
||||
- build
|
||||
- --frontend
|
||||
- dockerfile.v0
|
||||
- --local
|
||||
|
Loading…
Reference in New Issue
Block a user