Skip to content

Instantly share code, notes, and snippets.

@matt-FFFFFF
Created September 12, 2019 13:52
Show Gist options
  • Save matt-FFFFFF/db116933e7cf86b429f9a06729c6ec6a to your computer and use it in GitHub Desktop.
Save matt-FFFFFF/db116933e7cf86b429f9a06729c6ec6a to your computer and use it in GitHub Desktop.
Helm get slot
if [ "`helm get values --all $(releaseName) | grep -Po 'productionSlot: \K.*'`" == "green" ]; then
echo "##vso[task.setvariable variable=deploymentslot;isSecret=false;isOutput=true;]blue"
echo "##vso[task.setvariable variable=currentslot;isSecret=false;isOutput=true;]green"
else
echo "##vso[task.setvariable variable=deploymentslot;isSecret=false;isOutput=true;]green"
echo "##vso[task.setvariable variable=currentslot;isSecret=false;isOutput=true;]blue"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment