From 5c47193f9a1ab2f70dd4005f07a299d9a87ce928 Mon Sep 17 00:00:00 2001 From: Aravindan Thulasinathan Date: Thu, 20 Mar 2025 22:15:48 -0700 Subject: [PATCH 1/6] upload to codeartifact --- .github/workflows/python-app.yml | 8 ++++++++ Makefile | 2 ++ code_crypt/metadata.py | 2 +- requirements.txt | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 23efc47..a75ce4f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -29,3 +29,11 @@ jobs: - name: Test run: | make test + - name: Upload to Codeartifact + run: | + export TWINE_USERNAME=aws + export TWINE_PASSWORD=`aws codeartifact get-authorization-token --domain nextdoor --query authorizationToken --output text --region us-west-2 --duration 900` + export TWINE_REPOSITORY_URL=`aws codeartifact get-repository-endpoint --domain nextdoor --domain-owner 364942603424 --region us-west-2 --repository dev-arvi --format pypi --query repositoryEndpoint --output text` + python setup.py sdist bdist_wheel + twine upload dist/* + diff --git a/Makefile b/Makefile index 00d99d0..8cb13ff 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,8 @@ test: venv install: python setup.py install +upload: + ############################################################################### # Development Environment Setup ############################################################################### diff --git a/code_crypt/metadata.py b/code_crypt/metadata.py index 1b1f298..d72673f 100644 --- a/code_crypt/metadata.py +++ b/code_crypt/metadata.py @@ -13,5 +13,5 @@ # Copyright 2017 Nextdoor.com, Inc -__version__ = "0.1.5" +__version__ = "0.1.6" __desc__ = "Code Crypt" diff --git a/requirements.txt b/requirements.txt index 84eb978..1d73055 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ boto3>=1.17.106,<2.0.0 cryptography>=36.0.2 # ugh... they use major versions mainly now +twine==6.1.0 +awscli==1.38.17 \ No newline at end of file From c67e5b5ac47e1179584fe429bb399af4d602c94b Mon Sep 17 00:00:00 2001 From: Aravindan Thulasinathan Date: Thu, 20 Mar 2025 22:50:59 -0700 Subject: [PATCH 2/6] upload to codeartifact --- .github/workflows/python-app.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index a75ce4f..0a4baaa 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -29,11 +29,11 @@ jobs: - name: Test run: | make test - - name: Upload to Codeartifact + - name: Build run: | - export TWINE_USERNAME=aws - export TWINE_PASSWORD=`aws codeartifact get-authorization-token --domain nextdoor --query authorizationToken --output text --region us-west-2 --duration 900` - export TWINE_REPOSITORY_URL=`aws codeartifact get-repository-endpoint --domain nextdoor --domain-owner 364942603424 --region us-west-2 --repository dev-arvi --format pypi --query repositoryEndpoint --output text` python setup.py sdist bdist_wheel - twine upload dist/* + - name: Publish + run: | + aws codeartifact login --tool twine --repository dev-arvi --domain nextdoor --domain-owner 364942603424 --region us-west-2 && + twine upload --repository codeartifact dist/* From aff5e5ac6d7def31413f8da12efeee246c5a4c04 Mon Sep 17 00:00:00 2001 From: Aravindan Thulasinathan Date: Thu, 20 Mar 2025 22:58:03 -0700 Subject: [PATCH 3/6] upload to codeartifact --- code_crypt/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_crypt/metadata.py b/code_crypt/metadata.py index d72673f..db140b2 100644 --- a/code_crypt/metadata.py +++ b/code_crypt/metadata.py @@ -13,5 +13,5 @@ # Copyright 2017 Nextdoor.com, Inc -__version__ = "0.1.6" +__version__ = "0.1.8_test" __desc__ = "Code Crypt" From 73f7735f6a6a48f94529c706b237f3b38bb7048f Mon Sep 17 00:00:00 2001 From: Aravindan Thulasinathan Date: Thu, 20 Mar 2025 23:01:59 -0700 Subject: [PATCH 4/6] upload to codeartifact --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0a4baaa..76830f2 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -35,5 +35,5 @@ jobs: - name: Publish run: | aws codeartifact login --tool twine --repository dev-arvi --domain nextdoor --domain-owner 364942603424 --region us-west-2 && - twine upload --repository codeartifact dist/* + twine upload --repository dev-arvi dist/* From 16df6190547945f501b3f65b8d63d7847088fc37 Mon Sep 17 00:00:00 2001 From: Aravindan Thulasinathan Date: Thu, 20 Mar 2025 23:07:45 -0700 Subject: [PATCH 5/6] upload to codeartifact --- .github/workflows/python-app.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 76830f2..7cca09e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -31,9 +31,8 @@ jobs: make test - name: Build run: | - python setup.py sdist bdist_wheel + python setup.py sdist bdist_wheel - name: Publish run: | - aws codeartifact login --tool twine --repository dev-arvi --domain nextdoor --domain-owner 364942603424 --region us-west-2 && - twine upload --repository dev-arvi dist/* + aws codeartifact login --tool twine --repository dev-arvi --domain nextdoor --domain-owner 364942603424 --region us-west-2 && twine upload --repository dev-arvi dist/* From ca5cd7f30c15cdbd4525be5ef526e30523589550 Mon Sep 17 00:00:00 2001 From: Aravindan Thulasinathan Date: Thu, 20 Mar 2025 23:09:06 -0700 Subject: [PATCH 6/6] upload to codeartifact --- code_crypt/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_crypt/metadata.py b/code_crypt/metadata.py index db140b2..ec062dc 100644 --- a/code_crypt/metadata.py +++ b/code_crypt/metadata.py @@ -13,5 +13,5 @@ # Copyright 2017 Nextdoor.com, Inc -__version__ = "0.1.8_test" +__version__ = "0.1.9_test" __desc__ = "Code Crypt"