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

Docker Pipeline plugin: dir property in the DSL agent dockerfile does not work when Jenkins master is Windows machine(backslash problem)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • None
    • Jenkins Master(Windows Server 2012), version 2.92
      docker-workflow-plugin 1.14
      Jenkins Slave(Debian 8), docker 17.09.0-ce
    • Pipeline - December

      I've tried to use docker agent via dockerfile property. But it seems it does not work when I use dir property like this:

      ```
      agent {
      dockerfile {
      dir "Docker/debian-6"
      label "docker"
      }
      }
      ```

      Caveat is that Jenkins Master machine is Windows Server 2012. I've took a look at pipeline.log artifact and see that docker-workflow-plugin use path with backslash.

      It's part of this pipeline.log:

      ```

      [Pipeline] withEnv

      [Pipeline] {

      [Pipeline] stage

      [Pipeline] { (Declarative: Agent Setup)

      [Pipeline] readFile

      [Pipeline] sh [ORG_SUBMODULE_TEST_1.0-RGUTA527APORVGDNZVI75RGUDPT4CP6FYZ65GVGMMHAULYZFWKMQ] Running shell script + docker build -t 3d071d6ed0f35961fba3596ce9e2d38536e0657a -f Docker/debian-6\Dockerfile Docker/debian-6 unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/user/jenkins/workspace/ORG_SUBMODULE_TEST_1.0-RGUTA527APORVGDNZVI75RGUDPT4CP6FYZ65GVGMMHAULYZFWKMQ/Docker/debian-6\Dockerfile: no such file or directory

      [Pipeline] }

      [Pipeline] // stage

      [Pipeline] }

      [Pipeline] // withEnv

      [Pipeline] }

      ```

            abayer Andrew Bayer
            olecsys Aleksandr Gamoskin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: