Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ jobs:
with:
java-version: default
python-version: ${{ matrix.python_version }}
- name: Authenticate to GCP
uses: google-github-actions/auth@v3
with:
service_account: ${{ secrets.GCP_SA_EMAIL }}
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v3
- name: Configure Docker auth for GCR
run: |
gcloud --quiet auth configure-docker us.gcr.io
gcloud --quiet auth configure-docker gcr.io
gcloud auth list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're already doing these steps in run_validatescontainer.sh, do we need it here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The working workflow has docker auth steps so I followed that pattern as the failure was unauthorized authentication failed when the Python test called docker push, so I wanted to ensure auth was set up early
But you ae right that it's redundant, I will modify it

- name: Set PY_VER_CLEAN
id: set_py_ver_clean
run: |
Expand Down
5 changes: 5 additions & 0 deletions sdks/python/container/run_validatescontainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ echo ">>> Successfully built and push container $CONTAINER"
cd sdks/python
SDK_LOCATION=$2

echo ">>> Configuring Docker authentication for GCR"
gcloud --quiet auth configure-docker us.gcr.io
gcloud --quiet auth configure-docker gcr.io
gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://us.gcr.io

echo ">>> RUNNING DATAFLOW RUNNER VALIDATESCONTAINER TEST"
pytest -o log_cli=True -o log_level=Info -o junit_suite_name=$IMAGE_NAME \
-m=it_validatescontainer \
Expand Down
Loading