Get started with Jenkins

From ETSI Forge
Jump to: navigation, search

Build scripts

The default build command for Jenkins on Forge is as follows:


This means that Jenkins will look for a file called (note the dot at the beginning!) and will exectude the shell commands inside.

Guidelines for writing your build script

  • Jenkins uses the returned exit code of the script to determine the outcome of the build:
    • Exit status 0: successful build
    • Exit status 1: build failed

Basic build script example

A very basic example for a script, assuming you need to run the compile command on a text file and check that an HTML file has been created

   compile myfile.txt
   if [ -f myfile.html ] ; then
       exit 0
       exit 1