2 Commits

Author SHA1 Message Date
Tom Alexander
bfa6d169e3 Add the buildkit-cache workspace at a dummy mount point. 2025-02-23 13:06:38 -05:00
Tom Alexander
e2ee912556 Change mount for buildkitd. 2025-02-23 13:05:37 -05:00

View File

@@ -25,7 +25,8 @@ spec:
- name: buildkit-cache - name: buildkit-cache
description: For preserving buildkit type=cache mounts between builds. description: For preserving buildkit type=cache mounts between builds.
optional: true optional: true
mountPath: /home/user/.local/share/buildkit mountPath: /home/user/.local/share/foo
# mountPath: /home/user/.local/share/buildkit
params: params:
- name: OUTPUT - name: OUTPUT
type: string type: string
@@ -61,23 +62,13 @@ spec:
description: Full URL to the docker image. description: Full URL to the docker image.
type: array type: array
volumes: volumes:
- name: buildkitd
emptyDir: {}
- name: buildkitd-toml - name: buildkitd-toml
emptyDir: {} emptyDir: {}
- name: metadata-out - name: metadata-out
emptyDir: {} emptyDir: {}
steps: 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 - name: write-config
image: $(params.BUILDER_IMAGE) image: $(params.BUILDER_IMAGE)
workingDir: "$(workspaces.source.path)" workingDir: "$(workspaces.source.path)"
@@ -101,6 +92,8 @@ spec:
EOF EOF
chmod +x /home/user/.config/buildkit/entrypoint.sh chmod +x /home/user/.config/buildkit/entrypoint.sh
volumeMounts: volumeMounts:
- name: buildkitd
mountPath: /home/user/.local/share/buildkittwo
- name: buildkitd-toml - name: buildkitd-toml
mountPath: /home/user/.config/buildkit mountPath: /home/user/.config/buildkit
securityContext: securityContext:
@@ -124,6 +117,8 @@ spec:
- /home/user/.metadata/build.json - /home/user/.metadata/build.json
- $(params.EXTRA_ARGS) - $(params.EXTRA_ARGS)
volumeMounts: volumeMounts:
- name: buildkitd
mountPath: /home/user/.local/share/buildkittwo
- name: buildkitd-toml - name: buildkitd-toml
mountPath: /home/user/.config/buildkit mountPath: /home/user/.config/buildkit
readOnly: true readOnly: true