Praqma / pretested-integration-plugin

A generic pretest commit plugin for Jenkins CI
MIT License
7 stars 14 forks source link

Build failed if commit is already merged #19

Closed Andrey9kin closed 8 years ago

Andrey9kin commented 8 years ago

By the accident, I discovered the following bug - if you push existing commit to ready/something branch then pretested will fail with the message below. In this case, there is nothing to build and future steps should be skipped or more meaningful message should be provided to the user. I wasted 20 minutes to figure out what went wrong.

[PREINT] Collecting author of last commit on development branch [PREINT] Done colecting last commit author: Group ID A039453 a039453@vcn.ds.volvo.net 1464771049 +0200 [PREINT] Starting squash merge - without commit: [PREINT] merge --squash origin/ready/test

git merge --squash 2fd3486b07f6a24d0a5f70ef5451b114b70f89c8 # timeout=10 [PREINT] Squash merge done [PREINT] Merge was successful [PREINT] Starting to commit squash merge changes: [PREINT] Exception while committing. Logging exception msg: java.io.FileNotFoundException: /root/workspace/jenkins_as_a_code-review/.git/SQUASH_MSG (No such file or directory) [PREINT] - setUp() - IntegrationFailedException - Merge failure

buep commented 8 years ago

What do you mean by existing commit? You can't push the same commit twice?

Andrey9kin commented 8 years ago

@buep yes to the different branch. You can check out latest commit on master and push it to ready/test - that will reproduce the problem

buep commented 8 years ago

Right, but not a very common situation. Anyway the plugin should behave.

buep commented 8 years ago

Might be handled by #15 - this issue should start with writing a test to see if already solved.

buep commented 8 years ago

Please groom

praqma-thi commented 8 years ago

Yeah, this is a duplicate of #15.

These jobs now fail with the following message: SEVERE: [PREINT] Unable to commit changes. Most likely you are trying to integrate a change that was already integrated.

Nothing much to groom, I'd just close it a a duplicate.

praqma-thi commented 8 years ago

I'll go ahead and close it as a duplicate of #15.