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

Documentation missing for Declarative dockerfile agent with alternative Dockerfile name

    Details

    • Similar Issues:

      Description

      Similar to https://issues.jenkins-ci.org/browse/JENKINS-41668

      I'm unable to point Jenkins to my custom dockerfile named "Docker.build". I dont' want to put it in separate directory as it needs to be on top-level to catch some files with COPY and ADD commands.

       

      Ideally i'd be able to do something like:

       

      agent {
        dockerfile {
         name 'Dockerfile.build'
        }
      }

        Attachments

          Issue Links

            Activity

            Hide
            sheerun Adam Stankiewicz added a comment -

            And if it is possible, it is not documented at: https://jenkins.io/doc/book/pipeline/syntax/

            Show
            sheerun Adam Stankiewicz added a comment - And if it is possible, it is not documented at:  https://jenkins.io/doc/book/pipeline/syntax/
            Hide
            abayer Andrew Bayer added a comment -
            dockerfile {
              filename "Dockerfile.build"
            }
            

            That should work fine. Are you saying it doesn't?

            Show
            abayer Andrew Bayer added a comment - dockerfile { filename "Dockerfile.build" } That should work fine. Are you saying it doesn't?
            Hide
            sheerun Adam Stankiewicz added a comment - - edited

            I thought it should be "name". It isn't documented anywhere and particularly on neither  https://jenkins.io/doc/book/pipeline/syntax/ nor https://jenkins.io/doc/pipeline/steps/docker-workflow/ nor https://jenkins.io/doc/pipeline/steps/docker-slaves/ nor  https://jenkins.io/doc/pipeline/steps/ when seaching for "docker".

             

            Please treat this issue as documentation issue.

            Show
            sheerun Adam Stankiewicz added a comment - - edited I thought it should be "name". It isn't documented anywhere and particularly on neither   https://jenkins.io/doc/book/pipeline/syntax/  nor https://jenkins.io/doc/pipeline/steps/docker-workflow/  nor https://jenkins.io/doc/pipeline/steps/docker-slaves/  nor   https://jenkins.io/doc/pipeline/steps/  when seaching for "docker".   Please treat this issue as documentation issue.
            Hide
            abayer Andrew Bayer added a comment -

            Adam Stankiewicz - Got it - renamed the issue to fit the doc issue. Thanks!

            Show
            abayer Andrew Bayer added a comment - Adam Stankiewicz - Got it - renamed the issue to fit the doc issue. Thanks!
            Show
            abayer Andrew Bayer added a comment - Docs PR up at https://github.com/jenkins-infra/jenkins.io/pull/1291

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                sheerun Adam Stankiewicz
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: