Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update go project path from google/ko to ko-build/ko #1055

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ builds:
flags:
- -trimpath
ldflags:
- "-s -w -X github.com/google/ko/pkg/commands.Version={{.Version}}"
- "-s -w -X github.com/ko-build/ko/pkg/commands.Version={{.Version}}"
goos:
- windows
- linux
Expand All @@ -32,7 +32,7 @@ kos:
main: .
base_image: golang:1.20
ldflags:
- "-s -w -X github.com/google/ko/pkg/commands.Version={{.Version}}"
- "-s -w -X github.com/ko-build/ko/pkg/commands.Version={{.Version}}"
platforms:
- all
tags:
Expand Down
2 changes: 1 addition & 1 deletion .ko.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
baseImageOverrides:
github.com/google/ko: golang:1.20
github.com/ko-build/ko: golang:1.20

builds:
- id: ko
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `ko`: Easy Go Containers

[![GitHub Actions Build Status](https://github.com/ko-build/ko/workflows/Build/badge.svg)](https://github.com/ko-build/ko/actions?query=workflow%3ABuild)
[![GoDoc](https://godoc.org/github.com/google/ko?status.svg)](https://godoc.org/github.com/google/ko)
[![GoDoc](https://godoc.org/github.com/ko-build/ko?status.svg)](https://godoc.org/github.com/ko-build/ko)
[![Go Report Card](https://goreportcard.com/badge/ko-build/ko)](https://goreportcard.com/report/ko-build/ko)
[![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://slsa.dev/images/gh-badge-level3.svg)

Expand Down
2 changes: 1 addition & 1 deletion cmd/help/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"os"

"github.com/google/ko/pkg/commands"
"github.com/ko-build/ko/pkg/commands"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
)
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/go-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

`ko`'s functionality can be consumed as a library in a Go application.

To build an image, use [`pkg/build`](https://pkg.go.dev/github.com/google/ko/pkg/build), and publish it with [`pkg/publish`](https://pkg.go.dev/github.com/google/ko/pkg/publish).
To build an image, use [`pkg/build`](https://pkg.go.dev/github.com/ko-build/ko/pkg/build), and publish it with [`pkg/publish`](https://pkg.go.dev/github.com/ko-build/ko/pkg/publish).

8 changes: 4 additions & 4 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We generate [SLSA3 provenance](https://slsa.dev) using the OpenSSF's [slsa-frame
```shell
$ curl -sSfL "https://github.com/ko-build/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz" > ko.tar.gz
$ curl -sSfL https://github.com/ko-build/ko/releases/download/v${VERSION}/attestation.intoto.jsonl > provenance.intoto.jsonl
$ slsa-verifier -artifact-path ko.tar.gz -provenance provenance.intoto.jsonl -source github.com/google/ko -tag "v${VERSION}"
$ slsa-verifier -artifact-path ko.tar.gz -provenance provenance.intoto.jsonl -source github.com/ko-build/ko -tag "v${VERSION}"
PASSED: Verified SLSA provenance
```

Expand Down Expand Up @@ -44,14 +44,14 @@ apk add ko
With Go 1.16+, build and install the latest released version:

```plaintext
go install github.com/google/ko@latest
go install github.com/ko-build/ko@latest
```

### Setup on GitHub Actions

You can use the [setup-ko](https://github.com/imjasonh/setup-ko) action to install ko and setup auth to [GitHub Container Registry](https://github.com/features/packages) in a GitHub Action workflow:
You can use the [setup-ko](https://github.com/ko-build/setup-ko) action to install ko and setup auth to [GitHub Container Registry](https://github.com/features/packages) in a GitHub Action workflow:

```plaintext
steps:
- uses: imjasonh/[email protected]
- uses: ko-build/[email protected]
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/google/ko
module github.com/ko-build/ko

go 1.19

Expand Down
6 changes: 3 additions & 3 deletions integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export GOPATH
pushd "$GOPATH" || exit 1

echo "Copying ko to temp gopath."
mkdir -p "$GOPATH/src/github.com/google/ko"
cp -r "$ROOT_DIR/"* "$GOPATH/src/github.com/google/ko/"
mkdir -p "$GOPATH/src/github.com/ko-build/ko"
cp -r "$ROOT_DIR/"* "$GOPATH/src/github.com/ko-build/ko/"

echo "Downloading github.com/go-training/helloworld"
GO111MODULE=off go get -d github.com/go-training/helloworld

pushd "$GOPATH/src/github.com/google/ko" || exit 1
pushd "$GOPATH/src/github.com/ko-build/ko" || exit 1

echo "Replacing hello world in vendor with TEST."
sed -i 's/Hello World/TEST/g' ./vendor/github.com/go-training/helloworld/main.go
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"os/signal"

"github.com/google/ko/pkg/commands"
"github.com/ko-build/ko/pkg/commands"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ plugins:
'issues.md': 'https://github.com/ko-build/ko/issues'
'prs.md': 'https://github.com/ko-build/ko/pulls'
'releases.md': 'https://github.com/ko-build/ko/releases'
'godoc.md': 'https://pkg.go.dev/github.com/google/ko'
'godoc.md': 'https://pkg.go.dev/github.com/ko-build/ko'
'terraform.md': 'https://github.com/ko-build/terraform-provider-ko'
'action.md': 'https://github.com/ko-build/setup-ko'
'slack.md': 'https://kubernetes.slack.com/archives/C01T7DTP65S'
Expand Down
2 changes: 1 addition & 1 deletion pkg/build/gobuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
"github.com/google/go-containerregistry/pkg/v1/mutate"
"github.com/google/go-containerregistry/pkg/v1/tarball"
"github.com/google/go-containerregistry/pkg/v1/types"
"github.com/google/ko/internal/sbom"
"github.com/ko-build/ko/internal/sbom"
specsv1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/sigstore/cosign/v2/pkg/oci"
ocimutate "github.com/sigstore/cosign/v2/pkg/oci/mutate"
Expand Down
44 changes: 22 additions & 22 deletions pkg/build/gobuild_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,37 +74,37 @@ func TestGoBuildQualifyImport(t *testing.T) {
}{
{
description: "strict qualified import path",
rawImportpath: "ko://github.com/google/ko",
rawImportpath: "ko://github.com/ko-build/ko",
dir: "",
qualifiedImportpath: "ko://github.com/google/ko",
qualifiedImportpath: "ko://github.com/ko-build/ko",
expectError: false,
},
{
description: "strict qualified import path in subdirectory of go.mod",
rawImportpath: "ko://github.com/google/ko/test",
rawImportpath: "ko://github.com/ko-build/ko/test",
dir: "",
qualifiedImportpath: "ko://github.com/google/ko/test",
qualifiedImportpath: "ko://github.com/ko-build/ko/test",
expectError: false,
},
{
description: "non-strict qualified import path",
rawImportpath: "github.com/google/ko",
rawImportpath: "github.com/ko-build/ko",
dir: "",
qualifiedImportpath: "ko://github.com/google/ko",
qualifiedImportpath: "ko://github.com/ko-build/ko",
expectError: false,
},
{
description: "non-strict local import path in repository root directory",
rawImportpath: "./test",
dir: repoDir,
qualifiedImportpath: "ko://github.com/google/ko/test",
qualifiedImportpath: "ko://github.com/ko-build/ko/test",
expectError: false,
},
{
description: "non-strict local import path in subdirectory",
rawImportpath: ".",
dir: filepath.Join(repoDir, "test"),
qualifiedImportpath: "ko://github.com/google/ko/test",
qualifiedImportpath: "ko://github.com/ko-build/ko/test",
expectError: false,
},
{
Expand Down Expand Up @@ -153,7 +153,7 @@ func TestGoBuildIsSupportedRef(t *testing.T) {

// Supported import paths.
for _, importpath := range []string{
"ko://github.com/google/ko", // ko can build itself.
"ko://github.com/ko-build/ko", // ko can build itself.
} {
t.Run(importpath, func(t *testing.T) {
if err := ng.IsSupportedReference(importpath); err != nil {
Expand All @@ -164,8 +164,8 @@ func TestGoBuildIsSupportedRef(t *testing.T) {

// Unsupported import paths.
for _, importpath := range []string{
"ko://github.com/google/ko/pkg/build", // not a command.
"ko://github.com/google/ko/pkg/nonexistent", // does not exist.
"ko://github.com/ko-build/ko/pkg/build", // not a command.
"ko://github.com/ko-build/ko/pkg/nonexistent", // does not exist.
} {
t.Run(importpath, func(t *testing.T) {
if err := ng.IsSupportedReference(importpath); err == nil {
Expand All @@ -192,7 +192,7 @@ func TestGoBuildIsSupportedRefWithModules(t *testing.T) {

// Supported import paths.
for _, importpath := range []string{
"ko://github.com/google/ko/test", // ko can build the test package.
"ko://github.com/ko-build/ko/test", // ko can build the test package.
"ko://github.com/go-training/helloworld", // ko can build commands in dependent modules
} {
t.Run(importpath, func(t *testing.T) {
Expand All @@ -204,9 +204,9 @@ func TestGoBuildIsSupportedRefWithModules(t *testing.T) {

// Unsupported import paths.
for _, importpath := range []string{
"ko://github.com/google/ko/pkg/build", // not a command.
"ko://github.com/google/ko/pkg/nonexistent", // does not exist.
"ko://github.com/google/go-github", // not in this module.
"ko://github.com/ko-build/ko/pkg/build", // not a command.
"ko://github.com/ko-build/ko/pkg/nonexistent", // does not exist.
"ko://github.com/google/go-github", // not in this module.
} {
t.Run(importpath, func(t *testing.T) {
if err := ng.IsSupportedReference(importpath); err == nil {
Expand Down Expand Up @@ -427,7 +427,7 @@ func TestGoBuildNoKoData(t *testing.T) {
if err != nil {
t.Fatalf("random.Image() = %v", err)
}
importpath := "github.com/google/ko"
importpath := "github.com/ko-build/ko"

creationTime := v1.Time{Time: time.Unix(5000, 0)}
ng, err := NewGo(
Expand Down Expand Up @@ -708,7 +708,7 @@ func TestGoBuild(t *testing.T) {
if err != nil {
t.Fatalf("random.Image() = %v", err)
}
importpath := "github.com/google/ko"
importpath := "github.com/ko-build/ko"

creationTime := v1.Time{Time: time.Unix(5000, 0)}
ng, err := NewGo(
Expand Down Expand Up @@ -788,7 +788,7 @@ func TestGoBuildWithKOCACHE(t *testing.T) {
if err != nil {
t.Fatalf("random.Image() = %v", err)
}
importpath := "github.com/google/ko"
importpath := "github.com/ko-build/ko"

creationTime := v1.Time{Time: time.Unix(5000, 0)}
ng, err := NewGo(
Expand Down Expand Up @@ -821,7 +821,7 @@ func TestGoBuildWithoutSBOM(t *testing.T) {
if err != nil {
t.Fatalf("random.Image() = %v", err)
}
importpath := "github.com/google/ko"
importpath := "github.com/ko-build/ko"

creationTime := v1.Time{Time: time.Unix(5000, 0)}
ng, err := NewGo(
Expand Down Expand Up @@ -860,7 +860,7 @@ func TestGoBuildIndex(t *testing.T) {
if err != nil {
t.Fatalf("random.Image() = %v", err)
}
importpath := "github.com/google/ko"
importpath := "github.com/ko-build/ko"

creationTime := v1.Time{Time: time.Unix(5000, 0)}
ng, err := NewGo(
Expand Down Expand Up @@ -932,7 +932,7 @@ func TestNestedIndex(t *testing.T) {
if err != nil {
t.Fatalf("random.Image() = %v", err)
}
importpath := "github.com/google/ko"
importpath := "github.com/ko-build/ko"

nestedBase := mutate.AppendManifests(empty.Index, mutate.IndexAddendum{Add: base})

Expand Down Expand Up @@ -1198,7 +1198,7 @@ func TestGoBuildConsistentMediaTypes(t *testing.T) {
t.Fatalf("NewGo() = %v", err)
}

importpath := "github.com/google/ko"
importpath := "github.com/ko-build/ko"

result, err := ng.Build(context.Background(), StrictScheme+importpath)
if err != nil {
Expand Down
14 changes: 7 additions & 7 deletions pkg/build/gobuilds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,39 +45,39 @@ func Test_gobuilds(t *testing.T) {
{
description: "default builder used when no build configs provided",
opts: opts,
importpath: "github.com/google/ko",
importpath: "github.com/ko-build/ko",
},
{
description: "match build config using fully qualified import path",
workingDirectory: "../..",
buildConfigs: map[string]Config{
"github.com/google/ko/test": {
"github.com/ko-build/ko/test": {
ID: "build-config-0",
Dir: "test",
},
},
nilDefaultBuilder: true,
opts: opts,
importpath: "github.com/google/ko/test",
importpath: "github.com/ko-build/ko/test",
},
{
description: "match build config using ko scheme-prefixed fully qualified import path",
workingDirectory: "../..",
buildConfigs: map[string]Config{
"github.com/google/ko/test": {
"github.com/ko-build/ko/test": {
ID: "build-config-1",
Dir: "test",
},
},
nilDefaultBuilder: true,
opts: opts,
importpath: "ko://github.com/google/ko/test",
importpath: "ko://github.com/ko-build/ko/test",
},
{
description: "find build config by resolving local import path to fully qualified import path",
workingDirectory: "../../test",
buildConfigs: map[string]Config{
"github.com/google/ko/test": {
"github.com/ko-build/ko/test": {
ID: "build-config-2",
},
},
Expand All @@ -89,7 +89,7 @@ func Test_gobuilds(t *testing.T) {
description: "find build config by matching local import path to build config directory",
workingDirectory: "../..",
buildConfigs: map[string]Config{
"github.com/google/ko/tes12t": {
"github.com/ko-build/ko/tes12t": {
ID: "build-config-3",
Dir: "test",
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"os/exec"

"github.com/google/ko/pkg/commands/options"
"github.com/ko-build/ko/pkg/commands/options"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package commands
import (
"fmt"

"github.com/google/ko/pkg/commands/options"
"github.com/ko-build/ko/pkg/commands/options"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import (
"github.com/google/go-containerregistry/pkg/v1/google"
"github.com/google/go-containerregistry/pkg/v1/remote"

"github.com/google/ko/pkg/build"
"github.com/google/ko/pkg/commands/options"
"github.com/google/ko/pkg/publish"
"github.com/ko-build/ko/pkg/build"
"github.com/ko-build/ko/pkg/commands/options"
"github.com/ko-build/ko/pkg/publish"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/google/go-containerregistry/pkg/crane"

"github.com/google/ko/pkg/commands/options"
"github.com/ko-build/ko/pkg/commands/options"
)

func TestOverrideDefaultBaseImageUsingBuildOption(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os/exec"
"strings"

"github.com/google/ko/pkg/commands/options"
"github.com/ko-build/ko/pkg/commands/options"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/commands/options/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/spf13/viper"
"golang.org/x/tools/go/packages"

"github.com/google/ko/pkg/build"
"github.com/ko-build/ko/pkg/build"
)

const (
Expand Down Expand Up @@ -202,7 +202,7 @@ func createBuildConfigMap(workingDirectory string, configs []build.Config) (map[
path = filepath.Dir(config.Main)
}

// Verify that the path actually leads to a local file (https://github.com/google/ko/issues/483)
// Verify that the path actually leads to a local file (https://github.com/ko-build/ko/issues/483)
if _, err := os.Stat(filepath.Join(baseDir, path)); err != nil {
return nil, err
}
Expand Down
Loading