-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from redhat-marketplace/release/0.2.0
Release 0.2.0
- Loading branch information
Showing
48 changed files
with
3,840 additions
and
2,685 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 |
---|---|---|
|
@@ -10,13 +10,27 @@ jobs: | |
version: | ||
name: Bump Version | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
registry: | ||
- 'quay.io/rh-marketplace' | ||
include: | ||
- registry: quay.io/rh-marketplace | ||
name: quay | ||
key: quayUser | ||
value: quayPassword | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.14 | ||
id: go | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
|
@@ -30,9 +44,43 @@ jobs: | |
if [ "$RESULT" != "" ] ; then | ||
NEWVERSION=$(make bump-version) | ||
echo "bumping $VERSION to $NEWVERSION" | ||
git config user.name 'RHM Oper Bot' | ||
git config user.email '[email protected]' | ||
git add version/version.go | ||
git commit -m "chore: bumping version from $VERSION to $NEWVERSION" | ||
git push | ||
echo ::set-env name=bump::true | ||
else | ||
echo "$VERSION is already bumped" ; | ||
fi | ||
- name: Install operator-sdk | ||
if: env.bump == 'true' | ||
run: | | ||
cd /tmp | ||
curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu | ||
chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu && sudo mkdir -p /usr/local/bin/ && sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk && rm operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu | ||
python -m pip install --upgrade pip | ||
pip3 install -Iv operator-courier==$COURIER_VERSION | ||
curl -LO https://github.com/operator-framework/operator-registry/releases/download/${OPM_VERSION}/linux-amd64-opm | ||
chmod +x linux-amd64-opm && sudo cp linux-amd64-opm /usr/local/bin/opm && rm linux-amd64-opm | ||
echo "::add-path::/usr/local/bin" | ||
sudo apt-get install -y sed | ||
sudo snap install yq | ||
env: | ||
RELEASE_VERSION: v0.18.0 | ||
OPM_VERSION: v1.12.5 | ||
COURIER_VERSION: 2.1.7 | ||
|
||
- name: Login ${{ matrix.name }} | ||
if: env.bump == 'true' | ||
run: make docker-login | ||
env: | ||
DOCKER_USER: ${{ secrets[matrix.key] }} | ||
DOCKER_PASSWORD: ${{ secrets[matrix.value] }} | ||
REGISTRY: ${{ matrix.registry }} | ||
|
||
- name: Build all bundles | ||
if: env.bump == 'true' | ||
run: | | ||
make opm-bundle-all |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Create Branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'release/**' | ||
- 'hotfix/**' | ||
|
||
jobs: | ||
create-bundle: | ||
name: Create Manifest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
channel: ['stable'] | ||
include: | ||
- channel: 'stable' | ||
tags: ['release'] | ||
draft: 'false' | ||
message: 'Stable release should be merged.' | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.14 | ||
id: go | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.pullRequestSecret }} | ||
|
||
- name: Get Vars | ||
id: vars | ||
run: | | ||
echo ::set-env name=pr_branch::$(echo $BRANCH | sed 's/refs\/heads\///') | ||
echo "::set-output name=version::$(make current-version)" | ||
echo "::set-output name=tag::sha-$(git rev-parse --short HEAD)" | ||
echo "::set-output name=hash::$(make current-version)-${FILEHASH:0:6}" | ||
echo "::set-env name=OPERATOR_IMAGE::quay.io/rh-marketplace/redhat-marketplace-operator:$(make current-version)-${FILEHASH:0:6}" | ||
env: | ||
FILEHASH: ${{ hashFiles('build/**', 'assets/**', 'cmd/**', 'pkg/**', 'version/**', 'go.sum', 'go.mod') }} | ||
BRANCH: ${{ github.ref }} | ||
|
||
- name: Open a PR to the default branch | ||
uses: vsoch/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.pullRequestSecret }} | ||
PULL_REQUEST_FROM_BRANCH: '${{ env.pr_branch }}' | ||
PULL_REQUEST_BRANCH: master | ||
PULL_REQUEST_TITLE: 'Release ${{ steps.vars.outputs.version }}' | ||
PULL_REQUEST_BODY: "Release PR - merge when ready.\n\nSteps:\n1. Release the beta channel bundle from the PR 'Generate Bundle' check.\n1. Test beta. Make changes to release branch as necessary.\n1. Release the stable channel.\n1. Merge this PR." |
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 |
---|---|---|
|
@@ -57,10 +57,16 @@ jobs: | |
curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu | ||
chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu && sudo mkdir -p /usr/local/bin/ && sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk && rm operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu | ||
python -m pip install --upgrade pip | ||
pip3 install operator-courier | ||
pip3 install -Iv operator-courier==$COURIER_VERSION | ||
curl -LO https://github.com/operator-framework/operator-registry/releases/download/${OPM_VERSION}/linux-amd64-opm | ||
chmod +x linux-amd64-opm && sudo cp linux-amd64-opm /usr/local/bin/opm && rm linux-amd64-opm | ||
echo "::add-path::/usr/local/bin" | ||
sudo apt-get install -y sed | ||
sudo snap install yq | ||
env: | ||
RELEASE_VERSION: v0.18.0 | ||
OPM_VERSION: v1.12.5 | ||
COURIER_VERSION: 2.1.7 | ||
|
||
- name: Create CSV | ||
id: bundle | ||
|
@@ -69,20 +75,10 @@ jobs: | |
CSV_CHANNEL: ${{ matrix.channel }} | ||
CSV_DEFAULT_CHANNEL: ${{ matrix.channel == 'stable' }} | ||
|
||
- name: Create branch | ||
if: ${{ matrix.channel == 'stable' && github.event_name == 'push' }} | ||
- name: Create commit | ||
run: | | ||
git config user.name 'RHM Oper Bot' | ||
git config user.email '[email protected]' | ||
git add ./deploy/olm-catalog | ||
git commit -m "chore: update csv" | ||
git push | ||
- name: Open a PR to the default branch | ||
uses: vsoch/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.pullRequestSecret }} | ||
PULL_REQUEST_FROM_BRANCH: '${{ env.pr_branch }}' | ||
PULL_REQUEST_BRANCH: master | ||
PULL_REQUEST_TITLE: 'Release ${{ steps.vars.outputs.version }}' | ||
PULL_REQUEST_BODY: "Release PR - merge when ready.\n\nSteps:\n1. Release the beta channel bundle from the PR 'Generate Bundle' check.\n1. Test beta. Make changes to release branch as necessary.\n1. Release the stable channel.\n1. Merge this PR." |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.