Skip to main content
Engineering LibreTexts

1.5: Using ZeroConf Script with Jenkins

  • Page ID
    43782
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Now that we have such scripts and the possibility to specify option, we can write Jenkins scripts which rely on BASH as least as possible.

    For example here is the command that we use in Jenkins for the project XMLWriter (which is hosted on PharoExtras).

    # Jenkins puts all the params after a / in the job name as well :(
    export JOB_NAME=`dirname $JOB_NAME`
    
    wget --quiet -O - get.pharo.org/$PHARO+$VM | bash
    
    ./pharo Pharo.image save $JOB_NAME --delete-old
    ./pharo $JOB_NAME.image --version > version.txt
    
    REPO=http://smalltalkhub.com/mc/PharoExtras/$JOB_NAME/main
    ./pharo $JOB_NAME.image config $REPO ConfigurationOf$JOB_NAME --install=
        $VERSION --group='Tests'
    ./pharo $JOB_NAME.image test --junit-xml-output "XML-Writer-.*"
    
    zip -r $JOB_NAME.zip $JOB_NAME.image $JOB_NAME.changes 
    

    This page titled 1.5: Using ZeroConf Script with Jenkins is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Alexandre Bergel, Damien Cassou, Stéphane Ducasse, Jannik Laval (Square Bracket Associates) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.