I have a test.sh file which need to be run in an docker container which runs inside the Kubernetes pods via Jenkins job.
Flow:
Step1 : Run a Jenkins job which should login to a docker container running inside the pods
Step: From the container execute the test.sh script.
test.sh
echo "This is demo file"
I have a command which will give docker image running in a kubenertes pods
kubectl get pods -n eum -o go-template --template="{{range .items}}{{range .spec.containers}}{{.image}} {{end}}{{end}}" -l app=${TIER}
TIER = list of apps added in jenkins as choice parameter
I wanted to login to the container and run the test.sh script