1
0
mirror of https://github.com/ko-build/ko.git synced 2025-02-10 19:41:38 +02:00

10 Commits

Author SHA1 Message Date
Jason Hall
729419aebb
Add 'ko build' as a preferred alias for 'ko publish' (#456)
* Add 'ko build' as a preferred alias for 'ko publish'

* rm ko_publish.md
2021-10-05 08:48:57 -07:00
jonjohnsonjr
23ecf4753b
Propagate --insecure-registry to base image (#370) 2021-06-01 09:47:30 -07:00
Jason Hall
29cd8e09e9
Use cobra's RunE wherever possible (#343) 2021-04-22 12:37:42 -04:00
jonjohnsonjr
522c37c4e0
Add ctx everywhere (#268)
* Add ctx to publish.Interface

I noticed that hitting ctrl-C didn't work when pushing images, this
should fix that.

* Use context everywhere that makes sense
2020-12-21 11:47:05 -08:00
jonjohnsonjr
3c6a907da9
Add additional output formats (tarball and layout) (#134)
* Create a MultiPublisher

MultiPublisher mimics io.MultiWriter in that it will publish an image to
multiple publish.Interface implementations.

* Add publish.{Tarball,Layout}Publisher

This adds support for publishing in the tarball format and to an OCI
image layout.

The tarball format isn't great, yet. It only supports writing once
instead of appending.

* Consolidate options

These were spread all over the place for no reasons. Now all the
publisher related options are grouped together.

* Add options for tarball/layout

Adds --oci-layout-path, --tarball, and --push flags.

--push=false will disable the default behavior of publishing to a
registry.

* go mod vendor

* Add Close method to publish.Interface

This allows us to defer writing to the tarball until we've collected all
the images that have been published.

* Fix tests
2020-02-19 09:30:01 -08:00
jonjohnsonjr
835dcfbe44
Improve ko run (#76)
Make it more like go run.
2019-12-06 10:52:34 -08:00
Stanley Nguyen
1c54dd6b3e Add context to go build (#105) 2019-11-09 09:23:09 -08:00
jonjohnsonjr
99a587ede5
Add build.Limiter (#79)
* Add build.Limiter

You can limit the number of concurrent builds with -j (a la make).

The default value for this is GOMAXPROCS, which seems reasonable.
2019-09-11 10:07:02 -07:00
jonjohnsonjr
cef9764e3d
Return better error messages (#33)
This hoists the publisher creation out of the loop for `ko publish` to
avoid needlessly resolving credentials multiple times.

This pulls the publisher creation outside of resolveFilesToWriter so we
can fail earlier if e.g. KO_DOCKER_REPO is unset, otherwise we start up
the kubectl goroutine and it would asynchronously fail with:

  error: no objects passed to apply
2019-04-30 13:08:54 -05:00
Scott Nichols
6f9fb7f753 Move ko commands to pkg/commands (#29)
* Move commands to pkg/commands and split into files.
2019-04-26 15:56:15 -07:00