Skip to content

Commit

Permalink
Update the quay repo to env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
athiruma committed Sep 17, 2024
1 parent 4990578 commit 268da6a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ jobs:
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 build --build-arg VERSION=latest -t ${{ secrets.QUAY_PUBLIC_CLOUD_GOVERNANCE_REPOSITORY}}: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
sudo docker push ${{ secrets.QUAY_PUBLIC_CLOUD_GOVERNANCE_REPOSITORY}}:latest
echo 'Wait 30 sec till image will be updated in quay.io'
sleep 30
Expand All @@ -342,11 +342,11 @@ jobs:
run: |
pip install setuptools
version=$(python3 setup.py --version)
sudo docker build --build-arg VERSION=$version -t quay.io/${{ secrets.QAUYIO_REPOSITORY }}/${{ secrets.PACKAGE_NAME }}:v$version .
sudo docker build --build-arg VERSION=latest -t quay.io/${{ secrets.QAUYIO_REPOSITORY }}/${{ secrets.PACKAGE_NAME }}:latest .
sudo docker build --build-arg VERSION=$version -t ${{ secrets.QUAY_PRIVATE_CLOUD_GOVERNANCE_REPOSITORY }}:v$version .
sudo docker build --build-arg VERSION=latest -t ${{ secrets.QUAY_PRIVATE_CLOUD_GOVERNANCE_REPOSITORY}}:latest .
sudo docker login quay.io -u ${{ secrets.QAUYIO_ROBOT_USER }} -p ${{ secrets.QAUYIO_ROBOT_TOKEN }}
sudo docker push quay.io/${{ secrets.QAUYIO_REPOSITORY }}/${{ secrets.PACKAGE_NAME }}:v$version
sudo docker push quay.io/${{ secrets.QAUYIO_REPOSITORY }}/${{ secrets.PACKAGE_NAME }}:latest
sudo docker push ${{ secrets.QUAY_PRIVATE_CLOUD_GOVERNANCE_REPOSITORY}}:v$version
sudo docker push ${{ secrets.QUAY_PRIVATE_CLOUD_GOVERNANCE_REPOSITORY }}:latest
echo 'Wait 30 sec till image will be updated in quay.io'
sleep 30
Expand Down Expand Up @@ -380,7 +380,7 @@ jobs:
e2e:
name: e2e
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, bump_version, public_quay_upload, private_quay_upload ]
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, bump_version ]
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -394,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/${{ secrets.PACKAGE_NAME }}/${{ secrets.PACKAGE_NAME }}
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 ${{ secrets.QUAY_PUBLIC_CLOUD_GOVERNANCE_REPOSITORY }}
gitleaks:
name: gitleaks
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, bump_version, public_quay_upload, private_quay_upload ]
needs: [ unittest, terraform_apply, integration, pypi_upload, pypi_validate, bump_version ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -410,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/${{ secrets.PACKAGE_NAME }}/${{ secrets.PACKAGE_NAME }} > /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 ${{ secrets.QUAY_PUBLIC_CLOUD_GOVERNANCE_REPOSITORY }} > /dev/null

0 comments on commit 268da6a

Please sign in to comment.