[
https://issues.apache.org/jira/browse/YETUS-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16750673#comment-16750673
]
Allen Wittenauer commented on YETUS-786:
----------------------------------------
This can be reproduced trivially:
{code}
pipeline {
agent {
docker {
image "alpine:latest"
}
}
stages {
stage ('env') {
steps {
sh '''
env
'''
}
}
}
}
{code}
> JENKINS_URL is not always populated in a pipeline docker agent
> --------------------------------------------------------------
>
> Key: YETUS-786
> URL: https://issues.apache.org/jira/browse/YETUS-786
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Affects Versions: 0.9.0
> Environment: Jenkins 2.161.1
> Docker Pipeline 1.17
> OS X
> Reporter: Allen Wittenauer
> Priority: Blocker
>
> After a lot of debugging, it appears that Jenkins doesn't always publish the
> JENKINS_URL env var when pipeline docker agents are used. Ironically,
> HUDSON_URL appears to be consistently defined in both freestyle and
> pipelines. We need to add code to jenkins.sh to work around this Jenkins bug.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)