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

Make Bitbucket Server, Owner and repository environment variables for Bitbucket Team/Project based jobs

      It would be useful to make the Bitbucket Server URL, Project/Owner, and repository name variables that can be injected into build steps to be used.  For Pull Requests, the plugin already provides the CHANGE_* variables, but in addition it would be convenient if these other variables were made available.

       

      BITBUCKET_URL

      BITBUCKET_OWNER

      BITBUCKET_REPO

          [JENKINS-56690] Make Bitbucket Server, Owner and repository environment variables for Bitbucket Team/Project based jobs

          Nikolas Falco added a comment -

          BITBUCKET_URL is already provided by the GIT_URL

          Nikolas Falco added a comment - BITBUCKET_URL is already provided by the GIT_URL

          For on-premises Bitbucket, GIT_URL is something like "https://bitbucket.example/context-path/scm/owner-name/repository-name.git", suitable for Git operations but not for Bitbucket REST API calls; especially if GIT_URL may use the ssh protocol. I'm not sure what the reporter of this issue wanted as BITBUCKET_URL – perhaps just "https://bitbucket.example/context-path/"?

          Kalle Niemitalo added a comment - For on-premises Bitbucket, GIT_URL is something like "https://bitbucket.example/context-path/scm/owner-name/repository-name.git", suitable for Git operations but not for Bitbucket REST API calls; especially if GIT_URL may use the ssh protocol. I'm not sure what the reporter of this issue wanted as BITBUCKET_URL – perhaps just "https://bitbucket.example/context-path/"?

            nfalco Nikolas Falco
            petehayes Peter Hayes
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: