Daniel P
Daniel P

Reputation: 150

jenkins builds the same project several times

I'm learning Jenkins, I've configured one simple project that only gets a git repository. I click on "Build Now" button, and Jenkins, start a new task, after finished that task, it starts a new task and so. Is it normal? Isn't supposed that after finishing that task it shouldn't start over? How do I fix it?enter image description here

Upvotes: 0

Views: 172

Answers (1)

JRichardsz
JRichardsz

Reputation: 16495

Build now is when your project does not have parameters. So users click in the Build now button and as nothing is displayed, users perform a click again and again several times in the same Build now button.

As a result of this ,Jenkins launch several builds. And if build is so fast, nothing change in the screen.

  • A quick fix is put a sleep(milliseconds) in the job in order to delay the build execution and jenkins will show a progress bar:

enter image description here

  • Other fix is configure one dummy parameter like : notes, reason, date, etc so users will be forced to enter the parameter value and preventing quickly clicks in build button.

Upvotes: 1

Related Questions