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

Document environment variables used for URLs

    XMLWordPrintable

Details

    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

          jamesdumay James Dumay added a comment -

          ggaskell could you please take a look at this one?

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

          Hi jamesdumay (and fyi rtyler),

          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.
          ggaskell Giles Gaskell added a comment - - edited Hi jamesdumay (and fyi rtyler ), 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.
          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?

          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?
          jamesdumay James Dumay added a comment - - edited

          abayer jglick what if we overrode BUILD_URL and JOB_URL to point to the paths provided by display URL api? See PR-18 (ggaskell then there would be nothing to document)

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

          Thanks for that jamesdumay. Will wait to hear back from jglick and abayer 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.

          ggaskell Giles Gaskell added a comment - - edited Thanks for that jamesdumay . Will wait to hear back from jglick and abayer 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

            Unassigned Unassigned
            stodorov Steve Todorov
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: