Skip to content
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

Double push on git #292

Open
matteoturra opened this issue Feb 28, 2019 · 3 comments
Open

Double push on git #292

matteoturra opened this issue Feb 28, 2019 · 3 comments

Comments

@matteoturra
Copy link

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

@Hillkorn
Copy link
Collaborator

Hillkorn commented Mar 4, 2019

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

@nikosjenkins
Copy link

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

@rud
Copy link

rud commented Sep 20, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants