1
0
mirror of https://github.com/ko-build/ko.git synced 2024-12-15 09:04:09 +02:00
Commit Graph

87 Commits

Author SHA1 Message Date
jonjohnsonjr
b7e1a7fdbc
Update ggcr dependency (#119)
* Update ggcr dependency

I had to move genericclioptions to k8s.io/cli-runtime

* bump client-go

* usePersistentConfig=false
2020-01-15 13:16:11 -08:00
cezkuj
1fcfe62a96 Reorder parsing KO_DOCKER_REPO to get proper credentials (#117)
Fixes #93

With this change we support also pointing to default registry (without prefix).
Eg. KO_DOCKER_REPO=myuser
2019-12-18 09:47:56 -08:00
jonjohnsonjr
d24b60a88f
Set UA to something ko-specific (#116) 2019-12-13 15:08:52 -08:00
jonjohnsonjr
4ff72e36de
Add entrypoint to PATH (#114)
This makes it easier to invoke the binary when using a debug container.
E.g. you could invoke `ko` instead of `/ko-app/ko`.
2019-12-11 11:08:26 -08:00
jonjohnsonjr
28f239ab78
Update ggcr (#113)
Mostly to pick up media type mutation, but this includes a bunch of
other fixes.

ff1ac7f977...73724ba06b
2019-12-09 11:07:23 -08:00
jonjohnsonjr
835dcfbe44
Improve ko run (#76)
Make it more like go run.
2019-12-06 10:52:34 -08:00
Evan Anderson
6aff039ca9 Fix path mangling on Windows. (#112)
Since we are always building linux containers, use `path.Join` rather than
`filepath.Join` when adding files to the tar.

Signed-off-by: Evan Anderson <evan.k.anderson@gmail.com>
2019-12-02 11:05:48 -08:00
Stanley Nguyen
1c54dd6b3e Add context to go build (#105) 2019-11-09 09:23:09 -08:00
Jason Hall
7893c74458
Merge pull request #109 from jonjohnsonjr/tagged-digests
Include tag in resolved references
2019-11-08 10:30:01 -05:00
Adam Harwayne
5a25402af9 Ignore null YAML documents when using a label selector. (#107) 2019-11-07 16:12:23 -06:00
Jon Johnson
e9800719c2 Include tag in resolved references
If a single tag is explicitly set (i.e. it's not "latest"), include that
in the reference that gets rendered in the yaml.

This is really useful for tracking releases.
2019-11-07 13:40:11 -08:00
Dave Protasowski
4833bb4a3e Preserve YAML comments & style when resolving/applying (#103)
* Preserve YAML comments & style when resolving/applying

This is accomplished by adopting the yaml.v3 lib. It
exposes a Node struct that's used internally by the
yaml encoder/decoder

ko internally now manipulates YAML documents using this struct

Fixes #101

* add/remove vendored modules

* Apply suggestions from code review

Fix comments

Co-Authored-By: jonjohnsonjr <jonjohnson@google.com>

* update doc link

* Fix use of yaml.Decoder in a test

When the yaml.Decoder returns an io.EOF it implies
there were no YAML documents decoded and that there
are no more!

* Update pkg/resolve/resolve.go

resolve comment suggestion

Co-Authored-By: jonjohnsonjr <jonjohnson@google.com>

* leave ko prefix if we're not operating in strict mode

* move testutils to internal/testing
2019-11-05 12:24:08 -08:00
Stanley Nguyen
be4e1ffdd6 [Resolves #71] Add trimpath arg to gobuild (#102)
* Add trimpath arg to gobuild

* Add build constraints for trimpath usage

* Reduce duplications across go versions

* Change trimpath fn-files for better names

* Attempt to apply with minikube on Travis

* Attempt to apply with KinD on Travis

* Install kind thru curl to not affect build
2019-11-01 10:55:03 -07:00
Scott Brenner
a6277d0a45 Quick typo fix (#99) 2019-10-22 12:32:49 -07:00
Jason Hall
267b61e6ed
Merge pull request #100 from syedriko/image_registry_auth_note
Added a note on logging in to the image registry KO_DOCKER_REPO points at
2019-10-18 11:44:32 -04:00
Sergey Yedrikov
26dcb6f23a Added a note on logging in to the image registry KO_DOCKER_REPO points at 2019-10-18 10:47:39 -04:00
Jason Hall
57f20d0355
Merge pull request #98 from n3wscott/logo
Adding ko logo.
2019-10-15 09:45:39 -04:00
Scott Nichols
5697b9d2ae rel url. 2019-10-14 15:06:06 -07:00
Scott Nichols
474505bde6 Adding ko logo. 2019-10-14 10:20:20 -07:00
jonjohnsonjr
479bd3e5ce
Update ggcr (#97) 2019-10-04 15:27:28 -07:00
jonjohnsonjr
3880b61d2d
Allow plain registries as KO_DOCKER_REPO (#94)
This allows you to use e.g. localhost:5000 as KO_DOCKER_REPO.

Fixes #93.
2019-10-02 10:02:01 -07:00
jonjohnsonjr
241d532569
Update ggcr (#91)
Fixes #90

This picks up an auth rewrite.
2019-09-26 13:28:02 -07:00
Jason Hall
15f9719970
Merge pull request #89 from toshi0607/feature/fix-broken-markdown
fix broken markdown
2019-09-23 09:17:34 -04:00
toshi0607
f5bfec379b fix broken markdown 2019-09-23 22:09:21 +09:00
Jason Hall
56f32f8a17 Update README to include better install instructions (#87) 2019-09-20 10:08:56 -07:00
jonjohnsonjr
f26825fb5a
Remove extra dashes (#86) 2019-09-20 09:39:18 -07:00
jonjohnsonjr
451287a90e
Update ggcr (#83) 2019-09-20 09:29:57 -07:00
Jason Hall
133ae27c63 Use debug.ReadBuildInfo to populate ko version (#81)
* Use debug.ReadBuildInfo to populate `ko version`

* don't print version on build info failure

* Build using Go 1.12 and 1.13

* drop 'version: ' prefix

* println
2019-09-12 14:59:50 -07: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
3a17dee60a
Use GOOS/GOARCH from base image (#77) 2019-08-19 10:02:17 -07:00
jonjohnsonjr
96455023a3
Fix date command (#75) 2019-08-16 09:59:27 -07:00
jonjohnsonjr
ee58128ba3
Fix README formatting (#74)
Apparently those newlines are important.
2019-08-16 09:52:45 -07:00
zxxa
bd404f30ef add SOURCE_DATE_EPOCH usage (#72) 2019-08-16 09:50:39 -07:00
Jason Hall
b7eb9dfe48
Merge pull request #58 from ImJasonH/strict
Implement "strict mode" which requires `ko://` prefix for import paths
2019-08-15 21:48:35 -04:00
Jason Hall
91f571887c Make callers type out all of --strict 2019-08-15 21:44:56 -04:00
Matt Moore
a3656d1441
Add support for recursively resolving directory symlinks. (#73)
* Add support for recursively resolving directory symlinks.

This adds support for properly resolving directory symlinks within kodata.
I verified that with this I can symlink `.git/refs` into `kodata/` and (with
changes) resolve the `.git/HEAD` symlink to read the appropriate
`ref: refs/heads/...` files with the commit SHA.

* Incorporate code review feedback
2019-08-15 17:59:15 -07:00
Jason Hall
fee3c269a8 Review feedback 2019-08-15 16:55:26 -04:00
Jason Hall
9776d347fe Improve strict-mode error message 2019-08-15 15:02:02 -04:00
Jason Hall
3315663a21 Remove strictness checks from build, into resolve
Strictness has nothing to do with building, and is independent of how
images are built (fixed builder, some future exotic builder type, etc.)
2019-08-15 14:22:45 -04:00
Jason Hall
4342ceff74 Implement "strict mode"
When ko is invoked in this mode, import paths must have the `ko://`
prefix. If a human marks an import path with `ko://` and ko can't
resolve the resulting import path, it fails. In "loose mode", such an
import path would be silently ignored and passed on to the resolved
YAML, often resulting in invalid image names (e.g., `image:
github.com/foo/bar`)

In loose mode, `ko://` prefixes are always ignored for
backward-compatibility.
2019-08-15 09:45:59 -04:00
Matt Moore
2d12e28795
Add permissions to the kodata directory. (#68)
I suspect that this may be a source of problems reading kodata with nonroot,
but it is probably worth doing either way.
2019-08-12 07:12:47 -07:00
Jason Hall
c959e60df3
Merge pull request #67 from ImJasonH/mod
Use go modules
2019-08-09 18:07:15 -04:00
Jason Hall
8f817fdc45 use go modules 2019-08-08 12:01:11 -04:00
Jason Hall
9242988fb1
Merge pull request #66 from ImJasonH/cobra
Update cobra dep
2019-07-25 13:57:03 -04:00
Jason Hall
d3ab89fbf2 update Gopkg.toml 2019-07-25 13:47:42 -04:00
Jason Hall
caa953d3c3 Update cobra dep 2019-07-25 10:14:57 -04:00
tanner-bruce
48afd62710 Allow skipping TLS verification while publishing (#65)
Why this is necessary: when using a local docker registry, users may not
want to support https, or there may be other troubles not allowing
verifiable TLS support.

This commit adds this functionality by adding an `--insecure-registry`
flag.
2019-07-24 10:58:10 -07:00
jonjohnsonjr
3a0e70e520
Fix mult-doc yaml re-joining (#63) 2019-07-23 09:04:40 -07:00
Jason Cooke
0df8b2497e docs: fix typo (#61) 2019-07-16 18:30:19 -07:00
jonjohnsonjr
3566d3f01a
Add go module support (#60)
* Add go module support

* Make localimports work for go modules
2019-07-12 22:54:25 -07:00