Compare commits

..

No commits in common. "preserve_cache" and "main" have entirely different histories.

View File

@ -22,10 +22,6 @@ spec:
description: Includes credentials for the docker image registry.
optional: true
mountPath: /home/user/.docker
- name: buildkit-cache
description: For preserving buildkit type=cache mounts between builds.
optional: true
mountPath: /home/user/.local/share/buildkit
params:
- name: OUTPUT
type: string
@ -61,23 +57,13 @@ spec:
description: Full URL to the docker image.
type: array
volumes:
- name: buildkitd
emptyDir: {}
- name: buildkitd-toml
emptyDir: {}
- name: metadata-out
emptyDir: {}
steps:
- name: setup-cache-ownership
image: $(params.BUILDER_IMAGE)
workingDir: "$(workspaces.source.path)"
script: |
#!/usr/bin/env sh
set -euo pipefail
chown 1000:1000 /home/user/.local/share/buildkit
chmod 0777 /home/user/.local/share/buildkit
securityContext:
runAsNonRoot: false
runAsUser: 0
runAsGroup: 0
- name: write-config
image: $(params.BUILDER_IMAGE)
workingDir: "$(workspaces.source.path)"
@ -101,6 +87,8 @@ spec:
EOF
chmod +x /home/user/.config/buildkit/entrypoint.sh
volumeMounts:
- name: buildkitd
mountPath: /home/user/.local/share/buildkit
- name: buildkitd-toml
mountPath: /home/user/.config/buildkit
securityContext:
@ -124,6 +112,8 @@ spec:
- /home/user/.metadata/build.json
- $(params.EXTRA_ARGS)
volumeMounts:
- name: buildkitd
mountPath: /home/user/.local/share/buildkit
- name: buildkitd-toml
mountPath: /home/user/.config/buildkit
readOnly: true