I am using below custom block in my steps of job.
!reference [.configure_gcp_cli, script]
It is working.
I want to run this only if a variable is set, so added below code as part of script in the job.
- |
if [[ $CLOUD_PLATFORM == "gcp" ]]
then
echo "google cloud cli configuration"
!reference [.configure_gcp_cli, script]
fi
But it is failing and giving the error as.
/bin/bash: line 213: !reference: command not found
How to achieve this conditional logic?