Skip to content

Commit

Permalink
Merge pull request #428 from justaugustus/promo-tools-rename
Browse files Browse the repository at this point in the history
Module rename: sigs.k8s.io/k8s-container-image-promoter --> sigs.k8s.io/promo-tools
  • Loading branch information
k8s-ci-robot authored Sep 15, 2021
2 parents d85f44a + 980491c commit 6c74cdb
Show file tree
Hide file tree
Showing 53 changed files with 91 additions and 91 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-kpromo
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ARG GO_VERSION
ARG OS_CODENAME
FROM golang:${GO_VERSION}-${OS_CODENAME} as builder

WORKDIR /go/src/sigs.k8s.io/k8s-container-image-promoter
WORKDIR /go/src/sigs.k8s.io/promo-tools

# Copy the sources
ENV package="./cmd/kpromo"
Expand All @@ -44,6 +44,6 @@ LABEL maintainers="Kubernetes Authors"
LABEL description="kpromo: The Kubernetes project artifact promoter"

WORKDIR /
COPY --from=builder /go/src/sigs.k8s.io/k8s-container-image-promoter/kpromo .
COPY --from=builder /go/src/sigs.k8s.io/promo-tools/kpromo .

ENTRYPOINT ["/kpromo"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Currently only Google Container Registry (GCR) is supported.
2. Run the steps below:

```console
go get sigs.k8s.io/k8s-container-image-promoter
cd $GOPATH/src/sigs.k8s.io/k8s-container-image-promoter
go get sigs.k8s.io/promo-tools
cd $GOPATH/src/sigs.k8s.io/promo-tools

# Install the "cip" binary into $GOPATH/bin
make install
Expand Down Expand Up @@ -384,7 +384,7 @@ the VERSION file often as the Docker images will always get a unique identifier.

## Checks Interface

Read more [here](https://github.com/kubernetes-sigs/k8s-container-image-promoter/blob/master/checks_interface.md).
Read more [here](https://github.com/kubernetes-sigs/promo-tools/blob/master/checks_interface.md).

The addition of the checks interface to the Container Image Promoter is meant
to make it easy to add checks against pull requests affecting the promoter
Expand Down
2 changes: 1 addition & 1 deletion api/files/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"
"testing"

"sigs.k8s.io/k8s-container-image-promoter/v3/api/files"
"sigs.k8s.io/promo-tools/v3/api/files"
)

func TestValidateFilestores(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions checks_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ check requirements in the future.

## Interface Explanation
The `PreCheck` interface is implemented like so in the
[types.go](https://github.com/kubernetes-sigs/k8s-container-image-promoter/blob/master/lib/dockerregistry/types.go)
[types.go](https://github.com/kubernetes-sigs/promo-tools/blob/master/lib/dockerregistry/types.go)
file. The `Run` function is the method used in order to actually execute the
check that implements this interface.

Expand Down Expand Up @@ -54,7 +54,7 @@ func (f *foo) Run() error
```
Then add that check type you've created to the input list of PreChecks for
the RunChecks method, which is called in the
[cip.go](https://github.com/kubernetes-sigs/k8s-container-image-promoter/blob/master/cip.go)
[cip.go](https://github.com/kubernetes-sigs/promo-tools/blob/master/cip.go)
file.

Note that the `Run` method of the precheck interface does not accept any
Expand Down
2 changes: 1 addition & 1 deletion cmd/cip-mm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

reg "sigs.k8s.io/k8s-container-image-promoter/v3/legacy/dockerregistry"
reg "sigs.k8s.io/promo-tools/v3/legacy/dockerregistry"
"sigs.k8s.io/release-utils/log"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/cip/cmd/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"

"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/cli"
"sigs.k8s.io/promo-tools/v3/legacy/cli"
)

// auditCmd represents the base command when called without any subcommands
Expand Down
2 changes: 1 addition & 1 deletion cmd/cip/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/cli"
"sigs.k8s.io/promo-tools/v3/legacy/cli"
"sigs.k8s.io/release-utils/log"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/cip/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"

"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/cli"
"sigs.k8s.io/promo-tools/v3/legacy/cli"
)

// runCmd represents the base command when called without any subcommands
Expand Down
2 changes: 1 addition & 1 deletion cmd/cip/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cmd
import (
"github.com/spf13/cobra"

"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/cli"
"sigs.k8s.io/promo-tools/v3/legacy/cli"
)

var versionOpts = &cli.VersionOptions{}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cip/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

package main

import "sigs.k8s.io/k8s-container-image-promoter/v3/cmd/cip/cmd"
import "sigs.k8s.io/promo-tools/v3/cmd/cip/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion cmd/gh2gcs/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/spf13/pflag"
"gopkg.in/yaml.v2"

"sigs.k8s.io/k8s-container-image-promoter/v3/gh2gcs"
"sigs.k8s.io/promo-tools/v3/gh2gcs"
"sigs.k8s.io/release-sdk/gcli"
"sigs.k8s.io/release-sdk/github"
"sigs.k8s.io/release-utils/log"
Expand Down
2 changes: 1 addition & 1 deletion cmd/gh2gcs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

package main

import "sigs.k8s.io/k8s-container-image-promoter/v3/cmd/gh2gcs/cmd"
import "sigs.k8s.io/promo-tools/v3/cmd/gh2gcs/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion cmd/kpromo/cmd/manifest/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"

"sigs.k8s.io/k8s-container-image-promoter/v3/promobot"
"sigs.k8s.io/promo-tools/v3/promobot"
"sigs.k8s.io/yaml"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/kpromo/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"sigs.k8s.io/k8s-container-image-promoter/v3/cmd/kpromo/cmd/manifest"
"sigs.k8s.io/k8s-container-image-promoter/v3/cmd/kpromo/cmd/run"
"sigs.k8s.io/promo-tools/v3/cmd/kpromo/cmd/manifest"
"sigs.k8s.io/promo-tools/v3/cmd/kpromo/cmd/run"
"sigs.k8s.io/release-utils/log"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/kpromo/cmd/run/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"

"sigs.k8s.io/k8s-container-image-promoter/v3/promobot"
"sigs.k8s.io/promo-tools/v3/promobot"
)

// filesCmd represents the subcommand for `kpromo run files`
Expand Down
2 changes: 1 addition & 1 deletion cmd/kpromo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.

package main

import "sigs.k8s.io/k8s-container-image-promoter/v3/cmd/kpromo/cmd"
import "sigs.k8s.io/promo-tools/v3/cmd/kpromo/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion filepromoter/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/sirupsen/logrus"

api "sigs.k8s.io/k8s-container-image-promoter/v3/api/files"
api "sigs.k8s.io/promo-tools/v3/api/files"
"sigs.k8s.io/release-utils/hash"
)

Expand Down
2 changes: 1 addition & 1 deletion filepromoter/filepromoterfakes/fake_sync_file_op.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion filepromoter/filepromoterfakes/fake_sync_filestore.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion filepromoter/filestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/sirupsen/logrus"
"google.golang.org/api/option"

api "sigs.k8s.io/k8s-container-image-promoter/v3/api/files"
api "sigs.k8s.io/promo-tools/v3/api/files"
"sigs.k8s.io/release-sdk/object"
)

Expand Down
2 changes: 1 addition & 1 deletion filepromoter/filestore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/stretchr/testify/require"

api "sigs.k8s.io/k8s-container-image-promoter/v3/api/files"
api "sigs.k8s.io/promo-tools/v3/api/files"
)

func Test_useStorageClientAuth(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion filepromoter/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/sirupsen/logrus"
"google.golang.org/api/iterator"

api "sigs.k8s.io/k8s-container-image-promoter/v3/api/files"
api "sigs.k8s.io/promo-tools/v3/api/files"
"sigs.k8s.io/release-sdk/object"
)

Expand Down
2 changes: 1 addition & 1 deletion filepromoter/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/sirupsen/logrus"

api "sigs.k8s.io/k8s-container-image-promoter/v3/api/files"
api "sigs.k8s.io/promo-tools/v3/api/files"
)

// ManifestPromoter promotes files as described in Manifest.
Expand Down
2 changes: 1 addition & 1 deletion filepromoter/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/sirupsen/logrus"
"golang.org/x/oauth2"

"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/gcloud"
"sigs.k8s.io/promo-tools/v3/legacy/gcloud"
)

// gcloudTokenSource implements oauth2.TokenSource.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module sigs.k8s.io/k8s-container-image-promoter/v3
module sigs.k8s.io/promo-tools/v3

go 1.17

Expand Down
2 changes: 1 addition & 1 deletion go_with_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fi

tool="$2"
git_tree_state=dirty
pkg=sigs.k8s.io/k8s-container-image-promoter/internal/version
pkg=sigs.k8s.io/promo-tools/internal/version

if git_status=$(git status --porcelain --untracked=no 2>/dev/null) && [[ -z "${git_status}" ]]; then
git_tree_state=clean
Expand Down
2 changes: 1 addition & 1 deletion hack/test-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ go_test_flags=(
)

packages=()
mapfile -t packages < <(go list ./... | grep -v 'sigs.k8s.io/k8s-container-image-promoter/cmd\|test-e2e')
mapfile -t packages < <(go list ./... | grep -v 'sigs.k8s.io/promo-tools/cmd\|test-e2e')

export GO111MODULE=on

Expand Down
8 changes: 4 additions & 4 deletions legacy/audit/auditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"cloud.google.com/go/errorreporting"
"github.com/sirupsen/logrus"

reg "sigs.k8s.io/k8s-container-image-promoter/v3/legacy/dockerregistry"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/logclient"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/remotemanifest"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/report"
reg "sigs.k8s.io/promo-tools/v3/legacy/dockerregistry"
"sigs.k8s.io/promo-tools/v3/legacy/logclient"
"sigs.k8s.io/promo-tools/v3/legacy/remotemanifest"
"sigs.k8s.io/promo-tools/v3/legacy/report"
)

// InitRealServerContext creates a ServerContext with facilities that are meant
Expand Down
14 changes: 7 additions & 7 deletions legacy/audit/auditor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (

"github.com/stretchr/testify/require"

"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/audit"
reg "sigs.k8s.io/k8s-container-image-promoter/v3/legacy/dockerregistry"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/logclient"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/remotemanifest"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/report"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/stream"
"sigs.k8s.io/promo-tools/v3/legacy/audit"
reg "sigs.k8s.io/promo-tools/v3/legacy/dockerregistry"
"sigs.k8s.io/promo-tools/v3/legacy/logclient"
"sigs.k8s.io/promo-tools/v3/legacy/remotemanifest"
"sigs.k8s.io/promo-tools/v3/legacy/report"
"sigs.k8s.io/promo-tools/v3/legacy/stream"
)

func TestParsePubSubMessageBody(t *testing.T) {
Expand Down Expand Up @@ -177,7 +177,7 @@ func TestValidatePayload(t *testing.T) {

func TestAudit(t *testing.T) {
// Regression test case for
// https://github.com/kubernetes-sigs/k8s-container-image-promoter/issues/191.
// https://github.com/kubernetes-sigs/promo-tools/issues/191.
manifests1 := []reg.Manifest{
{
Registries: []reg.RegistryContext{
Expand Down
10 changes: 5 additions & 5 deletions legacy/audit/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ limitations under the License.
package audit

import (
reg "sigs.k8s.io/k8s-container-image-promoter/v3/legacy/dockerregistry"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/logclient"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/remotemanifest"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/report"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/stream"
reg "sigs.k8s.io/promo-tools/v3/legacy/dockerregistry"
"sigs.k8s.io/promo-tools/v3/legacy/logclient"
"sigs.k8s.io/promo-tools/v3/legacy/remotemanifest"
"sigs.k8s.io/promo-tools/v3/legacy/report"
"sigs.k8s.io/promo-tools/v3/legacy/stream"
)

// GcrReadingFacility holds functions used to create streams for reading the
Expand Down
6 changes: 3 additions & 3 deletions legacy/cli/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"

"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/audit"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/reqcounter"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/signals"
"sigs.k8s.io/promo-tools/v3/legacy/audit"
"sigs.k8s.io/promo-tools/v3/legacy/reqcounter"
"sigs.k8s.io/promo-tools/v3/legacy/signals"
)

type AuditOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion legacy/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package cli
import (
"fmt"

"sigs.k8s.io/k8s-container-image-promoter/v3/internal/version"
"sigs.k8s.io/promo-tools/v3/internal/version"
)

type RootOptions struct {
Expand Down
6 changes: 3 additions & 3 deletions legacy/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"

reg "sigs.k8s.io/k8s-container-image-promoter/v3/legacy/dockerregistry"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/gcloud"
"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/stream"
reg "sigs.k8s.io/promo-tools/v3/legacy/dockerregistry"
"sigs.k8s.io/promo-tools/v3/legacy/gcloud"
"sigs.k8s.io/promo-tools/v3/legacy/stream"
)

type RunOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion legacy/cli/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/pkg/errors"

"sigs.k8s.io/k8s-container-image-promoter/v3/internal/version"
"sigs.k8s.io/promo-tools/v3/internal/version"
)

type VersionOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion legacy/dockerregistry/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
gogit "gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"

"sigs.k8s.io/k8s-container-image-promoter/v3/legacy/stream"
"sigs.k8s.io/promo-tools/v3/legacy/stream"
)

// MBToBytes converts a value from MiB to Bytes.
Expand Down
2 changes: 1 addition & 1 deletion legacy/dockerregistry/checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/require"
grafeaspb "google.golang.org/genproto/googleapis/grafeas/v1"

reg "sigs.k8s.io/k8s-container-image-promoter/v3/legacy/dockerregistry"
reg "sigs.k8s.io/promo-tools/v3/legacy/dockerregistry"
)

func TestImageRemovalCheck(t *testing.T) {
Expand Down
Loading

0 comments on commit 6c74cdb

Please sign in to comment.