From 28da38c96f4469617b352b3e2ee0af3b58ebd96f Mon Sep 17 00:00:00 2001 From: Ivan Topolcic Date: Wed, 9 Nov 2022 13:10:15 -0500 Subject: [PATCH 1/3] Modify PyPI to use token for publishing --- scripts/pypi.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/pypi.sh b/scripts/pypi.sh index 9d8592c0..6abe685f 100755 --- a/scripts/pypi.sh +++ b/scripts/pypi.sh @@ -14,6 +14,9 @@ if [ -d "dist" ]; then rm -rf dist; fi -# Publish to pypi -poetry publish --build +echo "Please enter the PyPI token (password) for datadog-lambda-python" +echo "This can be found in 1password under the shared-serverless vault" +read -p "Token name: " TOKEN +# Publish to pypi +poetry publish --build --username __token__ --password $TOKEN From 0ecf7e2cb73fb4608b4c8e11928725204b8aced1 Mon Sep 17 00:00:00 2001 From: Ivan Topolcic Date: Wed, 9 Nov 2022 13:26:01 -0500 Subject: [PATCH 2/3] Make message more clear --- scripts/publish_prod.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish_prod.sh b/scripts/publish_prod.sh index 845cddb3..f9112393 100755 --- a/scripts/publish_prod.sh +++ b/scripts/publish_prod.sh @@ -37,7 +37,7 @@ AWS_PROFILE=govcloud-us1-fed-human-engineering aws sts get-caller-identity aws-vault exec prod-engineering -- aws sts get-caller-identity # Ensure pypi registry access -read -p "Do you have the PyPi login credentials for datadog account (y/n)?" CONT +read -p "Do you have access to the serverless shared vault in 1Password (y/n)?" CONT if [ "$CONT" != "y" ]; then echo "Exiting" exit 1 From 5cf4ef9c8326dcb26d7b6c4feb9fa405c3a8746a Mon Sep 17 00:00:00 2001 From: Ivan Topolcic Date: Mon, 14 Nov 2022 10:34:50 -0500 Subject: [PATCH 3/3] Modify message --- scripts/publish_prod.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish_prod.sh b/scripts/publish_prod.sh index f9112393..fdc4c9d6 100755 --- a/scripts/publish_prod.sh +++ b/scripts/publish_prod.sh @@ -37,7 +37,7 @@ AWS_PROFILE=govcloud-us1-fed-human-engineering aws sts get-caller-identity aws-vault exec prod-engineering -- aws sts get-caller-identity # Ensure pypi registry access -read -p "Do you have access to the serverless shared vault in 1Password (y/n)?" CONT +read -p "Do you have access to PyPI (y/n)?" CONT if [ "$CONT" != "y" ]; then echo "Exiting" exit 1