-
Notifications
You must be signed in to change notification settings - Fork 40
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
Incorrect VERSION_DISPLAY #41
Comments
Hi, I'll try to reproduce this in an integration test. Thanks for reporting! |
I am experiencing similar behavior. It might be related to the way GitLab CI/CD pipelines work. When running pipelines on tags the value of
My best guess is that this plugin is seeing that
For the moment I am using this workaround:
|
I think that your workaround is a pretty valid one. If the working copy, for one reason or the other, cannot be used to extract (easily) some versioning information and if your CI environment already provides you with an information you can use, just go for it. The question is: do you need something else from the working copy? Using some regex in the |
@dcoraboeuf thanks for the follow up and for sharing this plug-in. I am just getting started with Gradle and Groovy so I can't promise anything, but I will take a stab at it. I am also not 100% sure that my suggestion will actually fix the problem. I think that having the version number as the branch name might cause the branch name parsing to fail. I will try and find some time in the next few days to test some things out. The workaround seems to be good enough for now; mostly I just wanted to share it in case others had the same problem. |
Hi! |
Hi, I assume you're somehow using the
I'm not very familiar with GitLab CI but can't you get the branch name and not the tag? |
Hello,
I m running nemerosa plugin (v 2.6.0) with gitlab runner and have faced the problem with VERSION_DISPLAY.
Configuration:
versioning {
branchEnv = ['CI_COMMIT_REF_NAME']
releaseMode = 'snapshot'
}
version = versioning.info.display
Steps to reproduce the problem:
[version] branch = release/1.3
[version] branchType = release
[version] branchId = release-1.3
[version] full = release-1.3-hash_of_the_commit
[version] base = 1.3
[version] display = 1.3.0-SNAPSHOT
[version] tag =
[version] dirty = false
)
EXPECTATION: (based on the documentation)
[version] branch = release/1.3
[version] branchType = release
[version] branchId = release-1.3
[version] full = release-1.3-hash_of_the_commit
[version] base = 1.3
[version] display = 1.3.0
[version] tag = 1.3.0
[version] dirty = false
ACTUAL RESULT:
[version] branch = 1.3.0
[version] branchType = 1.3.0
[version] branchId = 1.3.0
[version] full = 1.3.0-hash_of_the_commit
[version] base =
[version] display = 1.3.0-hash_of_the_commit
[version] tag = 1.3.0
[version] dirty = false
You can also see that something wrong happens to the branch name, type and id.
Have i maybe misconfigured the plugin? Or doing something very wrong?
The text was updated successfully, but these errors were encountered: