Created
March 28, 2021 03:18
-
-
Save KyMidd/c572093405345a695478635216a1f4fb to your computer and use it in GitHub Desktop.
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
| # If approval required, exit immediately and export values | |
| if [[ $approvalRequired == "yes" ]]; then | |
| echo "****************************************" | |
| echo "##[section]Approval will be required" | |
| echo "****************************************" | |
| echo "" | |
| echo "##vso[task.setvariable variable=approvalRequired;isOutput=true]true" | |
| echo "" | |
| echo "" | |
| break | |
| # If approval not required, continue | |
| elif [[ $approvalRequired == "no" ]]; then | |
| # Can't declare all good here until all lines evaluated, so removed from while loop | |
| # After loop, will gather info and make positive approval choice | |
| continue | |
| # If we haven't made a choice here yet, something has gone wrong, exit | |
| elif [[ $approvalRequired == "notSure" ]]; then | |
| echo "##[error]Something has gone wrong, can't determine" | |
| echo "##[error]Exiting, approval will be required to apply" | |
| exit 1 | |
| # Shouldn't reach here | |
| else | |
| echo "##[error]Something has gone wrong, can't determine" | |
| echo "##[error]Exiting, approval will be required to apply" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment