Skip to content

Commit

Permalink
Add support for No DB release
Browse files Browse the repository at this point in the history
This add support for release_base.yaml which doesn't include db.
  • Loading branch information
khrm authored and tekton-robot committed Feb 7, 2024
1 parent cee8ef3 commit 5619404
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion release/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 12 additions & 0 deletions release/localdb/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Empty file added release/release.yaml
Empty file.
2 changes: 2 additions & 0 deletions tekton/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5619404

Please sign in to comment.