1
0
mirror of https://github.com/ko-build/ko.git synced 2025-02-13 19:42:26 +02:00

148 Commits

Author SHA1 Message Date
Matt Moore
cde258294f
Run the hello test on multiple architectures (#227) 2020-10-23 16:47:34 -07:00
Matt Moore
d9cc0ca9ea
Move the kind and integration tests to actions (#225) 2020-10-23 10:19:48 -07:00
Jason Hall
9b91035562
Merge pull request #223 from mattmoor/auto-updates/format-markdown
[Automated] Format markdown
2020-10-15 09:28:53 -04:00
Jason Hall
28a36d6a65
Merge pull request #213 from mattmoor/auto-updates/common-actions
[Automated] Update actions
2020-10-15 09:28:39 -04:00
Matt Moore (via Sockpuppet)
b99d96f099 Format markdown
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-10-15 01:42:20 +00:00
Matt Moore (via Sockpuppet)
2d9942c3b0 Update common github actions
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-10-15 01:41:38 +00:00
Jason Hall
3691164421
Document --platform flag in README.md (#211) 2020-10-14 12:57:15 -07:00
Jason Hall
2c4d75521e
Merge pull request #222 from markusthoemmes/fix-lints
Fix things pointed out by golangci-lint
2020-10-13 10:07:59 -04:00
Markus Thömmes
b5daa6cdd9 Reduce config a bit 2020-10-13 15:29:05 +02:00
Markus Thömmes
695b39f9f4 Fix things pointed out by golangci-lint 2020-10-13 15:27:59 +02:00
Markus Thömmes
f527c9b024
Document usage of KIND_CLUSTER_NAME (#220) 2020-10-08 10:12:48 -07:00
Jason Hall
e780390edb
Avoid panic caused by MultiPublisher (#216)
MultiPublisher now returns an error when it's configured with no
publishers, and resolver.go now appends a nop publisher when it's
configured not to publish, that simulates a publish without actually
pushing any images.

.
2020-10-06 06:45:25 -07:00
Matt Moore
dc30efcfd8
Format markdown (#217)
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-10-05 18:38:43 -07:00
steeling
01820ce657
Update README with link to kind (#212)
There were no links to kind in the README prior to this PR
2020-10-05 07:45:53 -07:00
Nghia Tran
598e7a7644
Fix left-over from copy/paste (#214) 2020-10-03 18:03:30 -07:00
Jason Hall
d7b989a9df
Remove docs for Strict Mode and --strict flag (#210) 2020-09-30 11:00:36 -07:00
Jason Hall
27676b12d8
Merge pull request #198 from google/ImJasonH-patch-1
Fix API Versions in README.md
v0.6.0
2020-09-30 01:00:07 -04:00
Jason Hall
efbe5b7281
Merge pull request #205 from mattmoor/auto-updates/format-markdown
[Automated] Format markdown
2020-09-29 21:35:26 -04:00
Matt Moore (via Sockpuppet)
0bdf5ee792 Format markdown
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-09-30 01:29:56 +00:00
Matt Moore
61fbde832a
Have kind.local test use --platform=all (#208)
Fix --platform=all with kind.local
2020-09-29 10:11:15 -07:00
Napoleon Santana
0f5a478d75
(Fix #191) Add required go version to docs (#204)
KO gives an error for the wrong go versions. The error is not very verbose.It is diffcult to decipher the logs of the error given. As a developer, adding a note to the installation process would prevent me from stumbling onto this issue.
2020-09-25 17:24:22 -07:00
jonjohnsonjr
4a4d1b02bd
Revive progress and warning logs (#203)
These got dropped when we pulled in:
https://github.com/google/go-containerregistry/pull/481

Which doesn't log by default, and requires opting in.
2020-09-25 11:50:20 -07:00
Matt Moore
d48767339f
Fix base image resolution (#201) 2020-09-25 10:20:33 -07:00
Matt Moore
5af0bc138f
Print more complete platform information. (#200)
Fixes: https://github.com/google/ko/issues/199
2020-09-25 08:51:18 -07:00
Jason Hall
5b4d3e400c
apps-v1
Fix API Versions in README.md
2020-09-25 06:04:44 -04:00
Matt Moore
b3645fa096
Add a handful of files to trigger more analyses. (#197)
`.codecov.yaml` - Enable codecov.io coverage reports
`.golangci.yaml` - Enable the enumerated checks in golangci-lint
`boilerplate.*.txt` - Enable file header boilerplate checks for these extensions
2020-09-24 20:15:21 -07:00
Matt Moore
bd3f1cb17b
[Automated] Update actions (#194)
* Update common github actions

Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>

* Run gofmt
2020-09-24 19:00:36 -07:00
Matt Moore
985c449e0b
Fix goimports (#196) 2020-09-24 18:39:46 -07:00
Matt Moore
8d9a4172cc
upgrade to latest dependencies (#195)
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-09-24 18:34:43 -07:00
Matt Moore
33e66aca49
Remove deprecated things. (#162)
Fixes: https://github.com/google/ko/issues/158
Fixes: https://github.com/google/ko/issues/160
2020-09-24 16:14:58 -07:00
jonjohnsonjr
8b52ec2374
Multi-platform ko (#38)
🦜
2020-09-24 15:58:08 -07:00
Matt Moore
718587b3af
Add hack/update-deps.sh (#193) 2020-09-24 15:56:25 -07:00
Matt Moore
bec089d9c8
Fix k8s.io/cli-runtime "require" (#189)
The "require" is behind the version in "replace", and since cli-runtime references the package mentioned in the errors we are seeing, rule this out as a source!
2020-09-04 10:53:50 -07:00
Matt Moore
1e05e91f92
Pin k8s.io/api for good measure (#188) 2020-09-04 10:05:05 -07:00
Matt Moore
60e32d0655
Switch to go 1.14 in go.mod, test 1.15 (#187)
* Switch to go 1.14 in go.mod, test 1.15

* Fix the integration test semantics with go 1.14+
2020-09-04 09:31:01 -07:00
Markus Thömmes
64c2eef7ba
Bump Kubernetes dependencies to 1.18. (#186) 2020-09-04 08:58:35 -07:00
Markus Thömmes
1aa3b3793e
Allow images to be loaded into kind using 'kind.local'. (#180)
* Allow images to be loaded into kind using 'kind.local'.

* Add documentation for kind.
2020-09-04 08:32:26 -07:00
Matt Moore
b7b0435ef0
Format markdown using prettier. (#185) 2020-09-04 07:36:05 -07:00
Markus Thömmes
8104425e11
Update kind to the latest release. (#184) 2020-09-04 07:35:45 -07:00
Markus Thömmes
feb4443416 Format markdown using prettier. 2020-09-04 16:28:41 +02:00
Markus Thömmes
618b1631a5
Make Tarball publisher types private and return Interface. (#182) v0.5.2 2020-08-12 08:11:22 -07:00
Markus Thömmes
ecce857be6
Some small nits around the codebase to make linters happy. (#181) 2020-08-10 08:21:31 -07:00
Jon Donovan
6e4a93eee0
Add integration tests for various go mod corner cases. (#179)
* Add manual integration tests for various go mod corner cases.

* Move integration test back and actually test the outputs.

I realize now this is run in a travis CI job :) So I'll make it actually work.

* Add _, gofmt

* Add tools build constraint.

* Stop redirecting stderr

* Use local mode to support CI.
2020-08-05 12:16:28 -07:00
Matt Moore
ab4ca8ec17
Fix the other publishers (#165) 2020-05-06 13:26:22 -07:00
Matt Moore
ea2beac575
Fix -P with passing ko:// through. (#163)
Turns out I broke this.  Thanks to @bobcatfish for reporting the issue.

With this change:
```
ko resolve -Pf cmd/ko/test/test.yaml > /dev/null
2020/05/04 08:44:35 Using base gcr.io/distroless/static:nonroot for github.com/google/ko/cmd/ko/test
2020/05/04 08:44:36 Building github.com/google/ko/cmd/ko/test
2020/05/04 08:44:37 Publishing gcr.io/mattmoor-knative/github.com/google/ko/cmd/ko/test:latest
2020/05/04 08:44:39 Published gcr.io/mattmoor-knative/github.com/google/ko/cmd/ko/test@sha256:ee655510172b429dbce619fc69677621d71cb824cbbf2a21746d700127257ec4
```

I can cut v0.5.1 once this lands.
v0.5.1 v0.5.0
2020-05-04 09:06:55 -07:00
Matt Moore
d45c527750
This adds the deprecation notices for ko:// and nonroot (#161)
* Add a deprecation notice when `defaultBaseImage` is not specified.

Related: https://github.com/google/ko/issues/160

* Add a deprecation notice when `ko://` is not specified.

Related: https://github.com/google/ko/issues/158

* Add a sample import path.
2020-05-03 18:42:51 -07:00
Dave Protasowski
6cbfe964d7
[modules] Dependent command packages can now be built with ko (#154)
Thus if you have a (in)direct command package as a dependency
say `myhost.com/go/package/cmd/run` you can now publish this
with the following ko command

  ko publish myhost.com/go/package/cmd/run
2020-05-01 07:18:26 -07:00
Dave Protasowski
429a4097a7
Update .travis.yml (#156) 2020-04-30 16:27:12 -04:00
Matt Moore
ff61ea330c
Refactor how/where ko:// is handled. (#153)
This change more or less completely changes how `ko://` is handled internally to `ko`, but the user-facing changes should only be net-positive.  `ko://` was previously stripped at the highest level, and the build logic was unaware, which had some undesirable diagnostic/functional implications that are collectively addressed in this change.

With this change, the `ko://` prefix is preserved and passed to the build logic, which internally parses a new `reference` type (this was useful to have Go's type checker find all of the places that needed fixing).  The main functional differences are:
1. If a reference is prefixed with `ko://` we will now fail fast in `IsSupportedReference` regardless of whether `--strict` is passed.
2. If a reference is prefixed with `ko://` it will bypass the prefix check, which allows the use of `ko://github.com/another/repo` that references a vendored binary package.

For `2.` the absence of the module prefix causes the filtering logic Jon introduced to avoid the reference.  This was critical for efficiency when `ko://` isn't around because we feed every string in the yaml through it, but when the user has explicitly decorated things it's the perfect thing to be sensitive to.

Fixes: https://github.com/google/ko/issues/146
Fixes: https://github.com/google/ko/issues/152
2020-04-29 19:32:30 -07:00
Matt Moore
f45bc13ded
Viper keys are case insensitive. (#150)
* Viper keys are case insensitive.

This fixes an issue where import paths with uppercase (github.com/GoogleCloudPlatform 👀) were being canonicalized by Viper to all lowercase and the baseImageOverrides in `.ko.yaml` were failing to properly identify the base image.

I hit this in: https://github.com/tektoncd/pipeline/pull/2435 trying to opt some of the GCP images out of `:nonroot`.

This also adds some logging to a place where I see a lot of folks have issues with `ko` where we swallow an error.  I hit it experimenting with variants on the `ko publish` import path, and added the logging to debug.

* Drop the new log statement
2020-04-20 09:13:33 -07:00