I have a script that change variables in files to expected values.
It works if I use inline option of bash script. It crush during execution of filePath.
export VersionTag=${BUILD_BUILDNUMBER}
export $(xargs <${VALUESMAIN})
export $(xargs <${VALUES})
export Auth_Azure_Client_ID=${Auth_Azure_Client_ID}
export Auth_Azure_Shared_Secret=${Auth_Azure_Shared_Secret}
env
cd ../../helm/
envsubst < -core-api-values.yaml >> coreapi.yaml
First 3 lines are the exposed variables from Azure DevOps variable group.
export Auth_Azure_Client_ID=${Auth_Azure_Client_ID}
export Auth_Azure_Shared_Secret=${Auth_Azure_Shared_Secret}
they are secret variables in the same group.
If I use the inline option everything works fine:
But if I want to use script from file:
The script ends without exporting secret values:
export Auth_Azure_Client_ID=${Auth_Azure_Client_ID}
export Auth_Azure_Shared_Secret=${Auth_Azure_Shared_Secret}
I can’t see them with execution of env or set
After trying to export they are just empty
Add your secret variable as an environment variable on your task: Use a secret variable in the UI
3