Skip to content

Commit

Permalink
gcloud artifacts list command returns list of one element with newest…
Browse files Browse the repository at this point in the history
… version of gcloud sdk. Pinning gcloud sdk version in workflow to latest (480.0.0) and altering command to extract the image tag
  • Loading branch information
erikvatt committed Jun 14, 2024
1 parent be12022 commit cbfd2e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
kubectl create secret generic github-app-secret --from-literal=test=test
kubectl create cm ca-bundle-pem --from-literal=test=test
kubectl apply -f ./tests-integration/dbt/k8s_resources
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: "480.0.0"
- name: Setup Airflow
env:
AIRFLOW_CONN_SQLITE_DEFAULT: sqlite://?mode=ro
Expand All @@ -69,12 +73,12 @@ jobs:
# envs
echo "AIRFLOW__CORE__DAGS_FOLDER=$(pwd)/tests-integration" >> $GITHUB_ENV
gitsync_tag=$(gcloud artifacts docker images list "$GIT_SYNC_IMAGE" --include-tags --sort-by=~Update_Time --limit=1 --format=json | jq -rc '.[0].tags')
gitsync_tag=$(gcloud artifacts docker images list "$GIT_SYNC_IMAGE" --include-tags --sort-by=~Update_Time --limit=1 --format=json | jq -rc '.[0].tags.[0]')
echo $gitsync_tag
echo "CLONE_REPO_IMAGE=ghcr.io/navikt/knada-git-sync/git-sync:$gitsync_tag" >> $GITHUB_ENV
echo $CLONE_REPO_IMAGE
dataverk_airflow_tag=$(gcloud artifacts docker images list "$DATAVERK_AIRFLOW_IMAGE_BASE_URL-${{ matrix.version}}" --include-tags --sort-by=~Update_Time --limit=1 --format=json | jq -rc '.[0].tags')
dataverk_airflow_tag=$(gcloud artifacts docker images list "$DATAVERK_AIRFLOW_IMAGE_BASE_URL-${{ matrix.version}}" --include-tags --sort-by=~Update_Time --limit=1 --format=json | jq -rc '.[0].tags.[0]')
echo "KNADA_AIRFLOW_OPERATOR_IMAGE=ghcr.io/navikt/knada-images/dataverk-airflow-python-${{ matrix.version }}:$dataverk_airflow_tag" >> $GITHUB_ENV
- name: Run tests Knada
env:
Expand Down

0 comments on commit cbfd2e2

Please sign in to comment.