Merge "Update JJB best practices"
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 7 Sep 2017 01:15:36 +0000 (01:15 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Thu, 7 Sep 2017 01:15:36 +0000 (01:15 +0000)
1  2 
docs/best-practices.rst

@@@ -207,13 -207,15 +207,15 @@@ There are 2 ways to pass parameters int
  2) Environment variables in the format ${VAR}
  
  We recommend avoiding using method 1 (Pass JJB variables) into shell scripts
 -and instead always use method 2 (Enviornment variables). This makes
 +and instead always use method 2 (Environment variables). This makes
  troubleshooting JJB errors easier and does not require escaping curly braces.
  
- This method requires 2 steps:
+ This method requires 3 steps:
+ 1) Declare a parameter section or inject the variable as properties-content.
+ 2) Invoke the shell script with `include-raw-escape` instead of `include-raw`.
+ 3) Use the shell variable in shell script.
  
- 1) Declare a parameter section
- 2) Use the parameter in shell script
  
  The benefit of this method is that parameters will always be at the top
  of the job page and when clicking the Build with Parameters button in Jenkins