Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

PR keys / environment variables are never set

Hey,

there are a few pull request related keys:

  • bamboo.repository.pr.key
  • bamboo.repository.pr.sourceBranch
  • bamboo.repository.pr.targetBranch

They are explained here:

https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html

In our instance they never get set. I tried to access them using the: 'set' or 'export' on the script running in the bamboo build setup but they are not there.

I've also tried to access them using:

echo ${bamboo.repository.pr.sourceBranch} but then I get:

${bamboo.planRepository.integrationBranch.branchName}: bad substitution

Probably related to https://jira.atlassian.com/browse/BAM-13017

What can I do in order to distinguish between:

  • develop (our master branch)
  • any-feature-branch (no PR yet made)
  • any-feature-branch (but with a PR active)

I have a hunch that all feature branches are treated as potential PRs as creating a PR from a normal branch never would rebuild that source code again.

Hope someone can help me!

Regards,

Joachim Schiele

1 answer

0 votes

I am having the same issue, with all your mentioned keys.

We have a specific plan to run linters and code decorators for BitBucket PRs, and while the jobs get created and triggered on PR creation, the metadata doesn't exist.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

170 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you