-
I am pushing branch and tag in a single operation and build is fired as expected:
git checkout -b release/1.1.x touch newfile git add newfile git commit -m "new commit" git tag v1.1.0 git push origin v1.1.0:v1.1.0 release/1.1.x:release/1.1.x -
Ok sorry. I checked the workflow again and I missed some critical detail. I sometimes push the tag without the release branch being pushed first.
I use a UI app, either SourceTree or Fork (both macOS), and when you create a tag the dialog window has a checkbox to push the tag. So the order is
- create branch release/1.0.x
- create tag 1.0.0 but forgot to uncheck the "push tag" checkbox. OneDev will receive the tag but doesn't know the branch yet
- push the release/1.0.x branch. The UI app has a dialog window with a checkbox "push all tags" which is always checked. So in this step OneDev will receive the new release branch and the already known tag 1.0.0
So in step 2 OneDev doesn't know the release branch and in step 3 the tag 1.0.0 isn't new/created. Thus no build is triggered. Logical but unfortunate.
Maybe OneDev can recognize step 3? E.g. if the branch is new and the tag isn't new but the tag is on that newly created branch, then trigger the build as well?
-
Previous Value Current Value Open
Closed
-
For the second push of the tag, since the tag already exists, and associated commit is not changing, git hooks will not be triggered and hence build will not be triggered.
| Type |
Bug
|
| Priority |
Minor
|
| Assignee | |
| Affected Versions |
11.6.3
|
| Labels |
No labels
|
I have a release build defined that executes on branches
release/*once a tag has been created. It generally works but there is a little quirk in OneDev that I sometimes run into. I use semantic versioning and thus new branches will be created whenever the minor or major version number changes. So the branches are namedrelease/1.1.xfor example.Whenever I create a new release that requires a new branch I usually create that branch locally and add a tag. Then I have two choices:
The release build only triggers if I do the second approach but sometimes I forget about this quirk and use the first approach and then wondering why no build has occurred.
Maybe there is a way to detect the first approach and execute the build if trigger
When create tags on branches 'release/*'is used.