From 09e76e458c5a7fa91e83c683f8c5ed5e2dd5e896 Mon Sep 17 00:00:00 2001 From: Zoran Regvart Date: Thu, 18 Apr 2024 14:30:15 +0200 Subject: [PATCH] Build linux_amd64 target for PRs on Tekton Reference: EC-540 --- .tekton/cli-main-ci-pull-request.yaml | 4 ++++ Dockerfile.dist | 2 +- quick-build-args.conf | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 quick-build-args.conf diff --git a/.tekton/cli-main-ci-pull-request.yaml b/.tekton/cli-main-ci-pull-request.yaml index cabf8833a..e4d7270ec 100644 --- a/.tekton/cli-main-ci-pull-request.yaml +++ b/.tekton/cli-main-ci-pull-request.yaml @@ -32,6 +32,8 @@ spec: value: '{{revision}}' - name: build-source-image value: 'true' + - name: build-args-file + value: quick-build-args.conf pipelineSpec: finally: - name: show-sbom @@ -222,6 +224,8 @@ spec: value: $(params.image-expires-after) - name: COMMIT_SHA value: $(tasks.clone-repository.results.commit) + - name: BUILD_ARGS_FILE + value: "$(params.build-args-file)" runAfter: - prefetch-dependencies taskRef: diff --git a/Dockerfile.dist b/Dockerfile.dist index b650168b7..6e7faf42b 100644 --- a/Dockerfile.dist +++ b/Dockerfile.dist @@ -88,7 +88,7 @@ COPY --from=download /download/cosign /usr/local/bin/cosign # Copy all the binaries so they're available to extract and download # (Beware if you're testing this locally it will copy everything from # your dist directory, not just the freshly built binaries.) -COPY --from=build /build/dist/ /usr/local/bin/ +COPY --from=build /build/dist/* /usr/local/bin/ # Gzip them because that's what the cli downloader image expects, see # https://github.com/securesign/sigstore-ocp/blob/main/images/Dockerfile-clientserver diff --git a/quick-build-args.conf b/quick-build-args.conf new file mode 100644 index 000000000..0059c46ea --- /dev/null +++ b/quick-build-args.conf @@ -0,0 +1 @@ +BUILD_LIST=linux_amd64