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

Migrate pkg/object and pkg/gcp/gcp.go to sigs.k8s.io/release-sdk #2232

Merged
merged 3 commits into from
Aug 31, 2021
Merged
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 cmd/gh2gcs/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"github.com/spf13/pflag"
"gopkg.in/yaml.v2"

"k8s.io/release/pkg/gcp"
"k8s.io/release/pkg/gh2gcs"
"k8s.io/release/pkg/github"
"sigs.k8s.io/release-sdk/gcli"
"sigs.k8s.io/release-utils/log"
)

Expand Down Expand Up @@ -199,7 +199,7 @@ func run(opts *options) error {
return errors.Wrap(err, "validating gh2gcs options")
}

if err := gcp.PreCheck(); err != nil {
if err := gcli.PreCheck(); err != nil {
return errors.Wrap(err, "pre-checking for GCP package usage")
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/krel/cmd/testgrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

"k8s.io/release/pkg/git"
"k8s.io/release/pkg/github"
"k8s.io/release/pkg/object"
"sigs.k8s.io/release-sdk/object"
"sigs.k8s.io/release-utils/http"
)

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ require (
k8s.io/utils v0.0.0-20210305010621-2afb4311ab10
sigs.k8s.io/k8s-container-image-promoter v1.337.0
sigs.k8s.io/mdtoc v1.0.1
sigs.k8s.io/release-sdk v0.1.0
sigs.k8s.io/release-utils v0.3.0
sigs.k8s.io/yaml v1.2.0
sigs.k8s.io/zeitgeist v0.3.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,8 @@ sigs.k8s.io/k8s-container-image-promoter v1.337.0 h1:gs4zv5TSQzlJAapX1Tkm5FuLcX1
sigs.k8s.io/k8s-container-image-promoter v1.337.0/go.mod h1:wdNhLd/SlIs+rgTw8D6RaaUWSdTnM0OEhGfXU3kI50o=
sigs.k8s.io/mdtoc v1.0.1 h1:6ECKhQnbetwZBR6R2IeT2LH+1w+2Zsip0iXjikgaXIk=
sigs.k8s.io/mdtoc v1.0.1/go.mod h1:COYBtOjsaCg7o7SC4eaLwEXPuVRSuiVuLLRrHd7kShw=
sigs.k8s.io/release-sdk v0.1.0 h1:gesMqsV1W1r0PS9dbxeX0nuW45ZoRsIzILA23+WFjYU=
sigs.k8s.io/release-sdk v0.1.0/go.mod h1:XhDgjf0bu2Vuyosp0Cc/mc3UUJiWS171S7WsNxA9iY0=
sigs.k8s.io/release-utils v0.2.0/go.mod h1:9O5livl2h3Q56jUkoZ7UnV22XVRB6MuD4l/51C2vAPg=
sigs.k8s.io/release-utils v0.2.1/go.mod h1:J9xpziRNRI4mAeMZxPRryDodQMoMudMu6yC1aViFHU4=
sigs.k8s.io/release-utils v0.3.0 h1:cyNeXvm+2lPn67f4MWmq9xapZDAI5hekpT7iQPRxta4=
Expand Down
2 changes: 1 addition & 1 deletion pkg/anago/anagofakes/fake_release_impl.go

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

2 changes: 1 addition & 1 deletion pkg/anago/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"k8s.io/release/pkg/build"
"k8s.io/release/pkg/gcp/gcb"
"k8s.io/release/pkg/git"
"k8s.io/release/pkg/object"
"k8s.io/release/pkg/release"
"sigs.k8s.io/release-sdk/object"
"sigs.k8s.io/release-utils/log"
"sigs.k8s.io/release-utils/util"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/files/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"strings"

"k8s.io/release/pkg/object"
"sigs.k8s.io/release-sdk/object"
)

// Validate checks for semantic errors in the yaml fields (the structure of the
Expand Down
2 changes: 1 addition & 1 deletion pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"

"k8s.io/release/pkg/object"
"k8s.io/release/pkg/release"
"sigs.k8s.io/release-sdk/object"
)

var DefaultExtraVersionMarkers = []string{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/changelog/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"k8s.io/release/pkg/notes"
"k8s.io/release/pkg/notes/document"
"k8s.io/release/pkg/notes/options"
"k8s.io/release/pkg/object"
"sigs.k8s.io/release-sdk/object"
"sigs.k8s.io/release-utils/http"
"sigs.k8s.io/release-utils/util"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cve/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

"github.com/pkg/errors"

"k8s.io/release/pkg/object"
"k8s.io/release/pkg/release"
"sigs.k8s.io/release-sdk/object"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/cve/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"gopkg.in/yaml.v2"

"k8s.io/release/pkg/notes"
"k8s.io/release/pkg/object"
"sigs.k8s.io/release-sdk/object"
)

//counterfeiter:generate . ClientImplementation
Expand Down
2 changes: 1 addition & 1 deletion pkg/filepromoter/filestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"google.golang.org/api/option"

api "k8s.io/release/pkg/api/files"
"k8s.io/release/pkg/object"
"sigs.k8s.io/release-sdk/object"
)

// FilestorePromoter manages the promotion of files.
Expand Down
2 changes: 1 addition & 1 deletion pkg/filepromoter/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"google.golang.org/api/iterator"

api "k8s.io/release/pkg/api/files"
"k8s.io/release/pkg/object"
"sigs.k8s.io/release-sdk/object"
)

type gcsSyncFilestore struct {
Expand Down
7 changes: 3 additions & 4 deletions pkg/gcp/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ import (
"strings"

"github.com/pkg/errors"

"k8s.io/release/pkg/gcp"
"sigs.k8s.io/release-sdk/gcli"
)

func GetCurrentGCPUser() (string, error) {
gcpUser, err := gcp.GCloudOutput(
gcpUser, err := gcli.GCloudOutput(
"auth",
"list",
"--filter=status:ACTIVE",
Expand All @@ -46,7 +45,7 @@ func GetCurrentGCPUser() (string, error) {
}

func ConfigureDocker() error {
err := gcp.GCloud(
err := gcli.GCloud(
"auth",
"configure-docker",
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/gcp/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
"google.golang.org/api/cloudbuild/v1"
"google.golang.org/api/option"

"k8s.io/release/pkg/gcp"
"k8s.io/release/pkg/object"
"k8s.io/release/pkg/release"
"sigs.k8s.io/release-sdk/gcli"
"sigs.k8s.io/release-sdk/object"
"sigs.k8s.io/release-utils/command"
"sigs.k8s.io/release-utils/tar"
"sigs.k8s.io/yaml"
Expand Down Expand Up @@ -237,7 +237,7 @@ func RunSingleJob(o *Options, jobName, uploaded, version string, subs map[string
args = append(args, diskSizeArg)
}

cmd := command.New(gcp.GCloudExecutable, args...)
cmd := command.New(gcli.GCloudExecutable, args...)

if o.LogDir != "" {
p := path.Join(o.LogDir, strings.ReplaceAll(jobName, "/", "-")+".log")
Expand Down
4 changes: 2 additions & 2 deletions pkg/gcp/gcb/gcb.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"

"k8s.io/release/pkg/gcp"
"k8s.io/release/pkg/gcp/auth"
"k8s.io/release/pkg/gcp/build"
"k8s.io/release/pkg/git"
"k8s.io/release/pkg/kubecross"
"k8s.io/release/pkg/release"
"sigs.k8s.io/release-sdk/gcli"
"sigs.k8s.io/release-utils/util"
)

Expand Down Expand Up @@ -189,7 +189,7 @@ func (g *GCB) Submit() error {
toolRepo := release.GetToolRepo()
toolRef := release.GetToolRef()

if err := gcp.PreCheck(); err != nil {
if err := gcli.PreCheck(); err != nil {
return errors.Wrap(err, "pre-checking for GCP package usage")
}

Expand Down
78 changes: 0 additions & 78 deletions pkg/gcp/gcp.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/gh2gcs/gh2gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/sirupsen/logrus"

"k8s.io/release/pkg/github"
"k8s.io/release/pkg/object"
"sigs.k8s.io/release-sdk/object"
)

// Config contains a slice of `ReleaseConfig` to be used when unmarshalling a
Expand Down
2 changes: 1 addition & 1 deletion pkg/notes/notes_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"

"k8s.io/release/pkg/object"
"sigs.k8s.io/release-sdk/object"
)

// MapProvider interface that obtains release notes maps from a source
Expand Down
Loading