I want to run the below commands in one of the steps of Jenkinsfile:
-
az login --service-principal -u ${AZCOPY_SP_ID_SECRET_USR} -p ${AZCOPY_SP_ID_SECRET_PSW} --tenant ${TRUATA_TENANT_ID}
-
“date -u -d ‘15 minutes’ ‘+%Y-%m-%dT%H:%MZ’”
-
az storage container generate-sas --account-name ${ADLS_SOURCE_STORAGE_ACCOUNT} -n ${ADLS_SOURCE_CONTAINER} --https-only --permissions lrw --expiry {date_output}“”"
The idea is to do az login → run the date command → store the output of date in a variable → run az storage command to generate a SAS token referencing that date output as one of the flags.
How can I achieve this?