From 1ca47e263b6c1c6d9d875e56cb700db2ccc9064c Mon Sep 17 00:00:00 2001 From: Oksana Grishchenko Date: Tue, 19 Mar 2024 10:17:25 +0200 Subject: [PATCH] everest branch check --- .github/workflows/release.yml | 232 +++++++++++++++++----------------- 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1c898955..b382b2ca5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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/trivy-action@0.12.0 - 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 "everest-ci@percona.com" - 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/trivy-action@0.12.0 +# 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 "everest-ci@percona.com" +# 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/trivy-action@0.12.0 @@ -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 }}