Hi, I am using the Pipeline to automate our builds and I've been struggling with the usage of steps and images. I am aware that I can keep generated files between steps using the artifacts option, but I can't seem to figure out how to keep docker images between steps.
My setup is currently like this:
pipelines:
custom:
dev:
- step:
script:
- # docker build
- # push to GCR
- # push to AWS ECR
What I want is something like:
pipelines:
custom:
dev:
- step:
script:
- # docker build
artifacts:
- dist/**
- step:
script:
- # push to GCR
- step:
script:
- # push to AWS ECR
Assume my credential configs are correct.
The problem is, tags created during the first step are not available on the next steps. So if I run docker build -t ${aws_ur}:${BITBUCKET_COMMIT} on the first step and then run docker push ${aws_url} on the last step the image will not exist (same for second step).
Am I doing something wrong (maybe the artifacts folder is wrong) or is there a way to do this?
Thanks in advance.