Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bamboo build number being empty #1

Merged

Conversation

joheintz
Copy link
Contributor

@joheintz joheintz commented Jul 5, 2021

Hi there,
I noticed, that the field git.build.number was empty on our Bamboo (v7.2.3). After a bit of digging, I found that it has to do with the environment variables which the plugin is reading. It's reading bamboo.buildNumber and BAMBOO_BUILDNUMBER, however bamboo is only setting bamboo_buildNumber.
In the documentation (https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html#Bamboovariables-Systemvariables) under "System variables" it is explained that "Bamboo Variables" are converted to shell variables by converting any dot to an underscore. My understanding is that Bamboo Variables like "bamboo.buildNumber" are only substituted when used in a command or script task in Bamboo.

Contributor Checklist

  • Added relevant integration or unit tests to verify the changes
  • Update the Readme or any other documentation (including relevant Javadoc)
  • Ensured that tests pass locally: mvn clean package
  • Ensured that the code meets the current checkstyle coding style definition: mvn clean verify -Pcheckstyle -Dmaven.test.skip=true -B

Copy link
Contributor

@TheSnoozer TheSnoozer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
thank you for your contribution and doing the research where this comes from!
Indeed that sounds like the right place to make this adjustment.

Could you please take a brief look at the comment I left?
Besides that I think this good to be merged.

Thanks again for your contribution!

Copy link
Contributor

@TheSnoozer TheSnoozer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
thank you for your contribution and doing the research where this comes from!
Indeed that sounds like the right place to make this adjustment.

Could you please take a brief look at the comment I left?
Besides that I think this good to be merged.

Thanks again for your contribution!

@TheSnoozer TheSnoozer merged commit 7c9c75f into git-commit-id:master Jul 5, 2021
@TheSnoozer TheSnoozer added this to the 5.0.0 milestone Jul 7, 2021
@joheintz joheintz deleted the feature/fix_bamboo_build_number branch July 12, 2021 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants