Calendar View for Jenkins jobs - jenkins

Is there a plugin to jenkins(hudson) that can visually show all jobs and there runs in future as well as in the past.
ex: if Job A is scheduled to run once every day at 8 AM. The plugin should show the previous run of the job as well as scheduled runs in the future.
I searched in Jenkins Plugins Link and found Google Calendar but there are two things different about this plugin
It is linked to job status hence I am presuming it will only show previous runs
It needs an online calendar account.

No, you would have to write such a plugin.

"Next executions" plugin helpful a bit:
https://wiki.jenkins-ci.org/display/JENKINS/Next+Executions

The plug-in calendar-view is doing what you are looking for.
Features as of version Version: 0.3.1:
Features
Provides a month, week and day view of past and future builds
Indicates status of past builds by color
Displays when future scheduled builds will happen
Shows estimated duration of future scheduled builds
Configurable date and time settings

Related

Continuous Integration in Jenkins, Test Cases from 2 Builds are stacking up

I have Continuous Integration Set up in Jenkins which is Triggered every time there is Code change, However if the change is done Frequently then the Test Cases from 2 Builds are stacking up. Is there a way to Cancel/Stop the Previous Builds Test Cases from Running, and just Continue with the latest Build
Try to use the 'Quiet Period' option. This is available from the 'Advanced' section of 'Configure'.
Here, you can specify how many seconds Jenkins should wait before actually starting its task after a commit has been made. So, if you provide 30 minutes (30*60 = 1800) as the quiet period, and you have made a commit at 8PM, Jenkins would wait till 8:30 PM before starting its task. In the meantime, if you make 2-3 more commits, they will be stacked together and considered during the 8:30 PM run.
Hope this helps

Is there a way in Jenkins to get "Number of hours in RED state" for a build?

Is there a jenkins plugin or native way to measure how many hours (in a day, week or month - whatever duration feasible) the build was RED for a job?
Background:
I am currently working with a team and promoting trunk based development. One thing that I want to measure to check if our efforts toward "Collective code ownership" works - No. of hours in RED state.
I don't want to measure number of RED builds but instead the duration of RED because breaking the build is not important to me, but fixing is.
you can probably write a python or shell script using jenkins rest api
http://localhost:8080/jenkins/job/test/api/json
will get you all the builds
http://localhost:8080/jenkins/job/test/1/api/json
will give you details of a particular build

TFS2013 Scheduled Builds: Manually triggered Builds are not being accounted for when Scheduled Build are kicked off

I'm having some trouble preventing a Scheduled Build from being automatically kicked off after the same build has been trigger manually and no changes are present.
Problem: The Build is scheduled to go out at 3am everyday but only if any changes have been made (the Settings option ‘Build even if nothing has changed since the previous build’ is Unchecked). The problem is that if you trigger a manual build and no changes are made afterwards, the Scheduled Build is still going to get triggered even if there are no changes. Please follow the scenario bellow for an example:
Scenario:
Scheduled build gets kicked off today at 3am - assembly version changes to 1.0.0.1
On the same day, several changes are checked-in before noon.
The same Build is kicked off manually at 1pm - assembly version changes to 1.0.0.2
No more check-ins are made after the manual build from 1pm
The next day at 3am the Scheduled build gets triggered which it shouldn't have (assembly version changes to 1.0.0.3) since there were no check-ins since 1pm (triggered manually).
It seems like the 1pm build is not even being considered and accounted for.
It looks like TFS is taking in count check-ins since the last “Scheduled Build” rather than “the last completed Build” (same build definition) which in this case was the manually triggered one.
So my question is: “Is there any way we can prevent TFS from triggering Scheduled build if there were no check-ins after a manual build has been kicked off?”
Currently, it looks like TFS does not have that option anywhere in the Build Definition
Thank you in advance
In order to do this you would need to write your own scheduler that checked the previous manual build for you. You could write a TfsJob for this or even as a a scheduled powershell that runs at the allotted time...
I ran into this issue today as well.
It seems this is currently "by design".
Someone else posted a suggestion to "fix" this here:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/5702884--build-even-if-nothing-has-changed-since-the-previ

Jenkins Trigger X minutes after last build

We have recently switched from CruiseControl.Net to Jenkins for managing our builds. With CCNET it would trigger a new build X minutes after the last one completed, but with Jenkins it is constantly dropping builds in the queue, not allowing any time in between the two. We'd prefer the CCNET method.
I don't see how this can be done with the Scheduler Trigger, it seems to be all date time based.
I don't see any setting to prevent Queueing another build where the build is currently running.
I don't see a trigger that would allow for timing based off last run.
How could I manage this?
Jenkins lets you set a quiet period between builds, which can be set at the system level and overridden at the job level. Here's the help text from Jenkins:
If set, a newly scheduled build waits for this many seconds before actually being built. This is useful for:
Collapsing multiple CVS change notification e-mails into one (some CVS changelog e-mail generation scripts generate multiple e-mails in quick succession when a commit spans across directories).
If your coding style is such that you commit one logical change in a few cvs/svn operations, then setting a longer quiet period would prevent Jenkins from building it prematurely and reporting a failure.
Throttling builds. If your Jenkins installation is too busy with too many builds, setting a longer quiet period can reduce the number of builds.
If not explicitly set at project-level, the system-wide default value is used.
And here is a more detailed discussion.

Jenkins Build Periodically - Once

I am trying to schedule a Jenkins Deployment task to run only once.
Why? So no one has to log in remotely to do after hours deployments (No Fun!)
So my question is: Is there a way to specify year within jenkins' cron syntax?
More info:
Under Build Triggers -> Build Periodically
If I schedule a build for today(Thursday, June 10th) at 10:52 AM
The cron syntax would be 52 10 10 6 2
However, the next June 10th will occur in the year 2025, so technically, the build will still be scheduled for 11 years from now, unless I manually remove the schedule.
This is not a huge problem, it just doesn't make sense to me someone hasn't come up with a solution for it yet.
I am not looking for hacks, scheduled tasks, or scripting... All of that would be more work then just manually removing the schedule. I would like to keep this completely inside of jenkins
If this is truly impossible, I will consider writing a plugin for this specific use-case.
Well after much digging I finally found it:
https://wiki.jenkins-ci.org/display/JENKINS/Schedule+Build+Plugin
It adds ^^ the schedule build button to all projects which provides a nice UI to set a date and time, instead of dealing with that ridiculous cron syntax.
Jenkins' Modo should be "There's a plugin for that"

Resources