Skip to content

Commit cd62e58

Browse files
author
OpenShift Bot
committed
Merge pull request #8509 from mfojtik/cancel-build
Merged by openshift-bot
2 parents 737ca2a + a37693a commit cd62e58

File tree

6 files changed

+221
-106
lines changed

6 files changed

+221
-106
lines changed

contrib/completions/bash/oc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,7 @@ _oc_cancel-build()
861861

862862
flags+=("--dump-logs")
863863
flags+=("--restart")
864+
flags+=("--state=")
864865
flags+=("--api-version=")
865866
flags+=("--as=")
866867
flags+=("--certificate-authority=")

contrib/completions/bash/openshift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4446,6 +4446,7 @@ _openshift_cli_cancel-build()
44464446

44474447
flags+=("--dump-logs")
44484448
flags+=("--restart")
4449+
flags+=("--state=")
44494450
flags+=("--api-version=")
44504451
flags+=("--as=")
44514452
flags+=("--certificate-authority=")

docs/generated/oc_by_example_content.adoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,20 +627,26 @@ Autoscale a deployment config or replication controller
627627

628628

629629
== oc cancel-build
630-
Cancel a pending or running build
630+
Cancel running, pending, or new builds
631631

632632
====
633633
634634
[options="nowrap"]
635635
----
636636
# Cancel the build with the given name
637-
$ oc cancel-build 1da32cvq
637+
$ oc cancel-build ruby-build-2
638638
639639
# Cancel the named build and print the build logs
640-
$ oc cancel-build 1da32cvq --dump-logs
640+
$ oc cancel-build ruby-build-2 --dump-logs
641641
642642
# Cancel the named build and create a new one with the same parameters
643-
$ oc cancel-build 1da32cvq --restart
643+
$ oc cancel-build ruby-build-2 --restart
644+
645+
# Cancel multiple builds
646+
$ oc cancel-build ruby-build-1 ruby-build-2 ruby-build-3
647+
648+
# Cancel all builds created from 'ruby-build' build configuration that are in 'new' state
649+
$ oc cancel-build bc/ruby-build --state=new
644650
----
645651
====
646652

pkg/cmd/cli/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func NewCommandCLI(name, fullName string, in io.Reader, out, errout io.Writer) *
105105
cmd.NewCmdRollback(fullName, f, out),
106106
cmd.NewCmdNewBuild(fullName, f, in, out),
107107
cmd.NewCmdStartBuild(fullName, f, in, out),
108-
cmd.NewCmdCancelBuild(fullName, f, out),
108+
cmd.NewCmdCancelBuild(fullName, f, in, out),
109109
cmd.NewCmdImportImage(fullName, f, out),
110110
cmd.NewCmdTag(fullName, f, out),
111111
},

0 commit comments

Comments
 (0)