I am doing CI/CD using openshift buildconfig. I am able to fetch the source code from git and successfully build the docker image and push to internal registry. I want to tag the image built with with build numbers based on Openshift Build config output labels are annotations. How to do that in the YAML, I am using docker build strategy.
output:
to:
kind: DockerImage
name: 'internal.registry.com/app_name/sample_app:<BUILD_NUMBER/NAME>'
Also once this is done, i want to update the image in deployment to get new version of app. Have anyone done such setup, Can anyone help me on this.