Double quotes might be a bit tricky with the interpolation and gstring.

I'd suggest move the script content to a file in your repo and just call 
the script using:

sh label:"<-- Zipping files -->", script: "your_script.sh"

I'd suggest to chmod 755 your_script.sh and add some shebang too.

The main benefit is the logic will be somewhere rather than in the 
Jenkinsfile/pipeline and, therefore it would be easy to test and run 
without any other requirements. Pipelines should just care of the 
orchestration.

Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/696632e9-add6-4c9d-9d21-9c6d6270402d%40googlegroups.com.

Reply via email to