Skip to content

Commit

Permalink
Merge branch 'main' into ssh_keepalives
Browse files Browse the repository at this point in the history
  • Loading branch information
mshaposhnik authored Aug 9, 2024
2 parents d7c71d2 + 2680275 commit 637dccb
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .tekton/tasks/ec-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
$(all_tasks_dir all_tasks-ec)
- name: validate-all-tasks
workingDir: "$(workspaces.source.path)/source"
image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:662648a893b2403fe6604655a7c98dd561705865e29239198e18f689ee7ae242
image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a63668adc33c513b455dcd494d556e43fdab95ce8e06bfc74ac6f104af11116a
script: |
set -euo pipefail
Expand All @@ -37,7 +37,7 @@ spec:
ec validate input --policy "${policy}" --output yaml --strict=true ${args[*]}
- name: validate-build-tasks
workingDir: "$(workspaces.source.path)/source"
image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:662648a893b2403fe6604655a7c98dd561705865e29239198e18f689ee7ae242
image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a63668adc33c513b455dcd494d556e43fdab95ce8e06bfc74ac6f104af11116a
script: |
set -euo pipefail
Expand Down
2 changes: 1 addition & 1 deletion pipelines/enterprise-contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
resolver: bundles
params:
- name: bundle
value: quay.io/enterprise-contract/ec-task-bundle:snapshot@sha256:7a8e4c27716c1c5653cf4338f58cb2838e2712984c6c29204a28a9bee730df07
value: quay.io/enterprise-contract/ec-task-bundle:snapshot@sha256:294b14582fa0e44f42c7e0651915ca67425488527fa7d9ecb49c3974ede028fc
- name: name
value: verify-enterprise-contract
- name: kind
Expand Down
18 changes: 18 additions & 0 deletions task/opm-get-bundle-version/0.1/README.md
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 task/opm-get-bundle-version/0.1/opm-get-bundle-version.yaml
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)"
6 changes: 6 additions & 0 deletions task/opm-get-bundle-version/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
approvers:
- jbpratt
- gurnben
reviewers:
- jbpratt
- gurnben

0 comments on commit 637dccb

Please sign in to comment.