I've configured a pipeline with python build and deployment, but my pip cache is not working
Here is my bitbucket-pipelines.yml
definitions:
steps:
- step: &pip-install
name: Install requirements
image: python:3.8.2
caches:
- pip
script:
- pip install -r requirements.txt --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org
- step: &cdk-deploy
caches:
- pip
script:
- pipe: docker://bancosmartbank/bitbucket-pipe-cdk-pix-stack:1.7
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_REGION: $AWS_REGION
ENV: $BITBUCKET_DEPLOYMENT_ENVIRONMENT
COMMAND: deploy
SERVICE: pix-stack-*
pipelines:
branches:
feature/*:
- step: *pip-install
- step:
<<: *cdk-deploy
name: Deploy Test
deployment: dev
After pip install -r requirements.txt the console shows me that the cache was found
<span>Cache "pip": Compressing<br></span><span>Cache "pip": Compressed in 1 seconds</span><span><br>Cache "pip": Uploading 35.8 MiB</span><span><br>Cache "pip": Uploaded in 2 seconds</span><span>Assembling contents of new cache 'pip'<br></span>
But on next step I've gotten this error
<span>Traceback (most recent call last):</span><span> <br>File "<a href="http://app.py" target="_blank" rel="noopener nofollow noreferrer">app.py</a>", line 3, in <module></span><span> <br>from aws_cdk import core<br></span><span>ModuleNotFoundError: No module named 'aws_cdk'<br></span><span>Subprocess exited with error 1</span> <span>CDK Bootstrap</span>