1. Can't paste with formatting, sorry - I tried ..
2. Getting this error:
Configuration error
A step does not have the minimum resources needed to run (1024 MB). Services on the current step are consuming 7128 MB
How do I give some memory to my step 1? Couldn't find it anywhere explained. Tried to reduce from 7128 to 6000, getting the same error just with 6000 now. If anymore could point me in the right direction that would be helpful, thanks.
bitbucket-pipelines.yml
pipelines:
default: # TODO: add branches
- step:
name: ECR login script
image: python:3.7.3-alpine3.8
script:
- pip install awscli
- echo $(aws ecr get-login --no-include-email --region us-west-2) > ecr.sh
artifacts:
- ecr.sh
caches:
- pip
- step:
name: Build and push docker image
services:
- docker
size: 2x
script:
# TODO: should be prod ECR
- docker build --tag <image>:$BITBUCKET_COMMIT .
- export AWS_ACCESS_KEY_ID=<access key>
- sh ecr.sh
- docker push <image>:$BITBUCKET_COMMIT
caches:
- docker
options:
docker: true
definitions:
services:
docker:
# https://confluence.atlassian.com/bitbucket/use-services-and-databases-in-bitbucket-pipelines-874786688.html#UseservicesanddatabasesinBitbucketPipelines-Servicememorylimits
memory: 7128