I have a pipeline where in step 1, I build and deploy a docker container image to a private Google Cloud registry, updating the `:latest` tag. Then in step 2, I use a service based on the `:latest` tag for that very same image.
Does Pipelines guarantee that a custom service image tag will be pulled and instantiated for a step only after previous steps have completed?
Depending on the design of Pipelines, it's plausible that it could pull and run all services in parallel when a pipeline executes instead of accounting for the possibility that a step could alter a service for a later step. I'm not sure the documentation is clear on this particular point.
Haven't tested this for myself yet, but hopefully the question is interesting to others.
Thank you for reaching out to the community.
Yes, Docker images in services YAML configuration will be pulled at the beginning of a step.
The way how Pipelines spin up a step container is that it will first look for services configuration (in your step config) and create containers for each of those services. Once done, Pipelines will then link those services containers to your step container.
Once the entire Pipelines step is done running, all services containers including the step container will be terminated.
Your Pipelines configuration with building GCR is suitable for multi-steps as Step 1 should finish first before executing Step 2.
About your question, if Pipelines guarantee that a service image tag will be pulled and instantiated for a step only after previous steps have been completed, this is guaranteed while using the multi-steps configuration in your YAML file.
For the services running in parallel, it shouldn't alter your services containers for later steps as they're executed separately in each of your steps.
Hence, services in Step 1 should not alter or persist in Step 2.
Hope it helps and please don't hesitate to let me know if you have further questions that I can help with.
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events