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

JENKINS_URL is not always populated in a pipeline docker agent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: docker, pipeline
    • Labels:
      None
    • Environment:
      Jenkins 2.161.1
      Docker Pipeline 1.17
      OS X
    • Similar Issues:

      Description

      The JENKINS_URL env var when pipeline docker agents are used appears to be missing. HUDSON_URL is defined. 
       

        Attachments

          Activity

          _a__w_ Allen Wittenauer created issue -
          Hide
          _a__w_ Allen Wittenauer added a comment - - edited

          To reproduce:

          pipeline {
              agent {
                  docker {
                      image "alpine:latest"
                  }
              }
              
              stages {
                  stage ('env') {
                      steps {
                          sh '''
                          env
                          '''
                      }
                  }
              }
          }
          

           
           
          Note that JENKINS_URL is missing in the output.

          Show
          _a__w_ Allen Wittenauer added a comment - - edited To reproduce: pipeline { agent { docker { image "alpine:latest" } } stages { stage ( 'env' ) { steps { sh ''' env ''' } } } }     Note that JENKINS_URL is missing in the output.
          abayer Andrew Bayer made changes -
          Field Original Value New Value
          Assignee Carlos Sanchez [ csanchez ] Andrew Bayer [ abayer ]

            People

            • Assignee:
              abayer Andrew Bayer
              Reporter:
              _a__w_ Allen Wittenauer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: