'How to update a file using jenkins job

I have a jenkins Job that create an image and upload to dockerhub. The next step is to deploy a "pod" configuration to k8s.

I have the pod.yaml in my giy, but I need to update the image file according to the file name that was uploaded to docker hub.

The docker file name is based on a string + $build_num

What is the step that I need to create in order to update the file? The only thing I can think of is running sed



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source