Skip to content

Commit

Permalink
update conditional variables
Browse files Browse the repository at this point in the history
  • Loading branch information
anveshmuppeda committed Apr 20, 2024
1 parent 349567c commit 4e9091d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pipelines/variables/07-conditional-variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pool: kubernetes-self-hosted-agent

# Define a user-defined variable
variables:
myVariable: true
myVariable: false

# Define stages
stages:
Expand All @@ -16,3 +16,6 @@ stages:
- script: echo "This step will only run if myVariable is set to true"
condition: eq(variables['myVariable'], 'true')
displayName: "Conditional variable"
- script: echo "This step will only run if myVariable is set to false"
condition: eq(variables['myVariable'], 'false')
displayName: "Conditional variable"

0 comments on commit 4e9091d

Please sign in to comment.