Hello, I have configured a bitbucket pipeline to install AWS CLI, login to ECR, build an image, and push it to ECR. This pipeline will be almost identical for another 20 or so repositories. So it would be nice to refactor all those steps into our own container. What I'm not sure is whether the docker image build step is possible. Basically we would have:
image: private-image:tag
- login stuff
pipelines:
default:
- step:
services:
- docker
script:
- VAR_A=...
- run script from private-image
and the script in private-image would do everything:
- login to ECR
- build image
- push image to ECR
It is not clear to me, based on documentation, whether the script is run inside private-image or yet a separate image (I saw docs saying that each "step" is run in a separate docker image).
Any help much appreciated!