Skip to content

Commit 32993f0

Browse files
author
Taniya Mathur
committed
Fix pipeline Poetry virtual environment conflict
- Separate cli-smoketest into independent Makefile target - Update buildspec to run cli-smoketest after uninstall - Resolve ModuleNotFoundError by isolating pip install from poetry run - Add target existence check to prevent build failures
1 parent 43e9f8c commit 32993f0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scripts/sdlc/cfn/codepipeline-s3.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ Resources:
171171
finally:
172172
- echo "Running cleanup regardless of build result..."
173173
- make uninstall -e IDP_CFN_PREFIX=$IDP_CFN_PREFIX || echo "Cleanup failed but continuing"
174+
- make -n cli-smoketest >/dev/null 2>&1 && make cli-smoketest -e IDP_CFN_PREFIX=$IDP_CFN_PREFIX || echo "CLI smoketest target not found, skipping"
174175
175176
DeploymentPipeline:
176177
Type: 'AWS::CodePipeline::Pipeline'

scripts/sdlc/idp-cli/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ uninstall:
3939
cd $(IDP_CWD) && python3 scripts/cleanup-logs.py || echo "Log cleanup failed but continuing"
4040

4141
smoketest:
42+
poetry run idpcli smoketest \
43+
--stack-name-prefix=$(IDP_CFN_PREFIX) \
44+
--file-path="../../../samples/lending_package.pdf"
45+
46+
cli-smoketest:
4247
poetry run idpcli idp-cli-smoketest \
4348
--cfn-prefix=$(IDP_CFN_PREFIX) \
4449
--admin-email=$(IDP_ADMIN_EMAIL) \
4550
--account-id=$(IDP_ACCOUNT_ID) \
4651
--cwd=$(IDP_CWD)
47-
poetry run idpcli smoketest \
48-
--stack-name-prefix=$(IDP_CFN_PREFIX) \
49-
--file-path="../../../samples/lending_package.pdf"
5052

5153

5254
wait:

0 commit comments

Comments
 (0)