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

Variables not being substituted in github URLs for $JOB_NAME

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • github-plugin
    • Jenkins1.594, GitHub plugin 1.10

      The release notes for 1.10 github plugin mention that it now supports variable substitution.

      But that seems not to work, at least for the value of "JOB_NAME"

      We name our Jenkins projects based on the github project name, and that allows us to setup a template with the following url for the project on github:

      https://github.com/mycompany/$JOB_NAME/

      But, when you click on the GitHub link in the left hand notification, the link is still to /$JOB_NAME/ – not the actual substituted name of the job.

          [JENKINS-26886] Variables not being substituted in github URLs for $JOB_NAME

          Greg Smith created issue -
          Kanstantsin Shautsou made changes -
          Link New: This issue is related to JENKINS-27692 [ JENKINS-27692 ]

          Have you tried

           ${JOB_NAME} 
          

          ?

          Kanstantsin Shautsou added a comment - Have you tried ${JOB_NAME} ?

          This var substitution works only in some context with environment. This context is usually build. So when there is no any context, variable substitution can't work. I can think about replacing some of variables, but it will be not all of defined in build scope

          Kirill Merkushev added a comment - This var substitution works only in some context with environment. This context is usually build. So when there is no any context, variable substitution can't work. I can think about replacing some of variables, but it will be not all of defined in build scope
          Kirill Merkushev made changes -
          Link Original: This issue is related to JENKINS-27692 [ JENKINS-27692 ]

          No replies - closing.

          Kanstantsin Shautsou added a comment - No replies - closing.
          Kanstantsin Shautsou made changes -
          Resolution New: Incomplete [ 4 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 161064 ] New: JNJira + In-Review [ 196625 ]

          Laurent TOURREAU added a comment - - edited

          I reopen this issue because i have a similar problem with GitHub plugin 1.25.1 / Jenkins 2.32.1
          I create a Jenkins variable environment on System configuration screen:
          GITHUB_BASE_URL = https://mygihubentrepriseurl.com

          On Project Url field in my job i enter this value :
          ${GITHUB_BASE_URL}/MyOrg/MyProject

          Result : On the left pane of job page the GitHub button points to the job page URL instead of pointing to GitHub URL i mentionned on the Project URL field.

          What's wrong?

          Laurent TOURREAU added a comment - - edited I reopen this issue because i have a similar problem with GitHub plugin 1.25.1 / Jenkins 2.32.1 I create a Jenkins variable environment on System configuration screen: GITHUB_BASE_URL = https://mygihubentrepriseurl.com On Project Url field in my job i enter this value : ${GITHUB_BASE_URL}/MyOrg/MyProject Result : On the left pane of job page the GitHub button points to the job page URL instead of pointing to GitHub URL i mentionned on the Project URL field. What's wrong?
          Laurent TOURREAU made changes -
          Resolution Original: Incomplete [ 4 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            gregcovertsmith Greg Smith
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: