[workflow-plugin] RFC: workflow script to Build/Boot/Test FreeBSD

375 views
Skip to first unread message

Craig Rodrigues

unread,
Dec 22, 2015, 5:37:00 PM12/22/15
to Jenkins Users
Hi,

I am making some serious efforts to convert my existing Jenkins jobs
to use workflow.  My first attempt is here:

https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy

The script calls several helper scripts, but overall what it is trying to do is:

    1. Builds the FreeBSD src tree.
    2. Run the Warnings plugin over the compiler output to detect warnings
    3. Creates a VM disk image which can boot in bhyve.
    4. Boots the VM disk image in bhyve
    5. Runs the FreeBSD test suite in the VM
    6. Take the JUnit test output and add it to the test report viewer

Can someone review my script and provide feedback, on any obvious
things I have done wrong, or any possible ways to optimize it?

Providing feedback on this list or GitHub is fine, whatever is more convenient.

Thanks.

--
Craig

Michael Neale

unread,
Dec 28, 2015, 7:31:59 PM12/28/15
to Jenkins Users, rod...@freebsd.org
Looks good to me - doing some fairly involved things but it reads clearly to me. I presume the "mail" DSL function didn't do what you want so you had to use the "step" version of it? 

If you find you have many flows that do similar things you could make your own DSL functions to share for the freebsd instance. 

I like it! Nicely done. 

Craig Rodrigues

unread,
Dec 28, 2015, 11:31:16 PM12/28/15
to Michael Neale, Jenkins Users
Hi,

The "mail" DSL function simply sends out mail.  The "step" version of mail has a lot of useful functionality,
like sending mails out on broken builds, and sending "Fixed" mails out when the build is fixed.

This text: For that, check if currentBuild.previousBuild exists, what its .result is, etc.
needs to be fleshed out with a proper example for the "mail" DSL function.

--
Craig
Reply all
Reply to author
Forward
0 new messages