0
votes

I initially created YAML Config file with Image Name, Service and routes. First Time I imported this file in OpenShift web console and Deployment was successful.

My Docker Images are in Artifactory

The Image name in the YAML file is initially tagged with 1.0

Problem: Further, from TFS Release Pipeline I would like to run "oc rollout" command specifying image with latest tag.

How could I rollout futher latest images with new tags with OC rollout command or any other solution ?

I do not want to update YAML with image tag everytime for new deployment.

suggest some best practice

1

1 Answers

0
votes

How could I rollout futher latest images with new tags with OC rollout command or any other solution ?

You can use the oc tag command.

- oc tag <imagestreams>:<version> <imagestreams>:default

In the script above, the image tagged <version> is specified.

This will create a new imagestreamtag named default in the imagestream. The new tag directly refers to the image id that the default imagestreamtag pointed when you run the oc tag command.