-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ssh_keepalives
- Loading branch information
Showing
5 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# opm-get-bundle-version task | ||
|
||
Fetch the current version of the provided OLM bundle image | ||
|
||
## Parameters | ||
|name|description|default value|required| | ||
|---|---|---|---| | ||
|bundle-image|OLM bundle image to query||true| | ||
|
||
## Results | ||
|name|description| | ||
|---|---| | ||
|bundle-version|olm.package version| | ||
|
||
## Workspaces | ||
|name|description|optional| | ||
|---|---|---| | ||
|workspace|The shared workspace between steps|false| |
38 changes: 38 additions & 0 deletions
38
task/opm-get-bundle-version/0.1/opm-get-bundle-version.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: opm-get-bundle-version | ||
spec: | ||
description: Fetch the current version of the provided OLM bundle image | ||
params: | ||
- name: bundle-image | ||
description: OLM bundle image to query | ||
results: | ||
- name: bundle-version | ||
description: olm.package version | ||
workspaces: | ||
- name: workspace | ||
description: The shared workspace between steps | ||
steps: | ||
- name: opm-render-bundle | ||
image: "registry.redhat.io/openshift4/ose-operator-registry:latest" | ||
securityContext: | ||
runAsUser: 0 | ||
env: | ||
- name: BUNDLE_IMAGE | ||
value: $(params.bundle-image) | ||
script: | | ||
#!/usr/bin/env bash | ||
set -xe | ||
opm render "${BUNDLE_IMAGE}" > "$(workspaces.workspace.path)/bundle.json" | ||
- name: jq-get-olm-package-version | ||
image: "quay.io/konflux-ci/appstudio-utils:ab6b0b8e40e440158e7288c73aff1cf83a2cc8a9@sha256:24179f0efd06c65d16868c2d7eb82573cce8e43533de6cea14fec3b7446e0b14" | ||
script: | | ||
#!/usr/bin/env bash | ||
set -xe | ||
jq -jr \ | ||
'.properties | .[] | select(.type == "olm.package") | .value.version' \ | ||
"$(workspaces.workspace.path)/bundle.json" \ | ||
> "$(results.bundle-version.path)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
approvers: | ||
- jbpratt | ||
- gurnben | ||
reviewers: | ||
- jbpratt | ||
- gurnben |