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

Not possible to use local docker images in pipeline

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Version 1.2 of pipeline-model-definition-plugin changes the behavior of docker images. `docker pull` is now performed for docker images specified in `agent`. Previously this was not performed.

      This change affects use cases where the docker image only exists locally. It will obviously fail if `docker pull` is called.

      The change was introduced in https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/182

      The simple workaround is to patch the plugin to revert this change, but it would be nice to avoid that.

      Hopefully this could be reverted to old behavior or/and an option added for configuration.

        Attachments

          Issue Links

            Activity

            Hide
            johnson_xu Johnson Xu added a comment -

             I met same issue as Ryan Fitzsimon.

            When I set 'alwaysPull false' within stage block, it works fine as expect to use local image. However, if the same config is set within the top 'pipeline/agent' block, it still always do 'docker pull' and the local image does not work.

            Show
            johnson_xu Johnson Xu added a comment -  I met same issue as Ryan Fitzsimon . When I set 'alwaysPull false' within stage block, it works fine as expect to use local image. However, if the same config is set within the top 'pipeline/agent' block, it still always do 'docker pull' and the local image does not work.
            Hide
            abayer Andrew Bayer added a comment -

            Well, that was dumb on my part. Will get a fix up today or tomorrow. Sorry!

            Show
            abayer Andrew Bayer added a comment - Well, that was dumb on my part. Will get a fix up today or tomorrow. Sorry!
            Hide
            dcioiu Dan Cioiu added a comment -

            Hi Andrew Bayer,

            Any news on this regression?

            Show
            dcioiu Dan Cioiu added a comment - Hi Andrew Bayer , Any news on this regression?
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Segev Finer
            Path:
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/5c4946495236afe8c778b9662ffd754923a728e5
            Log:
            [FIXED JENKINS-47106] Support alwaysPull in the top level agent section

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Segev Finer Path: pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/5c4946495236afe8c778b9662ffd754923a728e5 Log: [FIXED JENKINS-47106] Support alwaysPull in the top level agent section
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/fa8ed8bb0861220ff36b730656dc12701ba86ffd
            Log:
            Merge pull request #254 from segevfiner/jenkins-47106-top-level-agent-local-image

            [FIXED JENKINS-47106] Support alwaysPull in the top level agent section

            Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/f5deef1255d0...fa8ed8bb0861

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/fa8ed8bb0861220ff36b730656dc12701ba86ffd Log: Merge pull request #254 from segevfiner/jenkins-47106-top-level-agent-local-image [FIXED JENKINS-47106] Support alwaysPull in the top level agent section Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/f5deef1255d0...fa8ed8bb0861

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                oysols Øystein Olsen
              • Votes:
                1 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: