Developer Zone

Advanced Software Development with MATLAB

Kick the Buckets

OK, quick follow up to last post. Having a parameterized build is great, but it presents us with one problem. I can guarantee you I will pretty much never click the button to kick off builds manually for other parameters.

Well, never fear since you can use the parameterized scheduler plugin to get that additional feature. This will allow you to still have the build parameters as specified with one default build, but then you can schedule additional values based on the cron-like scheduling grammar. So, if we'd like to run our Standard tests on every commit, our Performance tests nightly, and our Deferred tests once a week, just install the parameterized plugin and set up your schedule to look something like this:

In this example, we are polling the SCM system every 5 minutes for our standard job. Since "Standard" is the default parameter we don't need to specify it at all. Then the parameterized scheduler allows us to specify a single hashed minute and hour (this is what the "H" means in the specification) for the Performance tests and a single hashed minute, hour, and day of the week for the Deferred tests. We could just as easily specify the specific time of day and day of week that we'd like these to run, but the hashing feature is a way to attempt a bit of load balancing on the Jenkins server by letting Jenkins choose the time to run based on a hash of the project. This is useful because we don't want all jobs to get scheduled at typical times humans tend to schedule things (like midnight, etc).

There we go, now my system is set up to test my MATLAB and Simulink projects with reckless abandon!

On another note. We talk a lot of Jenkins on this blog, but its definitely not the only CI system out there, and definitely not the only one we support and are working to improve. Are you using something else? If so, what are you using? Do you have any questions about how to set up a build for another system? Definitely open to hear your experiences.




Published with MATLAB® R2018b

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.