-
-
Save Otteri/bff91efb3f8b1db8fe359d861254c3bb to your computer and use it in GitHub Desktop.
Azure DevOps Pipeline: load variables from .env file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PYTHON=/home/usr/anaconda3/bin/python | |
CACHEDIR=~/.cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- bash: | | |
sed '/=\</!d;s/=/ /' .env | awk '{print "##vso[task.setvariable variable="$1";issecret=true]"$2}' | |
displayName: 'Install .env' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ref: https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash