-
Bug
-
Resolution: Unresolved
-
Blocker
-
Jenkins 1.235
When I tried to get container id of docker container, I am getting the whole command not just the output. I just want to get container id alone.
And it is working fine in earlier version - Docker Pipeline 1.17.
Command:
runArguments = --name "PR_POPWEB_Master-47-tests-1-mssql" --label ephemeral --label mssql --label "jenkins_job_name=PR_POPWEB_Master" --label "jenkins_build_id=47" -e sa_password="{password}" -e ACCEPT_EULA="Y" --mount type=volume,source=PR_POPWEB_Master-47-tests-1-mssql_volume,destination=C:\Sql_Backup\
def dockerImage = docker.image("microsoft/mssql-server-windows-developer:2016-sp1")
containerInfo.container = dockerImage.run(runArguments)
containerInfo.containerID = containerInfo.container.id
Error: Ideally, I should get below highlighted id alone. Instead I am getting {cmd} + {output}
E:\Jenkins\workspace\PR_POPWEB_Master>docker run -d --name "PR_POPWEB_Master-47-tests-1-mssql" --label ephemeral --label mssql --label "jenkins_job_name=PR_POPWEB_Master" --label "jenkins_build_id=47" -e sa_password="{password}" -e ACCEPT_EULA="Y" --mount type=volume,source=PR_POPWEB_Master-47-tests-1-mssql_volume,destination=C:\Sql_Backup\ microsoft/mssql-server-windows-developer:2016-sp1 0b5bdfbc710079b9d675def2a562b479662f96fd342ef920e0eb7fd575efd020