Skip to content

Commit

Permalink
Support release "latest" in install tekton release
Browse files Browse the repository at this point in the history
Support installing a released called "latest" in the
install_tekton_release pipeline.

Use two mutually exclusive flavours of the fetch release pipeline
task, one that fetches "latest" and the other one "previous/<version>"
depending on the requested version.

The install task depends on both fetch tasks, which is possible now
that we have task scoped when expressions.

Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
  • Loading branch information
afrittoli authored and tekton-robot committed Aug 5, 2022
1 parent 75f7d7e commit 5dbf210
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion tekton/resources/cd/install-tekton-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ spec:
workspace: resources
- name: fetch-release
runAfter: ['git-clone']
when:
- input: "$(params.version)"
operator: notin
values: ["latest"]
taskRef:
name: gcs-download
bundle: gcr.io/tekton-releases/catalog/upstream/gcs-download:0.1
Expand All @@ -183,8 +187,29 @@ spec:
workspace: resources
- name: credentials
workspace: credentials
- name: fetch-release-latest
runAfter: ['git-clone']
when:
- input: "$(params.version)"
operator: in
values: ["latest"]
taskRef:
name: gcs-download
bundle: gcr.io/tekton-releases/catalog/upstream/gcs-download:0.1
params:
- name: path
value: release
- name: location
value: $(params.releaseBucket)/$(params.version)
- name: typeDir
value: "true"
workspaces:
- name: output
workspace: resources
- name: credentials
workspace: credentials
- name: install-tekton-release
runAfter: ['fetch-release']
runAfter: ['fetch-release', 'fetch-release-latest']
taskRef:
name: install-tekton-release
params:
Expand Down

0 comments on commit 5dbf210

Please sign in to comment.