Skip to content

Commit

Permalink
Remove WhenExpressions names
Browse files Browse the repository at this point in the history
Initially, we'd considered giving WhenExpressions names. After further
discussion, we decided it's unnecessary because we don't use them across
Tasks and what the WhenExpression is evaluating should be straighforward
from the input, operator and values. So removing the WhenExpression names
mistakenly left in the TEP so that it doesn't mislead users who read the
TEP.
  • Loading branch information
jerop authored and tekton-robot committed Sep 21, 2020
1 parent 391bf4d commit e080a78
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions teps/0007-conditions-beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ spec:
workspace: source-repo
- name: echo-file-exists
when:
- name: check-file-exists
input: '$(tasks.file-exists.results.exists)'
- input: '$(tasks.file-exists.results.exists)'
operator: In
values: ['true']
taskRef:
Expand All @@ -279,17 +278,14 @@ spec:
Other examples of `Guards` using `When Expressions` are:

```yaml
name: branch-is-main
input: $(params.branch)
operator: In
values: [‘main’]
---
name: branch-not-main
input: $(params.branch)
operator: NotIn
values: [‘main’]
---
name: always-false
input: ‘false’
operator: In
values: [‘’]
Expand Down Expand Up @@ -340,8 +336,7 @@ spec:
workspace: source-repo
- name: echo-file-does-not-exist # skipped
when:
- name: check-file-exists
input: '$(tasks.file-exists.results.exists)'
- input: '$(tasks.file-exists.results.exists)'
operator: In
values: ['false']
continueAfterSkip: 'true'
Expand Down Expand Up @@ -544,12 +539,10 @@ spec:
- name: check-git-files-changed
- name: ci-job
when:
- name: check-git-files-changed
input: "$(tasks.check-git-files-changed.results.changed)"
- input: "$(tasks.check-git-files-changed.results.changed)"
key: In
values: ["true"]
- name: check-name-matches
input: "$(params.githubCommand)"
- input: "$(params.githubCommand)"
key: In
values: ["", "/test $(params.checkName)"]
taskRef:
Expand Down

0 comments on commit e080a78

Please sign in to comment.