Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions commands/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ Only basic information is included with the text output format. For complete app
displayerType(&displayers.JobInvocations{}),
)

AddStringSliceFlag(listJobInvocations, doctl.ArgAppDeployment, "", []string{}, "The deployment ID to filter job invocations for. If not provided, all job invocations for given app are returned.")
AddStringSliceFlag(listJobInvocations, doctl.ArgAppJobName, "", []string{}, "The job name to filter job invocations for. If not provided, all job invocations for given app are returned.")
AddStringFlag(listJobInvocations, doctl.ArgAppDeployment, "", "", "The deployment ID to filter job invocations for. If not provided, all job invocations for given app are returned.")
AddStringFlag(listJobInvocations, doctl.ArgAppJobName, "", "", "The job name to filter job invocations for. If not provided, all job invocations for given app are returned.")

listJobInvocations.Example = `The following example retrieves the list of job invocations for the app with the ID ` + "`" + `f81d4fae-7dec-11d0-a765-00a0c91e6bf6` + "`" + ` and the deployment ID ` + "`" + `418b7972-fc67-41ea-ab4b-6f9477c4f7d8` + "`" + ` and the job ` + "`" + `cron` + "`" + `: doctl apps list-job-invocations f81d4fae-7dec-11d0-a765-00a0c91e6bf6 --job-name cron --deployment 418b7972-fc67-41ea-ab4b-6f9477c4f7d8`

Expand Down Expand Up @@ -1478,7 +1478,10 @@ func RunAppsListJobInvocations(c *CmdConfig) error {

opts := &godo.ListJobInvocationsOptions{
DeploymentID: deploymentID,
JobNames: []string{jobName},
}

if jobName != "" {
opts.JobNames = []string{jobName}
}

invocations, err := c.Apps().ListJobInvocations(appID, opts)
Expand Down
Loading