Is it possible to setup multiple steps and download a container from previous step, so you don't have to build the container again?
Current scenario:
So in a publish step, I only want to upload the pre-built container from the build step, so I can upload the relevant container registry.
Why? Because the pipeline triggers during a pull request, even when the triggers are set like:
trigger: - master - release/*
I imagine something like this:
jobs: - job: build_and_tests steps: - script: docker build --no-cache -t {...} displayName: 'Building dockerfile' ... ... ... # upload docker **container** to artifacts? - job: build_and_publish dependsOn: build_and_tests condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) ) steps: # - download: download the docker **container** from previous job step? - script: docker login -u $(registryUser) -p $(registryPassword) $(registryName) displayName: 'Login to ACR' ... ... ...
The # marks my imagination :) Any ideas?