gradle-release icon indicating copy to clipboard operation
gradle-release copied to clipboard

Double push on git

Open matteoturra opened this issue 5 years ago • 3 comments

Environment:

  • Jenkins ver. 2.150.2
  • GitLab Plugin 1.5.11
  • Gitlab 11.8.0

The plugin push twice:

  • one for unsnapshot version: [Gradle Release Plugin] - pre tag commit: 'release/0.95'
  • one for new version: [Gradle Release Plugin] - new version commit: 'release/0.96-SNAPSHOT

This trigger two build on Jenkins pipeline.

Can I skip the first push, Jenkins already compiled this release. I know this plugin works on other scm like cvs/svn they don't distinguish commits and pushes.

I there any trick to let gitlab plugin to skip this pushes?

Thanks

matteoturra avatar Feb 28 '19 16:02 matteoturra

There is no way to skip certain pushes but you can disable git push completely and might do it inside the jenkins pipeline instead. You can use release.git.pushToRemote = false pushToRemote can be either the remote name or false

Hillkorn avatar Mar 04 '19 09:03 Hillkorn

Don't know how to do this in a pipeline, but you can tell Jenkins to avoid building pushes with certain commit messages. Since this one has a fixed message in it, it might work

nikosjenkins avatar Jun 27 '19 09:06 nikosjenkins

@Hillkorn sounds like an issue ready to close, though with some sadness?

rud avatar Sep 20 '19 13:09 rud