-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to run PR without an event matching
Users now have the ability to explicitly start a PipelineRun using the /test comment, irrespective of whether the pipelinerun matches the annotations. This feature grants users explicit control over the execution of PipelineRuns for specific types of Pull Requests, allowing manual initiation instead of relying solely on events. This enhancement is particularly useful for scenarios where users need fine-grained control over the testing process, such as for Pull Requests managed by users rather than events. Add e2e for gitlab/github(ghe)/gitea Jira: https://issues.redhat.com/browse/SRVKP-3561 Signed-off-by: Chmouel Boudjnah <[email protected]>
- Loading branch information
1 parent
576b137
commit 5e4489d
Showing
12 changed files
with
340 additions
and
41 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
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
10 changes: 10 additions & 0 deletions
10
pkg/pipelineascode/testdata/no-match/.tekton/matched1.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,10 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: pull_request-1 | ||
annotations: | ||
pipelinesascode.tekton.dev/on-target-branch: "[main]" | ||
pipelinesascode.tekton.dev/on-event: "[pull_request]" | ||
spec: | ||
pipelineRef: | ||
name: pipeline1 |
10 changes: 10 additions & 0 deletions
10
pkg/pipelineascode/testdata/no-match/.tekton/matched2.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,10 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: pull_request-2 | ||
annotations: | ||
pipelinesascode.tekton.dev/on-target-branch: "[main]" | ||
pipelinesascode.tekton.dev/on-event: "[pull_request]" | ||
spec: | ||
pipelineRef: | ||
name: pipeline1 |
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,7 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: no-match | ||
spec: | ||
pipelineRef: | ||
name: pipeline1 |
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,9 @@ | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
name: pipeline1 | ||
tasks: | ||
- name: task-from-tektondir | ||
taskRef: | ||
name: task-from-tektondir |
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,12 @@ | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: task-from-tektondir | ||
spec: | ||
steps: | ||
- name: task-1 | ||
image: gcr.io/distroless/python3:nonroot | ||
script: | | ||
#!/usr/bin/python3 | ||
print("Hello task-from-tektondir") |
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
Oops, something went wrong.