Uploaded image for project: 'Jenkins Website'
  1. Jenkins Website
  2. WEBSITE-440

Document environment variables used for URLs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Scope

      • Document in the "sending notifications" guided tour.
      • Variables refer to both the Blue Ocean and Classic URL schemes.

      Variables

      • RUN_DISPLAY_URL – links to the run result
      • RUN_CHANGES_DISPLAY_URL – links to the changes page for a run
      • JOB_DISPLAY_URL – links to the jobs homepage

      Original request
      I'm looking for something like $env.BUILD_URL but instead of pointing to the "old jenkins" I wanted it to be pointing to the new ui. (i.e. https://company.org/jenkins/blue/organizations/jenkins/project-folder%2Fproject-name/detail/PR-302/6/pipeline) 

      Is there some hidden variable I'm not seeing? Is there anyway to access the blueocean url in a groovy script, perhaps?

        Attachments

          Activity

          Hide
          jamesdumay James Dumay added a comment -

          Giles Gaskell could you please take a look at this one?

          Show
          jamesdumay James Dumay added a comment - Giles Gaskell could you please take a look at this one?
          Hide
          ggaskell Giles Gaskell added a comment - - edited

          Hi James Dumay (and fyi R. Tyler Croy),

          Sure thing! I have some questions before I begin addressing this task:

          1. Following on from what Giorgio mentioned above, would the best place to add the resources for these new environment variables be in https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/jenkins/model/CoreEnvironmentContributor/buildEnv.properties ? I suspect they are but I'm just wanting to confirm if a different plugin would be better. Otherwise, I'll add the new properties to this file.
          2. Within this directory, there are other sibling property files with translations in other languages. Is there currently a process in place for translating additions to the English property file across into the property files for the other languages?
          3. It looks like there isn't a page for any of these new + existing environment variables documented in the Jenkins User Documentation. I think it might be a good idea to add them there in a new page - if only manually for the time being. (Perhaps look at automating the page at some point in the future - similar to the steps reference material.)
            Anyway, unless I hear otherwise, I'll add this as a new page as part of addressing this task.
          Show
          ggaskell Giles Gaskell added a comment - - edited Hi James Dumay (and fyi R. Tyler Croy ), Sure thing! I have some questions before I begin addressing this task: Following on from what Giorgio mentioned above, would the best place to add the resources for these new environment variables be in https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/jenkins/model/CoreEnvironmentContributor/buildEnv.properties ? I suspect they are but I'm just wanting to confirm if a different plugin would be better. Otherwise, I'll add the new properties to this file. Within this directory, there are other sibling property files with translations in other languages. Is there currently a process in place for translating additions to the English property file across into the property files for the other languages? It looks like there isn't a page for any of these new + existing environment variables documented in the Jenkins User Documentation. I think it might be a good idea to add them there in a new page - if only manually for the time being. (Perhaps look at automating the page at some point in the future - similar to the steps reference material.) Anyway, unless I hear otherwise, I'll add this as a new page as part of addressing this task.
          Hide
          abayer Andrew Bayer added a comment -

          Looks like that's something that should be done in display-url-api since that's where those env vars are defined?

          Show
          abayer Andrew Bayer added a comment - Looks like that's something that should be done in display-url-api since that's where those env vars are defined?
          Hide
          jamesdumay James Dumay added a comment - - edited

          Andrew Bayer Jesse Glick what if we overrode BUILD_URL and JOB_URL to point to the paths provided by display URL api? See PR-18 (Giles Gaskell then there would be nothing to document)

          Show
          jamesdumay James Dumay added a comment - - edited Andrew Bayer Jesse Glick what if we overrode BUILD_URL and JOB_URL to point to the paths provided by display URL api? See PR-18 ( Giles Gaskell then there would be nothing to document)
          Hide
          ggaskell Giles Gaskell added a comment - - edited

          Thanks for that James Dumay. Will wait to hear back from Jesse Glick and Andrew Bayer about this.

          In the meantime, I'll also add a new page in the Jenkins User Documentation with a list of the environment variables (accompanied by more detailed descriptions if necessary) that come with a 'suggested plugins' installation of Jenkins. I'll also mention that there may be other variables which populate the list of environment variables in the Jenkins UI (by virtue of other plugins a manager may install into Jenkins).

          Reason - I think it's handy being able to see this information without having to be logged in to Jenkins.

          Show
          ggaskell Giles Gaskell added a comment - - edited Thanks for that James Dumay . Will wait to hear back from Jesse Glick and Andrew Bayer about this. In the meantime, I'll also add a new page in the Jenkins User Documentation with a list of the environment variables (accompanied by more detailed descriptions if necessary) that come with a 'suggested plugins' installation of Jenkins. I'll also mention that there may be other variables which populate the list of environment variables in the Jenkins UI (by virtue of other plugins a manager may install into Jenkins). Reason - I think it's handy being able to see this information without having to be logged in to Jenkins.

            People

            • Assignee:
              ggaskell Giles Gaskell
              Reporter:
              stodorov Steve Todorov
            • Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated: