From 5619404f17c7b67f1f0e3cb64a88dac4ae17625a Mon Sep 17 00:00:00 2001 From: Khurram Baig Date: Thu, 1 Feb 2024 15:46:49 +0530 Subject: [PATCH] Add support for No DB release This add support for release_base.yaml which doesn't include db. --- release/kustomization.yaml | 2 +- release/localdb/kustomization.yaml | 12 ++++++++++++ release/release.sh | 6 ++++-- release/release.yaml | 0 tekton/release.yaml | 2 ++ 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 release/localdb/kustomization.yaml create mode 100644 release/release.yaml diff --git a/release/kustomization.yaml b/release/kustomization.yaml index c6ebd015b..507db2055 100644 --- a/release/kustomization.yaml +++ b/release/kustomization.yaml @@ -4,7 +4,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: tekton-pipelines resources: -- ../config/overlays/default-local-db +- ../config/overlays/base-only labels: - includeSelectors: true pairs: diff --git a/release/localdb/kustomization.yaml b/release/localdb/kustomization.yaml new file mode 100644 index 000000000..cdd174bd6 --- /dev/null +++ b/release/localdb/kustomization.yaml @@ -0,0 +1,12 @@ + # Leave this field as an environment variable - this is templated out during + # the release process to label all resources with the proper version. +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: tekton-pipelines +components: + - ../../config/components/local-db + - ../../config/components/metadata +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/version: devel diff --git a/release/release.sh b/release/release.sh index c1e83262a..741c89198 100755 --- a/release/release.sh +++ b/release/release.sh @@ -11,7 +11,9 @@ export KO_DOCKER_REPO=${KO_DOCKER_REPO:-"ko.local"} RELEASE_DIR="${ROOT}/release" # Apply templated values from environment. sed -i "s/devel$/${RELEASE_VERSION}/g" ${RELEASE_DIR}/kustomization.yaml -sed -i "s/devel$/${RELEASE_VERSION}/g" ${ROOT}/config/base/config-info.yaml +sed -i "s/devel$/${RELEASE_VERSION}/g" ${ROOT}/config/base/config-info.yaml # Apply kustomiation + build images + generate yaml -kubectl kustomize ${RELEASE_DIR} | ko resolve --platform "linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x" -P -f - -t ${RELEASE_VERSION} > ${RELEASE_DIR}/release.yaml +kubectl kustomize ${RELEASE_DIR} | ko resolve --platform "linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x" -P -f - -t ${RELEASE_VERSION} > ${RELEASE_DIR}/release_base.yaml +cp ${RELEASE_DIR}/release_base.yaml ${RELEASE_DIR}/release.yaml +kubectl kustomize ${RELEASE_DIR}/localdb >> ${RELEASE_DIR}/release.yaml diff --git a/release/release.yaml b/release/release.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/tekton/release.yaml b/tekton/release.yaml index f407d7ebb..4e20897a2 100644 --- a/tekton/release.yaml +++ b/tekton/release.yaml @@ -106,6 +106,8 @@ spec: script: | gsutil cp $(workspaces.source.path)/release/release.yaml $(params.bucket)/previous/$(params.version)/release.yaml gsutil cp $(workspaces.source.path)/release/release.yaml $(params.bucket)/latest/release.yaml + gsutil cp $(workspaces.source.path)/release/release_base.yaml $(params.bucket)/previous/$(params.version)/release_base.yaml + gsutil cp $(workspaces.source.path)/release/release_base.yaml $(params.bucket)/latest/release_base.yaml params: - name: version value: $(params.version)