Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandAdd = &cli.Command{ Name: "dashboard", Description: "Use this command to add a dashboard.", Usage: "Add a new dashboard from the provided configuration", Action: add, Flags: []cli.Flag{ &cli.StringFlag{ EnvVars: []string{"VELA_DASHBOARD_NAME", "DASHBOARD_NAME"}, Name: "name", Usage: "provide the name for the dashboard", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_REPOS", "DASHBOARD_REPOS"}, Name: "repos", Aliases: []string{"add-repos"}, Usage: "provide the list of repositories (org/repo) for the dashboard", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_REPOS_BRANCH", "DASHBOARD_REPOS_BRANCH"}, Name: "branches", Aliases: []string{"branch"}, Usage: "filter builds in all repositories by branch", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_REPOS_EVENT", "DASHBOARD_REPOS_EVENT"}, Name: "events", Aliases: []string{"event"}, Usage: "filter builds in all repositories by event", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_ADMINS", "DASHBOARD_ADMINS"}, Name: "admins", Usage: "provide the list of admins for the dashboard", }, &cli.StringFlag{ EnvVars: []string{"VELA_OUTPUT", "REPO_OUTPUT"}, Name: internal.FlagOutput, Aliases: []string{"op"}, Usage: "format the output in json, spew or yaml", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Add a dashboard. $ {{.HelpName}} --name my-dashboard 2. Add a dashboard with repositories. $ {{.HelpName}} --name my-dashboard --repos Org-1/Repo-1,Org-2/Repo-2 3. Add a dashboard with repositories filtering builds by pushes to main. $ {{.HelpName}} --name my-dashboard --repos Org-1/Repo-1,Org-2/Repo-2 --branch main --event push 4. Add a dashboard with multiple admins. $ {{.HelpName}} --name my-dashboard --admins JohnDoe,JaneDoe DOCUMENTATION: https://go-vela.github.io/docs/reference/cli/dashboard/add/ `, cli.CommandHelpTemplate), }
CommandAdd defines the command for creating a dashboard.
View Source
var CommandGet = &cli.Command{ Name: "dashboard", Aliases: []string{"dashboards"}, Description: "Use this command to get user dashboards.", Usage: "Get user dashboards from the provided configuration", Action: get, Flags: []cli.Flag{ &cli.BoolFlag{ EnvVars: []string{"VELA_FULL", "DASHBOARD_FULL"}, Name: "full", Usage: "output the repo and build information for the dashboard", }, &cli.StringFlag{ EnvVars: []string{"VELA_OUTPUT", "DASHBOARD_OUTPUT"}, Name: internal.FlagOutput, Aliases: []string{"op"}, Usage: "format the output in json, spew or yaml", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Get user dashboards. $ {{.HelpName}} 2. Get user dashboards with repo and build information. $ {{.HelpName}} --full DOCUMENTATION: https://go-vela.github.io/docs/reference/cli/dashboard/get/ `, cli.CommandHelpTemplate), }
CommandGet defines the command for viewing all user dashboards.
View Source
var CommandUpdate = &cli.Command{ Name: "dashboard", Description: "Use this command to update a dashboard.", Usage: "Update a dashboard from the provided configuration", Action: update, Flags: []cli.Flag{ &cli.StringFlag{ EnvVars: []string{"VELA_DASHBOARD_ID", "DASHBOARD_ID"}, Name: "id", Usage: "provide the uuid for the dashboard", }, &cli.StringFlag{ EnvVars: []string{"VELA_DASHBOARD_NAME", "DASHBOARD_NAME"}, Name: "name", Usage: "provide the name for the dashboard", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_ADD_REPOS", "DASHBOARD_ADD_REPOS"}, Name: "add-repos", Usage: "provide the list of repositories to add for the dashboard", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_DROP_REPOS", "DASHBOARD_DROP_REPOS"}, Name: "drop-repos", Usage: "provide the list of repositories to remove from the dashboard", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_TARGET_REPOS", "DASHBOARD_TARGET_REPOS"}, Name: "target-repos", Usage: "provide the list of repositories to target for updates for the dashboard", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_ADD_ADMINS", "DASHBOARD_ADD_ADMINS"}, Name: "add-admins", Usage: "provide the list of admins to add for the dashboard", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_DROP_ADMINS", "DASHBOARD_DROP_ADMINS"}, Name: "drop-admins", Usage: "provide the list of admins to remove from the dashboard", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_REPOS_BRANCH", "DASHBOARD_REPOS_BRANCH"}, Name: "branches", Aliases: []string{"branch"}, Usage: "filter builds in all repositories by branch", }, &cli.StringSliceFlag{ EnvVars: []string{"VELA_DASHBOARD_REPOS_EVENT", "DASHBOARD_REPOS_EVENT"}, Name: "events", Aliases: []string{"event"}, Usage: "filter builds in all repositories by event", }, &cli.StringFlag{ EnvVars: []string{"VELA_OUTPUT", "REPO_OUTPUT"}, Name: internal.FlagOutput, Aliases: []string{"op"}, Usage: "format the output in json, spew or yaml", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Update a dashboard to add a repository. $ {{.HelpName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --add-repos Org-1/Repo-1 2. Update a dashboard to remove a repository. $ {{.HelpName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --drop-repos Org-1/Repo-1 3. Update a dashboard to add event and branch filters to specific repositories. $ {{.HelpName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --target-repos Org-1/Repo-1,Org-2/Repo-2 --branches main --events push 4. Update a dashboard to change the name. $ {{.HelpName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --name MyDashboard 5. Update a dashboard to add an admin. $ {{.HelpName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --add-admins JohnDoe 6. Update a dashboard to remove an admin. $ {{.HelpName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --drop-admins JohnDoe DOCUMENTATION: https://go-vela.github.io/docs/reference/cli/dashboard/update/ `, cli.CommandHelpTemplate), }
CommandUpdate defines the command for updating a dashboard.
View Source
var CommandView = &cli.Command{ Name: "dashboard", Description: "Use this command to view a dashboard.", Usage: "View a dashboard from the provided configuration", Action: view, Flags: []cli.Flag{ &cli.StringFlag{ EnvVars: []string{"VELA_DASHBOARD_ID", "DASHBOARD_ID"}, Name: "id", Usage: "provide the uuid for the dashboard", }, &cli.BoolFlag{ EnvVars: []string{"VELA_FULL", "DASHBOARD_FULL"}, Name: "full", Usage: "output the repo and build information for the dashboard", }, &cli.StringFlag{ EnvVars: []string{"VELA_OUTPUT", "REPO_OUTPUT"}, Name: internal.FlagOutput, Aliases: []string{"op"}, Usage: "format the output in json, spew or yaml", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. View a dashboard. $ {{.HelpName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 2. View a dashboard with repo and build information. $ {{.HelpName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --full DOCUMENTATION: https://go-vela.github.io/docs/reference/cli/dashboard/view/ `, cli.CommandHelpTemplate), }
CommandView defines the command for viewing a dashboard.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.