Skip to content

Commit

Permalink
fix: add DH login step to all jobs that pull images
Browse files Browse the repository at this point in the history
  • Loading branch information
daveqnet committed Oct 14, 2024
1 parent e2d8b63 commit 21119d9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
43 changes: 41 additions & 2 deletions .github/workflows/backend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
env:
IMAGE: ethyca/fides:local
DEFAULT_PYTHON_VERSION: "3.10.13"
# Docker auth with read-only permissions.
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_RO_TOKEN: ${{ secrets.DOCKER_RO_TOKEN }}

jobs:
###############
Expand Down Expand Up @@ -143,6 +146,12 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}

- name: Run Performance Tests
run: nox -s performance_tests

Expand Down Expand Up @@ -178,8 +187,8 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_RO_TOKEN }}
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}

- name: Run test suite
run: nox -s check_container_startup
Expand Down Expand Up @@ -219,6 +228,12 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}

- name: Run test suite
run: nox -s "${{ matrix.test_selection }}"

Expand Down Expand Up @@ -262,6 +277,12 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}

- name: Run test suite
run: nox -s "pytest(${{ matrix.test_selection }})"

Expand Down Expand Up @@ -302,6 +323,12 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}

- name: Run external test suite
run: nox -s "pytest(ctl-external)"
env:
Expand Down Expand Up @@ -342,6 +369,12 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}

- name: Integration Tests (External)
env:
BIGQUERY_DATASET: fidesopstest
Expand Down Expand Up @@ -419,6 +452,12 @@ jobs:
role: ${{ secrets.VAULT_ROLE }}
exportToken: True

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}

- name: SaaS Connector Tests
env:
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/cypress_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:

env:
CI: true
env:
# Docker auth with read-only permissions.
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_RO_TOKEN: ${{ secrets.DOCKER_RO_TOKEN }}

jobs:
Cypress-E2E:
Expand All @@ -33,8 +37,8 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_RO_TOKEN }}
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}

- name: Start test environment in the background
run: nox -s "fides_env(test)" -- keep_alive
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
- "*"

env:
DOCKER_USER: ethycaci
# Docker auth with read-write (publish) permissions. Set as env in workflow root as auth is required in multiple jobs.
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

jobs:
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
fetch-depth: 0 # This is required to properly tag images

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_TOKEN }}
Expand Down

0 comments on commit 21119d9

Please sign in to comment.