From 5873d315b8f4e39ed28b6cb10b7da7aa0d3de310 Mon Sep 17 00:00:00 2001 From: thomasht86 Date: Wed, 3 Jul 2024 11:14:32 +0200 Subject: [PATCH] paths --- .github/workflows/deploy-with-java.yml | 8 +++++--- .github/workflows/deploy_to_prod.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-with-java.yml b/.github/workflows/deploy-with-java.yml index 9b7b94ec..6e98c0b2 100644 --- a/.github/workflows/deploy-with-java.yml +++ b/.github/workflows/deploy-with-java.yml @@ -49,11 +49,13 @@ jobs: - name: Deploy to prod env: VESPA_TEAM_API_KEY: ${{ secrets.VESPA_TEAM_API_KEY }} + working-directory: tests/testapps/production-deployment-with-tests-java run: | - python .github/workflows/deploy_to_prod.py \ + # Run script from project root + python $GITHUB_WORKSPACE/.github/workflows/deploy_to_prod.py \ --tenant vespa-team \ --application testapp \ - --api-key "${VESPA_TEAM_API_KEY}" \ - --application-root tests/testapps/production-deployment-with-tests-java/target/ \ + --api-key ${VESPA_TEAM_API_KEY} \ + --application-root . \ --max-wait 3600 \ --source-url "$(git config --get remote.origin.url | sed 's+git@\(.*\):\(.*\)\.git+https://\1/\2+')/commit/$(git rev-parse HEAD)" diff --git a/.github/workflows/deploy_to_prod.py b/.github/workflows/deploy_to_prod.py index e632323d..2a412878 100644 --- a/.github/workflows/deploy_to_prod.py +++ b/.github/workflows/deploy_to_prod.py @@ -12,7 +12,7 @@ def deploy_prod( vespa_cloud = VespaCloud( tenant=tenant, application=application, - key_content=api_key.replace(r"\n", "\n"), + key_content=api_key, application_root=application_root, ) build_no = vespa_cloud.deploy_to_prod(application_root, source_url=source_url)