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

HEAD instead of branch name in TeamCity #222

Open
guai opened this issue Jan 31, 2023 · 0 comments
Open

HEAD instead of branch name in TeamCity #222

guai opened this issue Jan 31, 2023 · 0 comments

Comments

@guai
Copy link

guai commented Jan 31, 2023

The code in BranchProperty class for branch detection in Teamcity won't work:

'TEAMCITY_VERSION' : ['teamcity.build.branch'], // https://confluence.jetbrains.com/display/TCD9/Predefined+Build+Parameters

teamcity does not set the branch name to any env by default. It have a teamcity.build.branch parameter though, which can be passed into the gradle explicitly. With something like -Dteamcity.build.branch=%teamcity.build.branch%
And then read via System.getProperty("teamcity.build.branch")

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

No branches or pull requests

1 participant