From c6fbd0cba4caae94ca7b90012aaf1d3657a5e3ad Mon Sep 17 00:00:00 2001 From: Sushanta Das Date: Mon, 10 Jun 2024 19:38:27 +0530 Subject: [PATCH] enable hermetic --- .tekton/pull-request.yaml | 1 + hack/build-and-push.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.tekton/pull-request.yaml b/.tekton/pull-request.yaml index bc8d5c4e8c..1feb1d8b5f 100644 --- a/.tekton/pull-request.yaml +++ b/.tekton/pull-request.yaml @@ -156,6 +156,7 @@ spec: SKIP_BUILD=1 \ INSTALL_BUNDLE_NS=$(params.e2e_test_namespace) \ ENABLE_SOURCE_BUILD=1 \ + ENABLE_HERMETIC_BUILD=1 \ hack/build-and-push.sh eval "source bundle_values.env" echo -n $CUSTOM_DOCKER_BUILD_PIPELINE_BUNDLE | tee $(results.custom-docker-build-bundle.path) diff --git a/hack/build-and-push.sh b/hack/build-and-push.sh index 5703435ef3..0f1a6a4d29 100755 --- a/hack/build-and-push.sh +++ b/hack/build-and-push.sh @@ -154,6 +154,13 @@ if [ -n "$ENABLE_SOURCE_BUILD" ]; then done fi +# Enable hermetic in the pipelines, used in build-definitions pull request CI only +if [ -n "$ENABLE_HERMETIC_BUILD" ]; then + for pipeline_yaml in "$generated_pipelines_dir"/*.yaml; do + yq e '(.spec.params[] | select(.name == "hermetic") | .default) = "true"' -i "$pipeline_yaml" + done +fi + # Build Pipeline bundle with pipelines pointing to newly built task bundles for pipeline_yaml in "$generated_pipelines_dir"/*.yaml "$core_services_pipelines_dir"/*.yaml do