Saturday, September 30, 2017

Tcl script started from jenkins turns the command to lowercase

Leave a Comment

I'm having a strange issue when running a tcl command in jenkins.

The tcl script has the following lines (pay attention to the uppercase I in Id):

foreach name $docker_names {   set name "TestName"   puts $name   set command "docker inspect --format='{{.Id}}' ${name} > /home/temp/id.txt"   send -- "$command\n"   expect "$" } 

In the jeknins log I see that the job fails because what is sent in the second iteration of the loop is the command above but in lowercase. I need the I in Id to be uppercase.

This is what is sent in the second iteration of the loop:

docker inspect --format='{{.id}}' testname > /home/temp/id.txt 

NOTE: In the first iteration, everything is sent correctly.

Anyone has an idea of why this is happening?

Thanks!

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment