One of the weaker things in bash are the conditionals…
Posts for: #Sh
Variables in Jenkins Pipelins
The power that the bash shell affords is hard describe and its familiarity makes the bash shell my go to for almost everything. But I’m continuing on the process of JP (Jenkins Pipelines).
With that end, I need to have some variables defined at the beginning of the run and used throughout the entire job. Sometimes these variables will be defined in Groovy.
Example 1 def var1 = 'hello world' node('master'){ stage('HW1'){ echo var1 } } output: