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

"No such property: JENKINS_URL" on cron-triggered job, resolved by manual trigger

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core, pipeline
    • None
    • Jenkins 2.176.2
      See attached plugins.txt

      I have a multi-branch pipeline with the following as the first line, outside of pipeline:

      JENKINS_HOST = JENKINS_URL.toURL().host.tokenize('.')[0]
      

      This value is used inside the pipeline.

      The pipeline generally works but, apparently at random, builds will fail with the following exception:

      groovy.lang.MissingPropertyException: No such property: JENKINS_URL for class: groovy.lang.Binding
      

      See consoleText for a redacted console log including the stack trace.

      This has only been observed on cron-triggered builds: manually building the job, or rebuilding a failed job, works fine.

      The pipeline defines some parameters, I'm not sure if that's relevant.

            Unassigned Unassigned
            allanlewis_youview Allan Lewis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: