Hi, I am following some tutorials and exercised that use kubernetesDeploy plugin as follows:
kubernetesDeploy(
kubeconfigId: 'kubeconfig',
configs: 'train-schedule-kube.yml',
enableConfigSubstitution: true
)
I wanted to add it to my jenkins environment but it seems that it is not available anymore. In the pipeline, I can/need to call directly
kubectl apply -f train-schedule-kube.yml
inside train-schedule-kube.yml There are 2 variables to be replaced by values declared globally in the pipeline so the plugin was taking care of this but if I use
kubectl apply -f train-schedule-kube.yml, my kubernetes cluster try to create the pods but it fails because it cant replace the following in the yml file
containers:
- name: train-schedule
image: $DOCKER_IMAGE_NAME:$BUILD_NUMBER
which was taken car of by the suspended plugin through the parameter
enableConfigSubstitution: true
so how can I achieve this without the plugin or maybe is there another plugin that can do the job?
Thanks in advance