-
Notifications
You must be signed in to change notification settings - Fork 301
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
Wrong properties values when building under Hudson #370
Comments
Hi,
CI builds are usually done in detached HEAD state (https://www.git-tower.com/learn/git/faq/detached-head-when-checkout-commit) and thus essentially make it impossible to know on what branch we are.The workaround trick that this plugin is doing to get the branch is to extract environment variables exposed by the CI-Build.
Does the configuration of
That sounds like Hudson is creating tags for each build and thus altering the local checkout of the clone. There should be a configuration (somewhere) in the job that controls if Hudson should create tags for each build (similar to http://www.benhallbenhall.com/2013/03/hudson-jenkins-create-git-tags-branches-automatically/).
You may (or may not) want to add From the Readme:
Whats the version you are using? :-) |
I'm closing this. since I don't see a particular issue within the plugin. |
The plugin is generating wrong values when running under Hudson. It works fine when I run it in my local machine.
It looks like it is related to the issue #325
Below is the generated git.properties with some comments.
First error:
git.branch is the commit hash of the HEAD of the branch. In my job the branch to build is configured as
**
(to build all the branches). If I fix a branch in this parameter it displays the branch name correctly.All these parameters are incorrect with the same value:
git.closest.tag, git.closest.tag.name, git.commit.id.describe
They have the exact same value that is in the Hudson env variable
BUILD_TAG
, that is: a fixed prefixhudson-
, concatenated with the job name + '-' + the build number.I'm using a very old Hudson version.
Below is my plugin configuration. I tried with as true and false and got the same (wrong) result.
It is a multimodule project, and this configuration is in the pom parent. All submodules generate their git.properties file.
I have the verbose output here and can send it by email if you wish. I don't want to post here some of my company info.
The text was updated successfully, but these errors were encountered: