Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 2016 14:00:32 -0500
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>
Cc:        "freebsd-java@freebsd.org" <freebsd-java@freebsd.org>
Subject:   Need Groovy help for Jenkins script to build/run/test FreeBSD image
Message-ID:  <CAG=rPVdOtkS7TNcttRhJNQweg89MubxQF5htnHHryCMDDrMUKw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I am making some serious efforts to convert my existing Jenkins jobs
to use the Jenkins workflow plugin, because that is what the
developers who work on Jenkins are moving towards.
The Jenkins workflow plugin, which has a small Groovy-based Domain Specific
Language (DSL):

https://github.com/jenkinsci/workflow-plugin#getting-started

 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

Sample output from this script which builds FreeBSD_HEAD is here:
https://jenkins.freebsd.org/job/FreeBSD_HEAD/40/flowGraphTable/

This is my first attempt at writing Groovy.  I looked at
http://groovy-lang.org to get some basic ideas.

Can someone point me to good books or tutorials for learning Groovy?
Also, 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 via this e-mail thread or on GitHub is fine.

Thanks.
--
Craig



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVdOtkS7TNcttRhJNQweg89MubxQF5htnHHryCMDDrMUKw>