jenkinsci / jenkinsci/git-plugin

[JENKINS-22581] Git Publisher - please allow ordering of actions

Open
#2,458 1 comment 0 reactions 0 assignees View on GitHub
component:git-plugin enhancement imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

Using the Git Publisher, in post-build Actions, Tags, Branches, Notes are only allowed in that order. It would be helpful if one could choose which action would occur in what order. I care because on occasion a user will commit to a branch that I wish to push at the end of a build, during the build execution. When this occurs, the publisher will rightly refuse to push changes in the clone because the clone is now out-of-date. This is all good. However, I also push a tag on successful builds. Because the tag gets pushed first, a tag is pushed, and then the branch push fails due to the aforementioned reason.

If I were able to attempt the branch push first, then it would fail in my example, and the tag push would never happen.

---
Originally reported by scottmarmit, imported from: Git Publisher - please allow ordering of actions


  • status: Open
  • priority: Major
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

Using the Git Publisher, in post-build Actions, Tags, Branches, Notes are only allowed in that order. It would be helpful if one could choose which action would occur in what order. I care because on occasion a user will commit to a branch that I wish to push at the end of a build, during the build execution. When this occurs, the publisher will rightly refuse to push changes in the clone because the clone is now out-of-date. This is all good. However, I also push a tag on successful builds. Because the tag gets pushed first, a tag is pushed, and then the branch push fails due to the aforementioned reason.

If I were able to attempt the branch push first, then it would fail in my example, and the tag push would never happen.

environment

```
Git Plugin 2.0.1

Jenkins 1.532.2
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.