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
Copy file name to clipboardExpand all lines: docs/content/en/docs-dev/user-guide/plan-preview.md
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,8 @@ pipectl plan-preview \
38
38
--repo-remote-url={ REPO_REMOTE_GIT_SSH_URL } \
39
39
--head-branch={ HEAD_BRANCH } \
40
40
--head-commit={ HEAD_COMMIT } \
41
-
--base-branch={ BASE_BRANCH }
41
+
--base-branch={ BASE_BRANCH } \
42
+
--sort-label-keys={ SORT_LABEL_KEYS }
42
43
```
43
44
44
45
You can run it locally or integrate it to your CI system to run automatically when a new pull request is opened/updated. Use `--help` to see more options.
@@ -47,6 +48,13 @@ You can run it locally or integrate it to your CI system to run automatically wh
47
48
pipectl plan-preview --help
48
49
```
49
50
51
+
### Order of the results
52
+
53
+
By default, the results are sorted by PipedID and Application Name.
54
+
55
+
If you want to sort the results by labels, add `--sort-label-keys` option. For example, when you run with `--sort-label-keys=env,team`, the results will be sorted by PipedID, `env` label, `team` label, and then Application Name.
56
+
57
+
50
58
## GitHub Actions
51
59
52
60
If you are using GitHub Actions, you can seamlessly integrate our prepared [actions-plan-preview](https://github.com/pipe-cd/actions-plan-preview) to your workflows. This automatically comments the plan-preview result on the pull request when it is opened or updated. You can also trigger to run plan-preview manually by leave a comment `/pipecd plan-preview` on the pull request.
cmd.Flags().StringVar(&c.out, "out", c.out, "Write planpreview result to the given path.")
76
78
cmd.Flags().DurationVar(&c.timeout, "timeout", c.timeout, "Maximum amount of time this command has to complete. Default is 10m.")
77
79
cmd.Flags().DurationVar(&c.pipedHandleTimeout, "piped-handle-timeout", c.pipedHandleTimeout, "Maximum amount of time that a Piped can take to handle. Default is 5m.")
80
+
cmd.Flags().StringSliceVar(&c.sortLabelKeys, "sort-label-keys", c.sortLabelKeys, "The application label keys to sort the results by. If not specified, the results will be sorted by only PipedID and ApplicationName.")
0 commit comments