-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b821ee0
commit 1ca47e2
Showing
1 changed file
with
116 additions
and
116 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 |
---|---|---|
|
@@ -59,12 +59,12 @@ jobs: | |
echo "OS=$(uname | awk '{print tolower($0)}')" >> $GITHUB_ENV | ||
- name: Operator - check out | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: percona/everest-operator | ||
path: everest-operator | ||
token: ${{ secrets.ROBOT_TOKEN }} | ||
# - name: Operator - check out | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# repository: percona/everest-operator | ||
# path: everest-operator | ||
# token: ${{ secrets.ROBOT_TOKEN }} | ||
|
||
# - name: Operator - create release branch | ||
# run: | | ||
|
@@ -148,16 +148,16 @@ jobs: | |
# type=raw,value=${{ env.VERSION }} | ||
# type=raw,value=${{ env.FLOATING_TAG }},enable=${{ env.IS_RC == 0 }} | ||
# | ||
- name: Operator - setup Docker meta for everest-operator-bundle | ||
id: bundle_meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
percona/everest-operator-bundle,enable=${{ env.IS_RC == 0 }} | ||
perconalab/everest-operator-bundle | ||
tags: | | ||
type=raw,value=${{ env.VERSION }} | ||
type=raw,value=${{ env.FLOATING_TAG }},enable=${{ env.IS_RC == 0 }} | ||
# - name: Operator - setup Docker meta for everest-operator-bundle | ||
# id: bundle_meta | ||
# uses: docker/metadata-action@v4 | ||
# with: | ||
# images: | | ||
# percona/everest-operator-bundle,enable=${{ env.IS_RC == 0 }} | ||
# perconalab/everest-operator-bundle | ||
# tags: | | ||
# type=raw,value=${{ env.VERSION }} | ||
# type=raw,value=${{ env.FLOATING_TAG }},enable=${{ env.IS_RC == 0 }} | ||
# | ||
# - name: Login to GitHub Container Registry | ||
# uses: docker/login-action@v2 | ||
|
@@ -191,93 +191,93 @@ jobs: | |
# tags: ${{ steps.bundle_meta.outputs.tags }} | ||
# file: everest-operator/bundle.Dockerfile | ||
|
||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: ${{ steps.bundle_meta.outputs.tags }} | ||
format: 'table' | ||
exit-code: '1' | ||
severity: 'CRITICAL,HIGH' | ||
|
||
- name: Catalog - checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: percona/everest-catalog | ||
path: everest-catalog | ||
token: ${{ secrets.ROBOT_TOKEN }} | ||
|
||
- name: Catalog - create release branch | ||
run: | | ||
cd everest-catalog | ||
# Check if the branch already exists | ||
git fetch | ||
check_branch=$(git ls-remote --heads origin ${BRANCH_NAME}) | ||
if [[ -z ${check_branch} ]]; then | ||
git checkout -b $BRANCH_NAME | ||
git push origin $BRANCH_NAME | ||
fi | ||
git checkout $BRANCH_NAME | ||
# update tag refs in scripts | ||
if [[ $env.IS_RC ]]; then | ||
sed -i "s/perconalab\/everest-operator-bundle.*/perconalab\/everest-operator-bundle:$VERSION/g" catalog/everest-operator/veneer.yaml | ||
sed -i "s/percona\/everest-operator-bundle.*/perconalab\/everest-operator-bundle:$VERSION/g" catalog/everest-operator/veneer.yaml | ||
else | ||
sed -i "s/perconalab\/everest-operator-bundle.*/percona\/everest-operator-bundle:$VERSION/g" catalog/everest-operator/veneer.yaml | ||
sed -i "s/percona\/everest-operator-bundle.*/percona\/everest-operator-bundle:$VERSION/g" catalog/everest-operator/veneer.yaml | ||
fi | ||
curl -Lo /tmp/opm https://github.com/operator-framework/operator-registry/releases/latest/download/${OS}-${ARCH}-opm | ||
chmod +x /tmp/opm | ||
/tmp/opm alpha render-template semver -o yaml < ./catalog/everest-operator/veneer.yaml > ./catalog/everest-operator/catalog.yaml | ||
# if there is something to commit, commit it and add the tag | ||
if [[ -n $(git status --porcelain) ]]; then | ||
if git tag --list | grep -q "^$GH_TAG$"; then | ||
echo "The tag is already present in github. Please create a different RC/Release" | ||
exit 1 | ||
fi | ||
# configure userdata for commits | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Everest RC CI triggered by ${{ github.actor }}" | ||
echo "---" | ||
git diff | ||
echo "---" | ||
# commit and push the updated files | ||
git commit -a -m "update version tag" | ||
git push origin $BRANCH_NAME | ||
# TODO: uncomment once ready to merge | ||
# git tag $GH_TAG | ||
# git push origin $GH_TAG | ||
fi | ||
- name: Catalog - docker meta | ||
id: catalog_meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
percona/everest-catalog,enable=${{ env.IS_RC == 0 }} | ||
perconalab/everest-catalog | ||
tags: | | ||
type=raw,value=${{ env.VERSION }} | ||
type=raw,value=latest | ||
type=raw,value=${{ env.FLOATING_TAG }},enable=${{ env.IS_RC == 0 }} | ||
- name: Catalog - build and push image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: everest-catalog | ||
# TODO: uncomment once ready to merge | ||
push: false | ||
# push: true | ||
tags: ${{ steps.catalog_meta.outputs.tags }} | ||
file: everest-catalog/everest-catalog.Dockerfile | ||
# - name: Run Trivy vulnerability scanner | ||
# uses: aquasecurity/[email protected] | ||
# with: | ||
# image-ref: ${{ steps.bundle_meta.outputs.tags }} | ||
# format: 'table' | ||
# exit-code: '1' | ||
# severity: 'CRITICAL,HIGH' | ||
# | ||
# - name: Catalog - checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# repository: percona/everest-catalog | ||
# path: everest-catalog | ||
# token: ${{ secrets.ROBOT_TOKEN }} | ||
# | ||
# - name: Catalog - create release branch | ||
# run: | | ||
# cd everest-catalog | ||
# # Check if the branch already exists | ||
# git fetch | ||
# check_branch=$(git ls-remote --heads origin ${BRANCH_NAME}) | ||
# | ||
# if [[ -z ${check_branch} ]]; then | ||
# git checkout -b $BRANCH_NAME | ||
# git push origin $BRANCH_NAME | ||
# fi | ||
# git checkout $BRANCH_NAME | ||
# | ||
# # update tag refs in scripts | ||
# if [[ $env.IS_RC ]]; then | ||
# sed -i "s/perconalab\/everest-operator-bundle.*/perconalab\/everest-operator-bundle:$VERSION/g" catalog/everest-operator/veneer.yaml | ||
# sed -i "s/percona\/everest-operator-bundle.*/perconalab\/everest-operator-bundle:$VERSION/g" catalog/everest-operator/veneer.yaml | ||
# else | ||
# sed -i "s/perconalab\/everest-operator-bundle.*/percona\/everest-operator-bundle:$VERSION/g" catalog/everest-operator/veneer.yaml | ||
# sed -i "s/percona\/everest-operator-bundle.*/percona\/everest-operator-bundle:$VERSION/g" catalog/everest-operator/veneer.yaml | ||
# fi | ||
# | ||
# curl -Lo /tmp/opm https://github.com/operator-framework/operator-registry/releases/latest/download/${OS}-${ARCH}-opm | ||
# chmod +x /tmp/opm | ||
# /tmp/opm alpha render-template semver -o yaml < ./catalog/everest-operator/veneer.yaml > ./catalog/everest-operator/catalog.yaml | ||
# | ||
# # if there is something to commit, commit it and add the tag | ||
# if [[ -n $(git status --porcelain) ]]; then | ||
# if git tag --list | grep -q "^$GH_TAG$"; then | ||
# echo "The tag is already present in github. Please create a different RC/Release" | ||
# exit 1 | ||
# fi | ||
# | ||
# # configure userdata for commits | ||
# git config --global user.email "[email protected]" | ||
# git config --global user.name "Everest RC CI triggered by ${{ github.actor }}" | ||
# | ||
# echo "---" | ||
# git diff | ||
# echo "---" | ||
# | ||
# # commit and push the updated files | ||
# git commit -a -m "update version tag" | ||
# git push origin $BRANCH_NAME | ||
# # TODO: uncomment once ready to merge | ||
# # git tag $GH_TAG | ||
# # git push origin $GH_TAG | ||
# fi | ||
# | ||
# | ||
# - name: Catalog - docker meta | ||
# id: catalog_meta | ||
# uses: docker/metadata-action@v4 | ||
# with: | ||
# images: | | ||
# percona/everest-catalog,enable=${{ env.IS_RC == 0 }} | ||
# perconalab/everest-catalog | ||
# tags: | | ||
# type=raw,value=${{ env.VERSION }} | ||
# type=raw,value=latest | ||
# type=raw,value=${{ env.FLOATING_TAG }},enable=${{ env.IS_RC == 0 }} | ||
# | ||
# | ||
# - name: Catalog - build and push image | ||
# uses: docker/build-push-action@v3 | ||
# with: | ||
# context: everest-catalog | ||
# # TODO: uncomment once ready to merge | ||
# push: false | ||
# # push: true | ||
# tags: ${{ steps.catalog_meta.outputs.tags }} | ||
# file: everest-catalog/everest-catalog.Dockerfile | ||
|
||
# - name: Run Trivy vulnerability scanner | ||
# uses: aquasecurity/[email protected] | ||
|
@@ -305,7 +305,7 @@ jobs: | |
if [[ -z ${check_branch} ]]; then | ||
git checkout -b $BRANCH_NAME | ||
# git push origin $BRANCH_NAME | ||
git push origin $BRANCH_NAME | ||
fi | ||
git checkout $BRANCH_NAME | ||
|
@@ -398,17 +398,17 @@ jobs: | |
# exit-code: '1' | ||
# severity: 'CRITICAL,HIGH' | ||
|
||
- name: CLI - build binaries | ||
run: | | ||
make release-cli | ||
- name: CLI - create release with binaries | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: | | ||
dist/* | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
# - name: CLI - build binaries | ||
# run: | | ||
# make release-cli | ||
# | ||
# - name: CLI - create release with binaries | ||
# uses: softprops/action-gh-release@v1 | ||
# with: | ||
# draft: true | ||
# files: | | ||
# dist/* | ||
# env: | ||
# GITHUB_TOKEN: ${{ github.token }} | ||
|
||
|