Skip to content

Commit

Permalink
Update cloud-governance quay repo (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
athiruma authored Sep 10, 2024
1 parent e4f1c77 commit 995ea9c
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,33 @@ jobs:
fi
done
quay_upload:
name: quay_upload
public_quay_upload:
name: public_quay_upload
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.12' ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: ⌛ Upload to 🐋 quay.io
run: |
pip install setuptools
version=$(python3 setup.py --version)
sudo docker build --build-arg VERSION=latest -t quay.io/${{ secrets.PACKAGE_NAME }}/${{ secrets.PACKAGE_NAME }}:latest .
sudo docker login quay.io -u ${{ secrets.QAUYIO_ROBOT_CLOUD_GOVERNANCE_USER }} -p ${{ secrets.QAUYIO_ROBOT_CLOUD_GOVERNANCE_TOKEN }}
sudo docker push quay.io/${{ secrets.PACKAGE_NAME }}/${{ secrets.PACKAGE_NAME }}:latest
echo 'Wait 30 sec till image will be updated in quay.io'
sleep 30
private_quay_upload:
name: private_quay_upload
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate ]
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -331,7 +356,7 @@ jobs:
strategy:
matrix:
python-version: [ '3.12' ]
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, quay_upload ]
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, public_quay_upload, private_quay_upload ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -355,7 +380,7 @@ jobs:
e2e:
name: e2e
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, quay_upload, bump_version ]
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, quay_upload, bump_version, public_quay_upload, private_quay_upload ]
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -369,10 +394,10 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
run: |
sudo podman run --rm --name cloud-governance -e policy=${{ matrix.policy }} -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION=${{ matrix.region }} -e dry_run=yes -e policy_output=s3://${{ secrets.BUCKET }}/test/${{ matrix.region }} -e log_level=INFO quay.io/ebattat/cloud-governance
sudo podman run --rm --name cloud-governance -e policy=${{ matrix.policy }} -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION=${{ matrix.region }} -e dry_run=yes -e policy_output=s3://${{ secrets.BUCKET }}/test/${{ matrix.region }} -e log_level=INFO quay.io/${{ secrets.PACKAGE_NAME }}/${{ secrets.PACKAGE_NAME }}
gitleaks:
name: gitleaks
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, quay_upload, bump_version ]
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, quay_upload, bump_version, public_quay_upload, private_quay_upload ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -385,4 +410,4 @@ jobs:
# GITHUB_TOKEN already taken => GIT_TOKEN
region='us-east-1'
policy='gitleaks'
sudo podman run --rm --name cloud-governance -e policy=$policy -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION=$region -e git_access_token=${{ secrets.GIT_TOKEN }} -e git_repo=https://github.com/redhat-performance/cloud-governance -e policy_output=s3://${{ secrets.BUCKET }}/test/$region -e log_level=INFO quay.io/ebattat/cloud-governance > /dev/null
sudo podman run --rm --name cloud-governance -e policy=$policy -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION=$region -e git_access_token=${{ secrets.GIT_TOKEN }} -e git_repo=https://github.com/redhat-performance/cloud-governance -e policy_output=s3://${{ secrets.BUCKET }}/test/$region -e log_level=INFO quay.io/${{ secrets.PACKAGE_NAME }}/${{ secrets.PACKAGE_NAME }} > /dev/null

0 comments on commit 995ea9c

Please sign in to comment.