wakaleo/jenkins-the-definitive-guide-book

Builds again and again while there is no change in git

Opened this issue · 1 comments

I followed the steps described in chapter 1 and 2 to learn about test results. Once I push the "screwed" game of live on the server, git pulls the changes and then turns the ball from blue to red due to the failing tests, just as the book says.

But every other minute it adds one more build, which obviously fails still, as the fix is not pushed to github so far. In fact, meanwhile I have lots of red balls meanwhile due to that.

Is this intended behaviour of your tutorial / Jenkins? The books should tell something about that, since that lots of (useless since unchanged) broken builds scares beginnes (at least: me).

I had a similar issue, but mine failed from the first, due to the way I had my git client configured. Checking the console output for a failed build I'd see an error where git is saying "I don't know who you are so I'm not letting you create a tag" and that would fail my build. I had to navigate to the workspace directory for the jenkins job and run the git config user.email and user.name commands there before the build would stop seeing changes. Of course, this doesn't explain why it would immediately schedule another build while the first one was running. I burned through about 60 failed builds in 30 minutes before getting my first success.

Note also, trying to set global user and email for the git plugin on the System configure page crashes Jenkins on save. I suspect both my issues were related to the git plugin more than the book.