-
Notifications
You must be signed in to change notification settings - Fork 201
PR for a next 0.68.x release #2067
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
base: release-0.68
Are you sure you want to change the base?
Changes from 7 commits
8a325c1
db2027d
2d641bc
55e1ae1
330639d
283f3a9
f5d6751
487149a
aadb46d
534ef26
66d4335
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -38,7 +38,7 @@ jobs: | |||||||
| repository: ${{ matrix.repo.upstream }} | ||||||||
| ref: main | ||||||||
| token: ${{ secrets.VM_BOT_GH_TOKEN }} | ||||||||
| path: __k8s-operatorhub-repo | ||||||||
| path: __operatorhub-repo | ||||||||
|
|
||||||||
| - name: Import GPG key | ||||||||
| uses: crazy-max/ghaction-import-gpg@v6 | ||||||||
|
|
@@ -48,58 +48,69 @@ jobs: | |||||||
| passphrase: ${{ secrets.VM_BOT_PASSPHRASE }} | ||||||||
| git_user_signingkey: true | ||||||||
| git_commit_gpgsign: true | ||||||||
| workdir: __k8s-operatorhub-repo | ||||||||
| workdir: __operatorhub-repo | ||||||||
|
|
||||||||
| - uses: dawidd6/action-download-artifact@v11 | ||||||||
| with: | ||||||||
| name: olm | ||||||||
| workflow: main.yaml | ||||||||
| workflow: release.yaml | ||||||||
| github_token: ${{ secrets.VM_BOT_GH_TOKEN }} | ||||||||
| run_id: ${{ github.event.workflow_run.id }} | ||||||||
| path: bundle | ||||||||
|
|
||||||||
| - name: Install opm | ||||||||
| run: | | ||||||||
| curl -sL https://github.com/operator-framework/operator-registry/releases/download/v1.65.0/linux-amd64-opm -o /usr/local/bin/opm | ||||||||
| chmod +x /usr/local/bin/opm | ||||||||
|
|
||||||||
| - name: Add operatorhub bundle | ||||||||
| id: update | ||||||||
| run: | | ||||||||
| if [ ! -d bundle ]; then | ||||||||
| echo "No bundle directory found" | ||||||||
| exit 1; | ||||||||
| fi | ||||||||
| OPERATOR_DIR=__k8s-operatorhub-repo/operators/victoriametrics-operator | ||||||||
| CATALOGS_DIR=__k8s-operatorhub-repo/catalogs | ||||||||
| CATALOGS_DIR=__operatorhub-repo/catalogs | ||||||||
| NEW_VERSION=$(ls bundle | head -1) | ||||||||
| CATALOG_FILE=${CATALOGS_DIR}/latest/victoriametrics-operator/catalog.yaml | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Initialize Prompt for AI agents
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not an issue - prior catalog exists
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for clarifying—the prior catalog exists, so this isn’t an issue here. |
||||||||
| mkdir -p ${CATALOGS_DIR}/latest/victoriametrics-operator | ||||||||
|
|
||||||||
| mkdir -p ${CATALOGS_DIR} | ||||||||
| mkdir -p ${OPERATOR_DIR} | ||||||||
| # Save existing catalog as PREV_CATALOG before overwriting | ||||||||
| if [ -f "${CATALOG_FILE}" ]; then | ||||||||
| cp "${CATALOG_FILE}" /tmp/vm-prev-catalog.yaml | ||||||||
| PREV_CATALOG=/tmp/vm-prev-catalog.yaml | ||||||||
| fi | ||||||||
|
|
||||||||
| export OLD_VERSION=$(find ${OPERATOR_DIR}/* ! -path "*/catalog-templates" -maxdepth 0 -type d -exec basename {} \; | sort -V -r | head -1) | ||||||||
| export OLD_ENTRY="victoriametrics-operator.v${OLD_VERSION}" | ||||||||
| PREVIOUS_VERSION=$(yq 'select(.schema == "olm.channel") | .entries[0].name' \ | ||||||||
| ${PREV_CATALOG} 2>/dev/null || true) | ||||||||
|
|
||||||||
| export NEW_VERSION=$(ls bundle | head -1) | ||||||||
| opm render bundle/${NEW_VERSION} --output=yaml > /tmp/vm-bundle-rendered.yaml | ||||||||
| yq 'select(.schema == "olm.package")' "${PREV_CATALOG}" > /tmp/vm-catalog-header.yaml | ||||||||
| echo "---" >> /tmp/vm-catalog-header.yaml | ||||||||
| yq '.entries[] | select(.schema == "olm.channel")' \ | ||||||||
| bundle/${NEW_VERSION}/catalog-templates/latest.yaml >> /tmp/vm-catalog-header.yaml | ||||||||
|
|
||||||||
| if [ ! -z $OLD_VERSION ]; then | ||||||||
| export MANIFEST_PATH=bundle/${NEW_VERSION}/manifests/victoriametrics-operator.clusterserviceversion.yaml | ||||||||
| yq -i '.spec.replaces = "victoriametrics-operator.v" + strenv(OLD_VERSION)' $MANIFEST_PATH | ||||||||
| fi | ||||||||
| # Include previous bundles from PREV_CATALOG (excludes current version to avoid duplicates) | ||||||||
| yq "select(.schema == \"olm.bundle\" and .name != \"victoriametrics-operator.v${NEW_VERSION}\")" \ | ||||||||
| "${PREV_CATALOG}" > /tmp/vm-prev-bundles.yaml | ||||||||
| yq eval-all '.' /tmp/vm-catalog-header.yaml /tmp/vm-bundle-rendered.yaml /tmp/vm-prev-bundles.yaml > ${CATALOG_FILE} | ||||||||
|
|
||||||||
| mv bundle/* ${OPERATOR_DIR}/ | ||||||||
| if [ -f ${OPERATOR_DIR}/Makefile ]; then | ||||||||
| if [ ! -z $OLD_VERSION ]; then | ||||||||
| yq -i -I2 '.catalog_templates.[].replaces = strenv(OLD_ENTRY)' ${OPERATOR_DIR}/${NEW_VERSION}/release-config.yaml | ||||||||
| fi | ||||||||
| else | ||||||||
| rm -f ${OPERATOR_DIR}/${NEW_VERSION}/release-config.yaml | ||||||||
| if [ -n "${PREVIOUS_VERSION}" ]; then | ||||||||
| yq -i '(select(.schema == "olm.channel") | .entries[0]).replaces = strenv(PREVIOUS_VERSION)' ${CATALOG_FILE} | ||||||||
| fi | ||||||||
| opm validate ${CATALOGS_DIR}/latest/victoriametrics-operator | ||||||||
|
|
||||||||
| echo "VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT | ||||||||
|
|
||||||||
| - name: Create Pull Request | ||||||||
| if: ${{ steps.update.outputs.VERSION != '' }} | ||||||||
| uses: peter-evans/create-pull-request@v7 | ||||||||
| with: | ||||||||
| add-paths: operators/victoriametrics-operator,catalogs | ||||||||
| add-paths: catalogs | ||||||||
| commit-message: 'victoriametrics-operator: ${{ steps.update.outputs.VERSION }}' | ||||||||
| signoff: true | ||||||||
| committer: "Github Actions <${{ steps.import-gpg.outputs.email }}>" | ||||||||
| path: __k8s-operatorhub-repo | ||||||||
| path: __operatorhub-repo | ||||||||
| push-to-fork: ${{ matrix.repo.fork }} | ||||||||
| branch: vm-operator-release-${{ steps.update.outputs.VERSION }} | ||||||||
| token: ${{ secrets.VM_BOT_GH_TOKEN }} | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ report.xml | |
| /bin/ | ||
| /build* | ||
| /bundle* | ||
| /catalog* | ||
| release | ||
| operator.zip | ||
| coverage.txt | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.