Skip to content

Commit

Permalink
[release-1.33] Fix image references in CSV (#2692)
Browse files Browse the repository at this point in the history
* Support patch release validation

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* CURRENT_VERSION_IMAGES=release-1.33.0 make generated-files

Signed-off-by: Pierangelo Di Pilato <[email protected]>

---------

Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi authored Jun 6, 2024
1 parent 247e3a8 commit 9bba68c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
with:
go-version: 1.21.x

- name: Install yq
run: |
go install github.com/mikefarah/yq/v3@latest
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -46,22 +50,12 @@ jobs:
git pull --no-rebase upstream ${{ github.base_ref }}
shell: bash

- name: Set CURRENT_VERSION_IMAGES on push
working-directory: ./src/github.com/${{ github.repository }}
env:
branch: ${{ github.ref_name }}
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref_name != 'main' && !contains(github.ref_name, 'dependabot/')
run: |
echo "CURRENT_VERSION_IMAGES=${branch}" >> $GITHUB_ENV
shell: bash

- name: Set CURRENT_VERSION_IMAGES on PRs
- name: Set CURRENT_VERSION_IMAGES
working-directory: ./src/github.com/${{ github.repository }}
env:
branch: ${{ github.base_ref }}
if: github.event_name == 'pull_request' && github.base_ref != 'main'
if: (github.event_name == 'pull_request' && github.base_ref != 'main') || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref_name != 'main')
run: |
echo "CURRENT_VERSION_IMAGES=${branch}" >> $GITHUB_ENV
tag="release-$(yq read ./olm-catalog/serverless-operator/project.yaml 'project.version')"
echo "CURRENT_VERSION_IMAGES=${tag}" >> $GITHUB_ENV
shell: bash

- name: Regenerate all generated files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ spec:
serviceAccountName: knative-operator
containers:
- name: knative-operator
image: registry.ci.openshift.org/knative/release-1.33:serverless-openshift-knative-operator
image: registry.ci.openshift.org/knative/release-1.33.0:serverless-openshift-knative-operator
readinessProbe:
periodSeconds: 1
httpGet:
Expand Down Expand Up @@ -983,7 +983,7 @@ spec:
- ALL
containers:
- name: knative-openshift
image: registry.ci.openshift.org/knative/release-1.33:serverless-knative-operator
image: registry.ci.openshift.org/knative/release-1.33.0:serverless-knative-operator
imagePullPolicy: Always
readinessProbe:
httpGet:
Expand Down Expand Up @@ -1155,7 +1155,7 @@ spec:
serviceAccountName: knative-openshift-ingress
containers:
- name: knative-openshift-ingress
image: registry.ci.openshift.org/knative/release-1.33:serverless-ingress
image: registry.ci.openshift.org/knative/release-1.33.0:serverless-ingress
imagePullPolicy: Always
ports:
- containerPort: 9090
Expand Down Expand Up @@ -1304,11 +1304,11 @@ spec:
- knativeeventings.operator.knative.dev
relatedImages:
- name: "knative-operator"
image: "registry.ci.openshift.org/knative/release-1.33:serverless-openshift-knative-operator"
image: "registry.ci.openshift.org/knative/release-1.33.0:serverless-openshift-knative-operator"
- name: "knative-openshift"
image: "registry.ci.openshift.org/knative/release-1.33:serverless-knative-operator"
image: "registry.ci.openshift.org/knative/release-1.33.0:serverless-knative-operator"
- name: "knative-openshift-ingress"
image: "registry.ci.openshift.org/knative/release-1.33:serverless-ingress"
image: "registry.ci.openshift.org/knative/release-1.33.0:serverless-ingress"
- name: "IMAGE_queue-proxy"
image: "registry.ci.openshift.org/openshift/knative-serving-queue:knative-v1.12"
- name: "IMAGE_activator"
Expand Down

0 comments on commit 9bba68c

Please sign in to comment.