You can deploy builds using the latest successful build image instead of using a specific build number by tagging Pipelines builds as
Version and installation information
Product: Pipelines for Containers
Installation type: SaaS and on premises
To tag Pipelines builds as
latest to the build and deployment configuration for each container using the steps below.
Step one: Edit the build configuration
latest tag to your build configuration using the following steps.
In your project, under Containers, click on the Build Instructions (tool) icon for the container you'd like to make changes to.
Under build, edit the
docker logincommand to remove
-e $DISTELLI_DOCKER_EMAIL. This parameter is no longer recognized and might cause
docker loginto crash.
Under build, copy the last two commands (
docker push) and paste them to afterSuccess.
To tag the build image, edit afterSuccess and add the following:
echo "Tagging build $DISTELLI_BUILDNUM as latest" docker tag "$DISTELLI_DOCKER_REPO" "$DISTELLI_DOCKER_REPO:latest" docker push "$DISTELLI_DOCKER_REPO:latest"
Build the image.
Verify that the image has a build number and is tagged with
Step two: Edit the deployment configuration
latest tag to your deployment configuration using the following steps.
In your project, to to the right of your last successful deployment, click on the Deploy (rocket) icon, then click YAML.
Change the YAML's image line from
'image: <GIT HOST USER NAME/CONTAINER> : <BUILD NUBMBER>'
'image: <GIT HOST USER NAME/CONTAINER> : latest'
Your deployments are now configured to use the latest successfully build image.