Skip to content

Commit

Permalink
aj/verify poetry (#447)
Browse files Browse the repository at this point in the history
* feat: add poetry explicitly, test publish script in sandbox env

* fix: Include py before script

* feat: Ensure poetry is installed before publishing. Ensure CI_COMMIT_TAG present before publishing
  • Loading branch information
astuyve committed Mar 13, 2024
1 parent 7e1fa70 commit 6bccf3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ci/input_files/build.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ stages:
- virtualenv venv
- source venv/bin/activate
- pip install .[dev]
- pip install poetry

# This is for serverless framework
.install-node: &install-node
Expand Down Expand Up @@ -167,6 +168,7 @@ publish-pypi-package:
stage: publish
tags: ["arch:amd64"]
image: registry.ddbuild.io/images/docker:20.10-py3
before_script: *python-before-script
cache: []
rules:
- if: '$CI_COMMIT_TAG =~ /^v.*/'
Expand Down
8 changes: 8 additions & 0 deletions ci/publish_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ PYPI_TOKEN=$(aws ssm get-parameter \
--out text)
# Builds the lambda layer and upload to Pypi

if [ -z "$CI_COMMIT_TAG" ]; then
printf "[Error] No CI_COMMIT_TAG found.\n"
printf "Exiting script...\n"
exit 1
else
printf "Tag found in environment: $CI_COMMIT_TAG\n"
fi

# Clear previously built distributions
if [ -d "dist" ]; then
echo "Removing folder 'dist' to clear previously built distributions"
Expand Down

0 comments on commit 6bccf3b

Please sign in to comment.