-
-
Notifications
You must be signed in to change notification settings - Fork 297
Jenkins not recognizing Tags? #736
-
To all:
I'm trying to get commitizen to auto-increment in our Jenkins file when it is being pushed to our DEV environment.
In the Jenkins file I have tried both of the following commands:
sh 'cz bump --no-verify'
sh 'cz bump'
However in Jenkins, I'm seeing the following error (with both cz bump and cz bump --no-verify)
16:42:00 + cz bump
16:42:01 Tag v1.0.0 could not be found.
16:42:01 Possible causes:
16:42:01 - version in configuration is not the current version
16:42:01 - tag_format is missing, check them using 'git tag --list'
However, when I check the tags it shows tha v1.0.0 exists.
(analytical-workspace-py3.8) C:\Python_Repository\analytical-workspace>git tag
v0.2.0
v1.0.0
The CHANGELOG.md file also appears to have the correct version:
## v1.0.0 (2023年05月03日)
### Feat
- Setting up Commitzen for auto-updating
As does the version number in my pyproject.toml file:
[tool.commitizen]
version = "1.0.0"
update_changelog_on_bump = true
check-consistency = true
allow-abort = false
name = "cz_conventional_commits"
tag_format = "v$major.$minor.$patch$prerelease"
Is there something I'm doing incorrectly that cz bump is not recognizing the tag that is there?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 3 replies
-
What happens when you run sh"git tag"
on your Jenkins? Also try on Jenkins sh"git branch"
to check under which branch you are.
Normally you have to add "Advanced clone behaviors" to your pipeline configuration:
- check out to local branch
- fetch tags
Beta Was this translation helpful? Give feedback.
All reactions
-
I added sh 'git tag'
and sh 'git branch'
before the sh 'cz bump'
statement
The sh 'git tag'
returned nothing (which makes sense given the error message)
However the sh 'git branch'
returned the correct branch
08:05:37 + git branch
08:05:37 * feature/PROS-63-automate-incrementation-of-analytical-workspace-versions
So it seems that it recognizes the correct branch, but for some reason, doesn't recognize the tags that exist for that branch. Since it recognizes the correct branch, would I really need to check out to the local branch?
Beta Was this translation helpful? Give feedback.
All reactions
-
If the branch is there, maybe you can skip the "checkout to local branch", but try the "fetch tags". The problem is not commitizen. It's your Jenkins which doesn't have the tags. I'm not able to help much further beyond that. Please let us know if you fix it
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks. We're investigating our our side,
Beta Was this translation helpful? Give feedback.