From 614c02caf6964b1825252da84f2bc680b98d9f8d Mon Sep 17 00:00:00 2001 From: Andrew Smithson Date: Thu, 6 Oct 2022 15:05:05 +0100 Subject: [PATCH] Use dockerconfig for buildah bud --- task/buildah/0.5/buildah.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task/buildah/0.5/buildah.yaml b/task/buildah/0.5/buildah.yaml index 1e363eb8..ede37904 100644 --- a/task/buildah/0.5/buildah.yaml +++ b/task/buildah/0.5/buildah.yaml @@ -73,12 +73,12 @@ spec: workingDir: $(workspaces.source.path) script: | [[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)" + [[ "$(workspaces.dockerconfig.bound)" == "true" ]] && export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \ $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \ --tls-verify=$(params.TLSVERIFY) --no-cache \ -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT) [[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0 - [[ "$(workspaces.dockerconfig.bound)" == "true" ]] && export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \ $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \ --digestfile /tmp/image-digest $(params.IMAGE) \