Running Kyua within Jenkins script

Enji Cooper yaneurabeya at gmail.com
Wed May 1 15:14:57 UTC 2019


> On May 1, 2019, at 07:55, Susan Stanziano <susan.stanziano at xinuos.com> wrote:
> 
> 
> 
> Hi all, 
> 
> 
> 
> 
> A question on running Kyua within a shell script on Jenkins. 
> 
> 
> 
> 
> I’ve been automating test suites using Jenkins and added the 
> 
> 
> 
> 
> “kyua test” 
> 
> 
> 
> 
> command to a shell script (default is /bin/sh) in Jenkins followed by 
> 
> 
> 
> 
> the “kyua report” command. 
> 
> 
> 
> 
> For some reason, any commands after “kyua test” do not get executed. 
> 
> 
> 
> 
> Separately, either command (test or report) runs correctly within my script on Jenkins. 
> 
> 
> 
> 
> Is there something in “kyua test” that after a run it kills further processes or is there something within Jenkins 
> 
> that would prevent subsequent commands from being executed after “kyua test” completes? 
> 
> 
> 
> 
> Or am I missing something simple here? 
> 
> 
> 
> 
> Thanks for any suggestions, 

Hi Susan,
    In addition to what Alan said about set -e maybe being an issue (add “echo $-“ to your script to see what flags sh is being executed with, e.g., “-e”), you should use “kyua report-html” to export the test data to Jenkins instead of having to parse the report output.
    Some of the scripts which drive exporting the data to the FreeBSD Jenkins instance can be found here: https://github.com/freebsd/freebsd-ci/tree/master/scripts/test . It might not suit your needs out of the box, but you might find some inspiration for writing your Jenkins code.
Cheers,
-Enji


More information about the freebsd-testing mailing list