You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for GitOps commands on pushed commits in GitLab
This adds support of GitOps commands on pushed commits in GitLab
so that users can trigger PipelineRuns on pushed commit.
below commands are supported:
1) [/test, /retest]
2) [/test, /retest] prName
3) [/test, /retest] branch:test
4) /cancel
5) /cancel prName
6) /cancel branch:test
https://issues.redhat.com/browse/SRVKP-7105
Signed-off-by: Zaki Shaikh <[email protected]>
If you want to trigger a GitOps command on a pushed commit, you can include the `GitOps` comments within your commit messages. These comments can be used to restart either all pipelines or specific ones. Here's how it works:
41
43
42
44
For restarting all pipeline runs:
@@ -73,6 +75,18 @@ This means:
73
75
Please note that the `/ok-to-test` command does not work on pushed commits, as it is specifically intended for pull requests to manage authorization. Since only authorized users are allowed to send `GitOps` commands on pushed commits,
74
76
there is no need to use the `ok-to-test` command in this context.
75
77
78
+
For example, when executing a GitOps command like `/test test-pr branch:test` on a pushed commit, verify that the `test-pr` is on the test branch in your repository and includes the `on-event` and `on-target-branch` annotations as demonstrated below:
v.Logger.Infof("commit_comment: pipelinerun %s on %s/%s#%s has been requested", action, runevent.Organization, runevent.Repository, runevent.SHA)
479
+
v.Logger.Infof("github commit_comment: pipelinerun %s on %s/%s#%s has been requested", action, runevent.Organization, runevent.Repository, runevent.SHA)
Copy file name to clipboardExpand all lines: pkg/provider/gitlab/detect_test.go
+47
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ import (
11
11
"gotest.tools/v3/assert"
12
12
)
13
13
14
+
constlargeComment="/Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s"
0 commit comments