Skip to content

Commit 6bccf3b

Browse files
authored
aj/verify poetry (#447)
* 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
1 parent 7e1fa70 commit 6bccf3b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ci/input_files/build.yaml.tpl

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ stages:
99
- virtualenv venv
1010
- source venv/bin/activate
1111
- pip install .[dev]
12+
- pip install poetry
1213

1314
# This is for serverless framework
1415
.install-node: &install-node
@@ -167,6 +168,7 @@ publish-pypi-package:
167168
stage: publish
168169
tags: ["arch:amd64"]
169170
image: registry.ddbuild.io/images/docker:20.10-py3
171+
before_script: *python-before-script
170172
cache: []
171173
rules:
172174
- if: '$CI_COMMIT_TAG =~ /^v.*/'

ci/publish_pypi.sh

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ PYPI_TOKEN=$(aws ssm get-parameter \
1313
--out text)
1414
# Builds the lambda layer and upload to Pypi
1515

16+
if [ -z "$CI_COMMIT_TAG" ]; then
17+
printf "[Error] No CI_COMMIT_TAG found.\n"
18+
printf "Exiting script...\n"
19+
exit 1
20+
else
21+
printf "Tag found in environment: $CI_COMMIT_TAG\n"
22+
fi
23+
1624
# Clear previously built distributions
1725
if [ -d "dist" ]; then
1826
echo "Removing folder 'dist' to clear previously built distributions"

0 commit comments

Comments
 (0)