Skip to content

[bot:main] Update catalog #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
34 changes: 26 additions & 8 deletions .github/workflows/index-render-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
build-matrix:
runs-on: ubuntu-latest
if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere
# if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere
steps:
- name: Checkout the repository
uses: actions/checkout@v4
Expand All @@ -32,7 +32,7 @@ jobs:
versions: ${{ steps.set-matrix.outputs.versions }}
generate-catalog:
needs: build-matrix
if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere
# if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -55,24 +55,42 @@ jobs:
curl -sSfLo /usr/local/bin/opm "https://github.com/operator-framework/operator-registry/releases/download/v1.47.0/linux-amd64-opm"
chmod +x /usr/local/bin/opm
./hack/index-render-template.sh ${{matrix.version}} ${{github.event.inputs.environment}}
- name: Save generated changes
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}
path: .konflux/olm-catalog/index/${{ matrix.version }}

- name: Commit new changes
final-commit:
needs: generate-catalog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: downloaded-artifacts
- name: Apply downloaded changes
run: |
set -x
cp -rvf downloaded-artifacts/* .konflux/olm-catalog/index/
- name: Commit Changes and Generate PR
run: |
BASE_BRANCH=${GITHUB_REF#refs/heads/}
SOURCE_BRANCH=actions/update/${{matrix.version}}/operator-update-images-${BASE_BRANCH}
git config user.name openshift-pipelines-bot
git config user.email [email protected]
BASE_BRANCH=${GITHUB_REF#refs/heads/}
SOURCE_BRANCH=actions/update/operator-update-images-${BASE_BRANCH}
git checkout -b ${SOURCE_BRANCH}

git add .konflux/olm-catalog/index/${{matrix.version}}/
git add .konflux/olm-catalog/index/

if [[ -z $(git status --porcelain --untracked-files=no) ]]; then
echo "No change, exiting"
exit 0
fi

git commit -F- <<EOF
[bot:${BASE_BRANCH}] Update ${{matrix.version}} generate catalog
[bot:${BASE_BRANCH}] Update catalog
EOF

git push -f origin ${SOURCE_BRANCH}
Expand All @@ -81,4 +99,4 @@ jobs:
gh pr create -B ${BASE_BRANCH} -H ${SOURCE_BRANCH} --label=automated --label=lgtm --label=approved --fill
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .konflux/olm-catalog/index/v4.17/catalog-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"skipRange": ">=1.17.0 <1.18.0"
},
{
"name": "openshift-pipelines-operator-main",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"replaces": "openshift-pipelines-operator-rh.v1.18.0",
"skipRange": ">=1.17.0 <1.18.1"
}
Expand Down Expand Up @@ -165,7 +165,7 @@
{
"entries": [
{
"name": "openshift-pipelines-operator-rh.main",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"replaces": "openshift-pipelines-operator-rh.v1.18.0",
"skipRange": ">=1.17.0 <1.18.1"
}
Expand All @@ -176,8 +176,8 @@
},
{
"schema": "olm.bundle",
"name": "openshift-pipelines-operator-rh.main",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:509d04918f5d82ba294bf7b87a682521486b0f90199d9548be2f4e08a25b42fa"
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:375837b1699f1d10f62379f77f01138cf4bac8d0cef83e6c8e15a4384ed7adec"
},
{
"schema": "olm.bundle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"skipRange": ">=1.17.0 <1.18.0"
},
{
"name": "openshift-pipelines-operator-main",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"replaces": "openshift-pipelines-operator-rh.v1.18.0",
"skipRange": ">=1.17.0 <1.18.1"
}
Expand All @@ -50,7 +50,7 @@
"package": "openshift-pipelines-operator-rh",
"entries": [
{
"name": "openshift-pipelines-operator-rh.main",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"replaces": "openshift-pipelines-operator-rh.v1.18.0",
"skipRange": ">=1.17.0 <1.18.1"
}
Expand Down Expand Up @@ -10465,7 +10465,7 @@
"schema": "olm.bundle",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"package": "openshift-pipelines-operator-rh",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:509d04918f5d82ba294bf7b87a682521486b0f90199d9548be2f4e08a25b42fa",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:375837b1699f1d10f62379f77f01138cf4bac8d0cef83e6c8e15a4384ed7adec",
"properties": [
{
"type": "olm.gvk",
Expand Down Expand Up @@ -11158,7 +11158,7 @@
},
{
"name": "",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:509d04918f5d82ba294bf7b87a682521486b0f90199d9548be2f4e08a25b42fa"
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:375837b1699f1d10f62379f77f01138cf4bac8d0cef83e6c8e15a4384ed7adec"
},
{
"name": "IMAGE_PIPELINES_PROXY",
Expand Down Expand Up @@ -11186,7 +11186,7 @@
},
{
"name": "IMAGE_PRUNER_CONTROLLER",
"image": "quay.io/openshift-pipeline/pipelines-pruner-controller-rhel9@sha256:cd5a8cc3c6b160708281e514d4dd9308bd6e1d8fa247d06b681bd5cfe478bd23"
"image": "quay.io/openshift-pipeline/pipelines-pruner-controller-rhel9@sha256:d893b5837ed5aebce0bafd1bf352adf488736fba34c4c18bee0caf864fda5d17"
},
{
"name": "IMAGE_PIPELINES_CONTROLLER",
Expand Down
8 changes: 4 additions & 4 deletions .konflux/olm-catalog/index/v4.18/catalog-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"skipRange": ">=1.17.0 <1.18.0"
},
{
"name": "openshift-pipelines-operator-main",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"replaces": "openshift-pipelines-operator-rh.v1.18.0",
"skipRange": ">=1.17.0 <1.18.1"
}
Expand Down Expand Up @@ -165,7 +165,7 @@
{
"entries": [
{
"name": "openshift-pipelines-operator-rh.main",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"replaces": "openshift-pipelines-operator-rh.v1.18.0",
"skipRange": ">=1.17.0 <1.18.1"
}
Expand All @@ -176,8 +176,8 @@
},
{
"schema": "olm.bundle",
"name": "openshift-pipelines-operator-rh.main",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:509d04918f5d82ba294bf7b87a682521486b0f90199d9548be2f4e08a25b42fa"
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:375837b1699f1d10f62379f77f01138cf4bac8d0cef83e6c8e15a4384ed7adec"
},
{
"schema": "olm.bundle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"skipRange": ">=1.17.0 <1.18.0"
},
{
"name": "openshift-pipelines-operator-main",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"replaces": "openshift-pipelines-operator-rh.v1.18.0",
"skipRange": ">=1.17.0 <1.18.1"
}
Expand All @@ -50,7 +50,7 @@
"package": "openshift-pipelines-operator-rh",
"entries": [
{
"name": "openshift-pipelines-operator-rh.main",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"replaces": "openshift-pipelines-operator-rh.v1.18.0",
"skipRange": ">=1.17.0 <1.18.1"
}
Expand Down Expand Up @@ -10465,7 +10465,7 @@
"schema": "olm.bundle",
"name": "openshift-pipelines-operator-rh.v5.0.5-594",
"package": "openshift-pipelines-operator-rh",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:509d04918f5d82ba294bf7b87a682521486b0f90199d9548be2f4e08a25b42fa",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:375837b1699f1d10f62379f77f01138cf4bac8d0cef83e6c8e15a4384ed7adec",
"properties": [
{
"type": "olm.gvk",
Expand Down Expand Up @@ -11158,7 +11158,7 @@
},
{
"name": "",
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:509d04918f5d82ba294bf7b87a682521486b0f90199d9548be2f4e08a25b42fa"
"image": "quay.io/openshift-pipeline/pipelines-operator-bundle@sha256:375837b1699f1d10f62379f77f01138cf4bac8d0cef83e6c8e15a4384ed7adec"
},
{
"name": "IMAGE_PIPELINES_PROXY",
Expand Down Expand Up @@ -11186,7 +11186,7 @@
},
{
"name": "IMAGE_PRUNER_CONTROLLER",
"image": "quay.io/openshift-pipeline/pipelines-pruner-controller-rhel9@sha256:cd5a8cc3c6b160708281e514d4dd9308bd6e1d8fa247d06b681bd5cfe478bd23"
"image": "quay.io/openshift-pipeline/pipelines-pruner-controller-rhel9@sha256:d893b5837ed5aebce0bafd1bf352adf488736fba34c4c18bee0caf864fda5d17"
},
{
"name": "IMAGE_PIPELINES_CONTROLLER",
Expand Down
2 changes: 1 addition & 1 deletion hack/index-render-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Update BUNDLE_NAME for each release according to the corresponding 'name' value specified in the catalog-template.json file.
# ex: for 1.19 it will be openshift-pipelines-operator-rh.v1.19.0, for 1.17.2 it will be openshift-pipelines-operator-rh.v1.17.2
BUNDLE_NAME=openshift-pipelines-operator-rh.main
BUNDLE_NAME=openshift-pipelines-operator-rh.v5.0.5-594

# Update images from project.yaml to "generated" files
VERSION=${1:-"v4.18"}
Expand Down
2 changes: 1 addition & 1 deletion project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ images:
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/main/console-plugin-rhel9@sha256:d7721f5c3c7ed4bc0a0961e2c4b5ec3416d62e5cfbd2704488e063b22c23a141
# operator-bundle
- name: IMAGE_OPERATOR_BUNDLE
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/main/operator-bundle-rhel9@sha256:509d04918f5d82ba294bf7b87a682521486b0f90199d9548be2f4e08a25b42fa
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/main/operator-bundle-rhel9@sha256:375837b1699f1d10f62379f77f01138cf4bac8d0cef83e6c8e15a4384ed7adec
# Pruner
- name: IMAGE_PRUNER_CONTROLLER
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/main/pruner-controller-rhel9@sha256:cd5a8cc3c6b160708281e514d4dd9308bd6e1d8fa247d06b681bd5cfe478bd23