Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63032

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            alavudeen_rafiq Alavudeen Rafiq
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: