It's all about the answers!

Ask a question

Build engine access Jenkins

dennys hsieh (2911519) | asked Nov 18 '13, 3:26 a.m.
edited Nov 18 '13, 4:11 a.m.
I can use Build engine to integrate Jenkins now. It works, but I have 2 questions
  1. Build engine needs an Jenkins account to access Jenkins, what's it's purpose? Because I found I need to input the username/password first time. And when the integration is ready, I can remove it and it still works.
  2. I found build engine access Jenkins every 15 seconds even we don't build anything. Because we'll have lots of projects, if every build engines access every 15 seconds, maybe it will be a problem.
And I created another build engine in RTC and found the frequence is 90 seconds, it's strange...

Accepted answer

permanent link
Heather Fraser-Dube (4512) | answered Nov 18 '13, 9:55 a.m.
The Build engine will need a Jenkins userid/password if you have secured your Jenkins server. Example: if the anonymous user doesn't have the ability to start builds or update projects (to add the buildResultUUID parameter) then you will want to configure a userid and password for the build engine. If your Jenkins server is open to all then no userid/password is required.

The Hudson/Jenkins server integration has a couple of tasks that run every 15 seconds by default. These tasks look for new build requests and monitor the requests in progress. The frequency at which they run is configurable from the server admin page (https://<your_server>/ ).

Essentially there is a build loop task that will look for new build requests and if there is one, it will ping the Jenkins server for the build engines allowed by the build definition to see if available and then to request the build. The second (build sync) task is a sync task and it will query Jenkins to see the state of any of the builds requested but not started. These are reasons you want the tasks to run frequently.

What you are likely seeing on the second engine though is pings to the Jenkins server when there are no builds on the go. The sync task also monitors all the Jenkins servers associated with RTC build engines to see their current state so it can be reflected in RTC whether the build engine is active or not. The build engine on the overview tab has a check box for "Monitor the last connect time" along with a default threshold of 3 minutes. If this is enabled, the sync task will ping the Jenkins server every threshold/2 minutes (3/2 = 90 seconds) to determine its availability for servicing requests.  You can turn this off or extend the time period if you want. Build requests for the build engine will still be processed (though you might get a warning in the RTC client that the engine doesn't appear to be active).
dennys hsieh selected this answer as the correct answer

dennys hsieh commented Nov 20 '13, 11:34 p.m.

Thanks, but could we centralize the username/password of Jazz RTC build engine? Because if we change the password in Jenkins, we need to change lots of Jazz RTC build engine, it's not very convenient. 

Heather Fraser-Dube commented Nov 21 '13, 8:20 a.m. | edited Nov 21 '13, 8:21 a.m.

Typically people have 1 Build Engine per Jenkins server (with multiple build definitions that can run on it), so there is just 1 place to change it. Why do you feel you need multiple RTC Build engines?

dennys hsieh commented Dec 18 '13, 1:10 a.m.

Because we found if we use multiple build definitions with only 1 build engine. And 2 build definitions are triggered at the same time. Only 1 build will be executed. Therefore, we build lots of build engines... 

Heather Fraser-Dube commented Dec 18 '13, 12:52 p.m.

With the Hudson/Jenkins integration the limit of concurrent builds running is determined by Hudson/Jenkins. The H/J builds are not "queued" on a build engine. The engine is primarily used to specify the Hudson/Jenkins instance to run on.

Your answer

Register or to post your answer.