1
0
Fork 0
mirror of https://github.com/imjasonh/kontain.me synced 2026-07-07 00:32:28 +00:00

fix some tests

Signed-off-by: Jason Hall <imjasonh@gmail.com>
This commit is contained in:
Jason Hall 2026-05-13 22:19:59 -04:00
parent c90342181d
commit c7ea6912f0
7 changed files with 19 additions and 18 deletions

View file

@ -2,7 +2,7 @@ locals {
apps = {
"apko" : {
cpu = 1
ram = "512Mi"
ram = "1Gi"
container_concurrency = 1
timeout_seconds = 900 # 15m
}
@ -19,7 +19,7 @@ locals {
timeout_seconds = 900 # 15m
}
"ko" : {
cpu = 2
cpu = 4
ram = "4Gi"
container_concurrency = 1
timeout_seconds = 900 # 15m

View file

@ -23,5 +23,14 @@ if [ "$before" = "$after" ]; then
exit 1
fi
GOPROXY=direct go get infinite-git.kontain.me@latest
GOPROXY=direct go get infinite-git.kontain.me@latest
# `go get` needs to run from a module that isn't infinite-go.kontain.me itself.
modtest=$(mktemp -d)
cd "$modtest"
cat > go.mod <<EOF
module test
go 1.24
EOF
GOPROXY=direct go get infinite-go.kontain.me@latest
GOPROXY=direct go get infinite-go.kontain.me@latest
rm -rf "$modtest"

View file

@ -259,16 +259,16 @@ func (s *server) fetchAndBuild(ctx context.Context, mod, version, filepath strin
// Create a tempdir and cd into it
// (This is only safe because concurrency=1)
tmpdir, err := os.CreateTemp("", "ko-*")
tmpdir, err := os.MkdirTemp("", "ko-*")
if err != nil {
return nil, err
}
// Clean up the temp dir. If building is successful, we'll serve a
// cached manifest and not need to rebuild.
defer os.RemoveAll(tmpdir.Name())
defer os.RemoveAll(tmpdir)
// Unzip and validate the module zip file.
if err := zip.Unzip(tmpdir.Name(), module.Version{
if err := zip.Unzip(tmpdir, module.Version{
Path: mod,
Version: version,
}, tmpzip.Name()); err != nil {
@ -277,7 +277,7 @@ func (s *server) fetchAndBuild(ctx context.Context, mod, version, filepath strin
// ko build the package.
g, err := build.NewGo(
ctx, tmpdir.Name(),
ctx, tmpdir,
build.WithBaseImages(s.getBaseImage),
build.WithPlatforms("all"),
build.WithConfig(map[string]build.Config{

View file

@ -4,6 +4,3 @@ set -eux
time crane validate --remote=ko.kontain.me/github.com/google/ko/test:latest
time crane validate --remote=ko.kontain.me/github.com/google/ko/test:latest
time crane validate --remote=ko.kontain.me/github.com/google/ko/test:v0.10.0
time crane validate --remote=ko.kontain.me/github.com/google/ko/test:main

View file

@ -2,5 +2,5 @@
set -eux
time crane validate --remote=mirror.kontain.me/busybox
time crane validate --remote=mirror.kontain.me/busybox
time crane validate --remote=mirror.kontain.me/cgr.dev/chainguard/busybox
time crane validate --remote=mirror.kontain.me/cgr.dev/chainguard/busybox

1
go.mod
View file

@ -189,7 +189,6 @@ require (
gopkg.in/ini.v1 v1.67.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
infinite-go.kontain.me v0.0.0-20260514014836-7342d5554691 // indirect
k8s.io/apimachinery v0.36.0 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
sigs.k8s.io/release-utils v0.12.4 // indirect

4
go.sum
View file

@ -1016,10 +1016,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
infinite-go.kontain.me v0.0.0-20260514014826-809726c2f439 h1:bLBaQ2s/AHqVJ7P7rAIrGndJsnVBKrblwUNcV1N5XVE=
infinite-go.kontain.me v0.0.0-20260514014826-809726c2f439/go.mod h1:jCDExCTcYpSmadEboALxkad3O9//SfK7LjKg19aODSI=
infinite-go.kontain.me v0.0.0-20260514014836-7342d5554691 h1:VV3xRzFhtxGWTL8WvXnWRnp8iT2CGiOdZAc0Doso6uQ=
infinite-go.kontain.me v0.0.0-20260514014836-7342d5554691/go.mod h1:jCDExCTcYpSmadEboALxkad3O9//SfK7LjKg19aODSI=
k8s.io/apimachinery v0.36.0 h1:jZyPzhd5Z+3h9vJLt0z9XdzW9VzNzWAUw+P1xZ9PXtQ=
k8s.io/apimachinery v0.36.0/go.mod h1:FklypaRJt6n5wUIwWXIP6GJlIpUizTgfo1T/As+Tyxc=
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=