This is first in the "overflow" series on Jenkins Pipelines where I attempt to share few tips and tricks based on my learnings. Take my word, not more than 5 slides on each chosen topic.
3. Real Quotes
single quotes
• single line ‘ ’
• multi-line ‘‘‘ ’’’
• string interpolation —> NO
double quotes
single line “ ”
multi-line “““ ”””
string interpolation —> YES
4. single quotes examples
• single line, sh ‘hostname’
• multi-line,
sh ‘‘‘
hostname
sudo -H pip install -y pyyaml
’’’
5. double quotes examples
• single line, sh “ Hi, ${user}, this is world!”
• multi-line,
sh “““
python check_config.py -v ${env.EXAM}
sudo -H pip install -y pyyaml
”””