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

Please add repository URL to currentBuild environment variables for declarative pipeline builds

XMLWordPrintable

       I would like to have a release stage in my Jenkinsfile that only runs when it's checked out from the original repository. This is to avoid error messages on cloned repositories, because of missing keys etc. there.
       
      Please see my stackoverflow posting for more:
       
      https://stackoverflow.com/questions/56899602/is-it-possible-to-check-if-checked-out-from-a-specific-repository-in-a-jenkins-d
       
      As it looks from the responses this would be a feature request to have a solution that is independend of the version control system, because Jenkins itself knowns the version control system and the url. So it should be easily possible to mage the repository url availabe as currentBuild environment variable. Which will allow to have a release stage that only would be executed from the original repository.
       

            Unassigned Unassigned
            powerstat Kai Hofmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: