-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes AppendManifest used to read files from kodata
Previously, if we pass a path to AppendManifest for ex. `/kodata/tekton/abc.yaml` and later `/kodata/tekton/` both use to read the file and add in the manifest, which would make manifest to have the same resource twice. This updates the func to skip reading from path if it is a directory and read the data from path only if it is a file. so this will read the resource for path `kodata/tekton/abc.yaml` and skip for other one. Signed-off-by: Shivam Mukhade <[email protected]>
- Loading branch information
Shivam Mukhade
committed
Sep 27, 2021
1 parent
3c77c77
commit e3e4b24
Showing
4 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
22 changes: 22 additions & 0 deletions
22
...nciler/common/testdata/kodata/tekton-addon/0.0.2/01-clustertriggerbindings/bitbucket.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: triggers.tekton.dev/v1alpha1 | ||
kind: ClusterTriggerBinding | ||
metadata: | ||
name: bitbucket-pullreq-0.0.2 | ||
spec: | ||
params: | ||
- name: gitrepo-url | ||
value: $(body.pullRequest.fromRef.repository.links.clone[0].href) | ||
- name: pullreq-sha | ||
value: $(body.pullRequest.fromRef.latestCommit) | ||
- name: pullreq-state | ||
value: $(body.pullRequest.state) | ||
- name: pullreq-number | ||
value: $(body.pullRequest.id) | ||
- name: pullreq-repo-name | ||
value: $(body.pullRequest.toRef.repository.name) | ||
- name: pullreq-html-url | ||
value: $(body.pullRequest.links.self[0].href) | ||
- name: pullreq-title | ||
value: $(body.pullRequest.title) | ||
- name: user-type | ||
value: $(body.pullRequest.author.user.type) |
22 changes: 22 additions & 0 deletions
22
pkg/reconciler/common/testdata/kodata/tekton-addon/bitbucket-1.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: triggers.tekton.dev/v1alpha1 | ||
kind: ClusterTriggerBinding | ||
metadata: | ||
name: bitbucket-pullreq-no-version | ||
spec: | ||
params: | ||
- name: gitrepo-url | ||
value: $(body.pullRequest.fromRef.repository.links.clone[0].href) | ||
- name: pullreq-sha | ||
value: $(body.pullRequest.fromRef.latestCommit) | ||
- name: pullreq-state | ||
value: $(body.pullRequest.state) | ||
- name: pullreq-number | ||
value: $(body.pullRequest.id) | ||
- name: pullreq-repo-name | ||
value: $(body.pullRequest.toRef.repository.name) | ||
- name: pullreq-html-url | ||
value: $(body.pullRequest.links.self[0].href) | ||
- name: pullreq-title | ||
value: $(body.pullRequest.title) | ||
- name: user-type | ||
value: $(body.pullRequest.author.user.type) |