Skip to content

Commit

Permalink
DAN-726 Use python version 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikVWT committed Nov 11, 2020
1 parent c3d4a7c commit 8f94d11
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,24 @@ steps:
source "$$VENV"/bin/activate
twine check dist/*
# Publish package when tagged
- name: gcr.io/cloud-builders/gcloud
entrypoint: bash
args:
- -c
- |
echo "user=$(gcloud secrets versions access latest --secret="$PROJECT_ID"-username)" >> pypi.txt
echo "password=$(gcloud secrets versions access latest --secret="$PROJECT_ID"-password)" >> pypi.txt
echo "repo=$(gcloud secrets versions access latest --secret="$PROJECT_ID"-repo)" >> pypi.txt
# Publish package when tagged
- name: python:3.7.5-slim
entrypoint: bash
args:
- -c
- |
source pypi.txt
if [[ -n "$TAG_NAME" ]]
then
USERNAME=$(gcloud secrets versions access latest --secret="$PROJECT_ID"-username)
PASSWORD=$(gcloud secrets versions access latest --secret="$PROJECT_ID"-password)
REPO=$(gcloud secrets versions access latest --secret="$PROJECT_ID"-repo)
source "$$VENV"/bin/activate
twine upload -r "$$REPO" dist/* -u "$$USERNAME" -p "$$PASSWORD"
twine upload -r "$${url}" dist/* -u "$${user}" -p "$${password}"
fi

0 comments on commit 8f94d11

Please sign in to comment.