forked from rhobs/observability-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: switch to file-based OLM catalogs (#46)
The Catalog index yaml file for the new file-based catalog will be maintained in the olm-catalog branch. The PR introduces the changes needed to generate new catalog index entry for new releases to the development, candidate, and the stable channel and to push the updated index to the olm-catalog git branch. To switch to new file-based OLM catalogs, following changes have been made * upgrade to newer version of operator-sdk tools (operator-sdk, olm) * Generate catalog for existing 0.0.13 bundle by * creating new catalog index dockerfile * adding package definition for observability-operator * adding channel definitions for all 3 channels see: rhobs#194 * Modify GitHub workflow to adapt to the new file-based catalog JIRA: https://issues.redhat.com/browse/MON-2791 Signed-off-by: Sunil Thaha <[email protected]>
- Loading branch information
Showing
9 changed files
with
65 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ runs: | |
using: composite | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Go environment | ||
uses: actions/setup-go@v3 | ||
|
@@ -33,6 +35,18 @@ runs: | |
username: ${{ inputs.quay_login }} | ||
password: ${{ inputs.quay_token }} | ||
|
||
- name: Git merge olm-catalog branch | ||
shell: bash | ||
run: | | ||
git config user.name rhobs-release-bot | ||
git config user.email [email protected] | ||
# NOTE: uses strategy-option=ours as bundle created for a release using | ||
# make initiate-release conflicts with the previous bundle created for | ||
# development branch, so the version in main takes precedence over the | ||
# one in olm-catalog branch | ||
git merge -Xours origin/olm-catalog -m "merge olm-catalog branch" | ||
- name: Build Operator Image | ||
shell: bash | ||
run: make operator-image | ||
|
@@ -49,10 +63,20 @@ runs: | |
shell: bash | ||
run: make bundle-push | ||
|
||
|
||
- name: Build Catalog Image | ||
shell: bash | ||
run: make catalog-image FIRST_OLM_RELEASE=true | ||
run: | | ||
make catalog-image | ||
# NOTE: add a commit only if the catalog can built sucessfully | ||
git add bundle/ olm/ | ||
git commit -m "ci(bot): update catalog image" | ||
- name: Publish catalog image | ||
shell: bash | ||
run: make catalog-push | ||
run: | | ||
make catalog-push | ||
# update olm-catalog only if catalog could be successfully published | ||
git push origin HEAD:olm-catalog |
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
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 |
---|---|---|
|
@@ -58,6 +58,12 @@ jobs: | |
quay_login: ${{ secrets.QUAY_LOGIN }} | ||
quay_token: ${{ secrets.QUAY_TOKEN }} | ||
|
||
- name: Push catalog index changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.REPOSITORY_PUSH_TOKEN }} | ||
branch: olm-catalog | ||
|
||
create-github-prerelease: | ||
needs: | ||
- e2e-tests-olm | ||
|
@@ -87,11 +93,16 @@ jobs: | |
# Create the release notes for the Github release | ||
git config user.name rhobs-release-bot | ||
git config user.email [email protected] | ||
npx standard-version -i RELEASE_BODY.md --release-as $(cat VERSION) --skip.commit | ||
npx standard-version -i RELEASE_BODY.md \ | ||
--release-as $(cat VERSION) \ | ||
--skip.commit | ||
- name: Publish tag | ||
id: publish_tag | ||
run: | | ||
# NOTE tag is created by standard-version and points to the | ||
# chore(release): commit as opposed to pointing to the commit added | ||
# to olm-catalog branch after images are built and pushed | ||
git push --follow-tags | ||
echo ::set-output name=tag_name::$(git describe HEAD --abbrev=0) | ||
|
@@ -103,5 +114,5 @@ jobs: | |
release_name: ${{ steps.publish_tag.outputs.tag_name }} | ||
tag_name: ${{ steps.publish_tag.outputs.tag_name }} | ||
body_path: RELEASE_BODY.md | ||
# We always generate pre-releases and mark them as releases manually | ||
# NOTE: We always generate pre-releases and mark them as releases manually | ||
prerelease: true |
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
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