Skip to content

Commit

Permalink
Update imports for v2 compatibility (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Greyo <[email protected]>
saley89 and mgreyo authored Feb 22, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 0e3da3e commit c72b543
Showing 30 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ builds:
- goos: windows
goarch: arm64
ldflags:
- -s -X "github.com/sky-uk/osprey/cmd.version={{.Version}}" -X "github.com/sky-uk/osprey/cmd.buildTime={{.Date}})"
- -s -X "github.com/sky-uk/osprey/v2/cmd.version={{.Version}}" -X "github.com/sky-uk/osprey/v2/cmd.buildTime={{.Date}})"
archives:
- replacements:
darwin: Darwin
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ latest_git_tag := $(shell git for-each-ref --format="%(tag)" --sort=-taggerdate
latest_git_rev := $(shell git rev-list --abbrev-commit -n 1 $(latest_git_tag))
version := $(if $(git_tag),$(git_tag),dev-$(git_rev))
build_time := $(shell date -u)
ldflags := -X "github.com/sky-uk/osprey/cmd.version=$(version)" -X "github.com/sky-uk/osprey/cmd.buildTime=$(build_time)"
ldflags := -X "github.com/sky-uk/osprey/v2/cmd.version=$(version)" -X "github.com/sky-uk/osprey/v2/cmd.buildTime=$(build_time)"

cwd= $(shell pwd)
build_dir := $(cwd)/build/bin
6 changes: 3 additions & 3 deletions client/azure.go
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@ import (
"time"

"github.com/SermoDigital/jose/jws"
"github.com/sky-uk/osprey/client/oidc"
"github.com/sky-uk/osprey/common/pb"
"github.com/sky-uk/osprey/common/web"
"github.com/sky-uk/osprey/v2/client/oidc"
"github.com/sky-uk/osprey/v2/common/pb"
"github.com/sky-uk/osprey/v2/common/web"
"golang.org/x/oauth2"
"k8s.io/client-go/tools/clientcmd/api"
)
2 changes: 1 addition & 1 deletion client/config.go
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import (

"github.com/mitchellh/go-homedir"
log "github.com/sirupsen/logrus"
"github.com/sky-uk/osprey/common/web"
"github.com/sky-uk/osprey/v2/common/web"
"gopkg.in/yaml.v2"
)

2 changes: 1 addition & 1 deletion client/credentials.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import (
"strings"
"syscall"

"github.com/sky-uk/osprey/common"
"github.com/sky-uk/osprey/v2/common"

"golang.org/x/crypto/ssh/terminal"
)
2 changes: 1 addition & 1 deletion client/kubeconfig/config.go
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import (
"errors"
"fmt"

"github.com/sky-uk/osprey/client"
"github.com/sky-uk/osprey/v2/client"

kubectl "k8s.io/client-go/tools/clientcmd"
clientgo "k8s.io/client-go/tools/clientcmd/api"
4 changes: 2 additions & 2 deletions client/osprey.go
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ import (

"github.com/SermoDigital/jose/jws"
log "github.com/sirupsen/logrus"
"github.com/sky-uk/osprey/common/pb"
webClient "github.com/sky-uk/osprey/common/web"
"github.com/sky-uk/osprey/v2/common/pb"
webClient "github.com/sky-uk/osprey/v2/common/web"
"k8s.io/client-go/tools/clientcmd/api"
)

6 changes: 3 additions & 3 deletions cmd/auth.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package cmd

import (
"github.com/sky-uk/osprey/server/osprey"
"github.com/sky-uk/osprey/v2/server/osprey"
"github.com/spf13/cobra"

log "github.com/sirupsen/logrus"
webClient "github.com/sky-uk/osprey/common/web"
webServer "github.com/sky-uk/osprey/server/web"
webClient "github.com/sky-uk/osprey/v2/common/web"
webServer "github.com/sky-uk/osprey/v2/server/web"
)

var authCmd = &cobra.Command{
4 changes: 2 additions & 2 deletions cmd/cluster-info.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package cmd

import (
"github.com/sky-uk/osprey/server/osprey"
"github.com/sky-uk/osprey/v2/server/osprey"
"github.com/spf13/cobra"

log "github.com/sirupsen/logrus"
webServer "github.com/sky-uk/osprey/server/web"
webServer "github.com/sky-uk/osprey/v2/server/web"
)

var clusterInfoCmd = &cobra.Command{
4 changes: 2 additions & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd
import (
"time"

"github.com/sky-uk/osprey/client"
"github.com/sky-uk/osprey/client/kubeconfig"
"github.com/sky-uk/osprey/v2/client"
"github.com/sky-uk/osprey/v2/client/kubeconfig"
"github.com/spf13/cobra"

"fmt"
4 changes: 2 additions & 2 deletions cmd/logout.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/sky-uk/osprey/client"
"github.com/sky-uk/osprey/client/kubeconfig"
"github.com/sky-uk/osprey/v2/client"
"github.com/sky-uk/osprey/v2/client/kubeconfig"
"github.com/spf13/cobra"

"os"
2 changes: 1 addition & 1 deletion cmd/targets.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/sky-uk/osprey/client"
"github.com/sky-uk/osprey/v2/client"
"github.com/spf13/cobra"

"fmt"
4 changes: 2 additions & 2 deletions cmd/user.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd
import (
"path/filepath"

"github.com/sky-uk/osprey/client"
"github.com/sky-uk/osprey/client/kubeconfig"
"github.com/sky-uk/osprey/v2/client"
"github.com/sky-uk/osprey/v2/client/kubeconfig"
"github.com/spf13/cobra"

"os"
6 changes: 3 additions & 3 deletions e2e/dextest/server.go
Original file line number Diff line number Diff line change
@@ -19,9 +19,9 @@ import (
dex_memory "github.com/dexidp/dex/storage/memory"
log "github.com/sirupsen/logrus"

"github.com/sky-uk/osprey/e2e/ldaptest"
"github.com/sky-uk/osprey/e2e/ssltest"
"github.com/sky-uk/osprey/e2e/util"
"github.com/sky-uk/osprey/v2/e2e/ldaptest"
"github.com/sky-uk/osprey/v2/e2e/ssltest"
"github.com/sky-uk/osprey/v2/e2e/util"
)

var logger = log.New()
12 changes: 6 additions & 6 deletions e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
@@ -5,16 +5,16 @@ import (
"os"
"testing"

"github.com/sky-uk/osprey/e2e/apiservertest"
"github.com/sky-uk/osprey/v2/e2e/apiservertest"

"github.com/sky-uk/osprey/e2e/oidctest"
"github.com/sky-uk/osprey/v2/e2e/oidctest"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/sky-uk/osprey/e2e/dextest"
"github.com/sky-uk/osprey/e2e/ldaptest"
"github.com/sky-uk/osprey/e2e/ospreytest"
"github.com/sky-uk/osprey/e2e/util"
"github.com/sky-uk/osprey/v2/e2e/dextest"
"github.com/sky-uk/osprey/v2/e2e/ldaptest"
"github.com/sky-uk/osprey/v2/e2e/ospreytest"
"github.com/sky-uk/osprey/v2/e2e/util"
)

func TestOspreySuite(t *testing.T) {
6 changes: 3 additions & 3 deletions e2e/ldaptest/server.go
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@ import (
"time"

dex_ldap "github.com/dexidp/dex/connector/ldap"
"github.com/sky-uk/osprey/e2e/clitest"
"github.com/sky-uk/osprey/e2e/ssltest"
"github.com/sky-uk/osprey/e2e/util"
"github.com/sky-uk/osprey/v2/e2e/clitest"
"github.com/sky-uk/osprey/v2/e2e/ssltest"
"github.com/sky-uk/osprey/v2/e2e/util"
)

const (
6 changes: 3 additions & 3 deletions e2e/login_test.go
Original file line number Diff line number Diff line change
@@ -6,9 +6,9 @@ import (

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/sky-uk/osprey/client/kubeconfig"
"github.com/sky-uk/osprey/e2e/clitest"
. "github.com/sky-uk/osprey/e2e/ospreytest"
"github.com/sky-uk/osprey/v2/client/kubeconfig"
"github.com/sky-uk/osprey/v2/e2e/clitest"
. "github.com/sky-uk/osprey/v2/e2e/ospreytest"
clientgo "k8s.io/client-go/tools/clientcmd/api"
)

6 changes: 3 additions & 3 deletions e2e/logout_test.go
Original file line number Diff line number Diff line change
@@ -3,12 +3,12 @@ package e2e
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/sky-uk/osprey/e2e/ospreytest"
. "github.com/sky-uk/osprey/v2/e2e/ospreytest"

"os"

"github.com/sky-uk/osprey/client/kubeconfig"
"github.com/sky-uk/osprey/e2e/clitest"
"github.com/sky-uk/osprey/v2/client/kubeconfig"
"github.com/sky-uk/osprey/v2/e2e/clitest"
)

var _ = Describe("Logout", func() {
6 changes: 3 additions & 3 deletions e2e/oidc_login_test.go
Original file line number Diff line number Diff line change
@@ -8,14 +8,14 @@ import (
"strings"
"time"

"github.com/sky-uk/osprey/e2e/apiservertest"
"github.com/sky-uk/osprey/v2/e2e/apiservertest"

"github.com/sky-uk/osprey/client/kubeconfig"
"github.com/sky-uk/osprey/v2/client/kubeconfig"
"k8s.io/client-go/tools/clientcmd/api"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/sky-uk/osprey/e2e/clitest"
"github.com/sky-uk/osprey/v2/e2e/clitest"
)

const (
2 changes: 1 addition & 1 deletion e2e/oidctest/server.go
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ import (
"github.com/golang-jwt/jwt"

log "github.com/sirupsen/logrus"
"github.com/sky-uk/osprey/client/oidc"
"github.com/sky-uk/osprey/v2/client/oidc"
"golang.org/x/oauth2"
)

4 changes: 2 additions & 2 deletions e2e/ospreytest/fixtures.go
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ import (

"github.com/SermoDigital/jose/jws"
"github.com/SermoDigital/jose/jwt"
"github.com/sky-uk/osprey/common/web"
"github.com/sky-uk/osprey/server/osprey"
"github.com/sky-uk/osprey/v2/common/web"
"github.com/sky-uk/osprey/v2/server/osprey"
"k8s.io/client-go/tools/clientcmd"
clientgo "k8s.io/client-go/tools/clientcmd/api"
)
12 changes: 6 additions & 6 deletions e2e/ospreytest/server.go
Original file line number Diff line number Diff line change
@@ -4,14 +4,14 @@ import (
"fmt"
"path/filepath"

"github.com/sky-uk/osprey/client"
"github.com/sky-uk/osprey/v2/client"

"github.com/onsi/ginkgo"
"github.com/sky-uk/osprey/common/web"
"github.com/sky-uk/osprey/e2e/clitest"
"github.com/sky-uk/osprey/e2e/dextest"
"github.com/sky-uk/osprey/e2e/ssltest"
"github.com/sky-uk/osprey/e2e/util"
"github.com/sky-uk/osprey/v2/common/web"
"github.com/sky-uk/osprey/v2/e2e/clitest"
"github.com/sky-uk/osprey/v2/e2e/dextest"
"github.com/sky-uk/osprey/v2/e2e/ssltest"
"github.com/sky-uk/osprey/v2/e2e/util"
)

const ospreyBinary = "osprey"
4 changes: 2 additions & 2 deletions e2e/server_test.go
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ import (

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/sky-uk/osprey/e2e/dextest"
"github.com/sky-uk/osprey/e2e/ospreytest"
"github.com/sky-uk/osprey/v2/e2e/dextest"
"github.com/sky-uk/osprey/v2/e2e/ospreytest"
)

var _ = Describe("Server", func() {
2 changes: 1 addition & 1 deletion e2e/shared_output_test.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package e2e
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/sky-uk/osprey/e2e/clitest"
"github.com/sky-uk/osprey/v2/e2e/clitest"
)

type commandFactory func() clitest.TestCommand
4 changes: 2 additions & 2 deletions e2e/targets_test.go
Original file line number Diff line number Diff line change
@@ -3,13 +3,13 @@ package e2e
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/sky-uk/osprey/e2e/ospreytest"
. "github.com/sky-uk/osprey/v2/e2e/ospreytest"

"fmt"

"strings"

"github.com/sky-uk/osprey/e2e/clitest"
"github.com/sky-uk/osprey/v2/e2e/clitest"
)

var _ = Describe("Targets", func() {
4 changes: 2 additions & 2 deletions e2e/user_test.go
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@ package e2e
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/sky-uk/osprey/e2e/ospreytest"
. "github.com/sky-uk/osprey/v2/e2e/ospreytest"

"os"

"github.com/sky-uk/osprey/e2e/clitest"
"github.com/sky-uk/osprey/v2/e2e/clitest"
)

var _ = Describe("User", func() {
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/sky-uk/osprey
module github.com/sky-uk/osprey/v2

require (
github.com/SermoDigital/jose v0.9.1
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "github.com/sky-uk/osprey/cmd"
import "github.com/sky-uk/osprey/v2/cmd"

func main() {
cmd.Execute()
2 changes: 1 addition & 1 deletion server/osprey/server.go
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ import (

"github.com/coreos/go-oidc"
"github.com/sirupsen/logrus"
"github.com/sky-uk/osprey/common/pb"
"github.com/sky-uk/osprey/v2/common/pb"
"golang.org/x/oauth2"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
2 changes: 1 addition & 1 deletion server/web/server.go
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import (

"github.com/golang/protobuf/proto"
log "github.com/sirupsen/logrus"
"github.com/sky-uk/osprey/server/osprey"
"github.com/sky-uk/osprey/v2/server/osprey"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

0 comments on commit c72b543

Please sign in to comment.