Docker Pipeline v1.23 misbehaves - returns the whole command not just the output

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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

            Assignee:
            Unassigned
            Reporter:
            Alavudeen Rafiq
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: