Updated pkg path to github.com/microsoft/ring-operator and fixed mod cmds
This commit is contained in:
Родитель
b4a5bb3974
Коммит
52efc08d27
|
@ -34,13 +34,10 @@ jobs:
|
|||
vendor
|
||||
$(Agent.OS)
|
||||
$(Build.SourcesDirectory)/go.sum
|
||||
path: $(Pipeline.Workspace)/vendor
|
||||
path: /go/pkg/mod
|
||||
displayName: Cache Vendor files
|
||||
|
||||
- script: ls -l
|
||||
|
||||
- script: go build cmd/manager/main.go
|
||||
- script: go mod vendor
|
||||
|
||||
######################################################################
|
||||
# Tests
|
||||
|
@ -50,7 +47,15 @@ jobs:
|
|||
displayName: Run unit tests
|
||||
dependsOn: Build
|
||||
steps:
|
||||
- script: go test -cover $(go list ./... | grep -v /vendor/)
|
||||
- task: CacheBeta@0
|
||||
inputs:
|
||||
key: |
|
||||
vendor
|
||||
$(Agent.OS)
|
||||
$(Build.SourcesDirectory)/go.sum
|
||||
path: /go/pkg/mod
|
||||
displayName: Cache Vendor files
|
||||
- script: go test -cover $(go list ./...)
|
||||
|
||||
######################################################################
|
||||
# Container Creation
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
|
||||
"ring-operator/pkg/apis"
|
||||
"ring-operator/pkg/controller"
|
||||
"github.com/microsoft/ring-operator/pkg/apis"
|
||||
"github.com/microsoft/ring-operator/pkg/controller"
|
||||
|
||||
"github.com/operator-framework/operator-sdk/pkg/k8sutil"
|
||||
"github.com/operator-framework/operator-sdk/pkg/leader"
|
||||
|
@ -83,7 +83,7 @@ func main() {
|
|||
ctx := context.TODO()
|
||||
|
||||
// Become the leader before proceeding
|
||||
if err := leader.Become(ctx, "ring-operator-lock"); err != nil {
|
||||
if err := leader.Become(ctx, "github.com/microsoft/ring-operator-lock"); err != nil {
|
||||
log.Error(err, "Cannot become leader")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module ring-operator
|
||||
module github.com/microsoft/ring-operator
|
||||
|
||||
go 1.12
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package apis
|
||||
|
||||
import (
|
||||
"ring-operator/pkg/apis/rings/v1alpha1"
|
||||
"github.com/microsoft/ring-operator/pkg/apis/rings/v1alpha1"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package controller
|
||||
|
||||
import (
|
||||
"ring-operator/pkg/controller/ring"
|
||||
"github.com/microsoft/ring-operator/pkg/controller/ring"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/Azure/go-autorest/autorest/to"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
ringsv1alpha1 "ring-operator/pkg/apis/rings/v1alpha1"
|
||||
ringsv1alpha1 "github.com/microsoft/ring-operator/pkg/apis/rings/v1alpha1"
|
||||
)
|
||||
|
||||
// CreateADGroup will create the AAD group in Azure
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
ringsv1alpha1 "ring-operator/pkg/apis/rings/v1alpha1"
|
||||
ringsv1alpha1 "github.com/microsoft/ring-operator/pkg/apis/rings/v1alpha1"
|
||||
|
||||
traefik "github.com/containous/traefik/pkg/provider/kubernetes/crd/traefik/v1alpha1"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package ring_test
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"ring-operator/pkg/controller/ring"
|
||||
"github.com/microsoft/ring-operator/pkg/controller/ring"
|
||||
"testing"
|
||||
|
||||
traefik "github.com/containous/traefik/pkg/provider/kubernetes/crd/traefik/v1alpha1"
|
||||
|
@ -14,7 +14,7 @@ import (
|
|||
"sigs.k8s.io/controller-runtime/pkg/client/fake"
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
|
||||
ringsv1alpha1 "ring-operator/pkg/apis/rings/v1alpha1"
|
||||
ringsv1alpha1 "github.com/microsoft/ring-operator/pkg/apis/rings/v1alpha1"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
|
|
|
@ -2,7 +2,7 @@ package ring
|
|||
|
||||
import (
|
||||
"context"
|
||||
ringsv1alpha1 "ring-operator/pkg/apis/rings/v1alpha1"
|
||||
ringsv1alpha1 "github.com/microsoft/ring-operator/pkg/apis/rings/v1alpha1"
|
||||
)
|
||||
|
||||
const ringFinalizer = "finalizer.rings.microsoft.com"
|
||||
|
|
|
@ -3,7 +3,7 @@ package ring
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
ringsv1alpha1 "ring-operator/pkg/apis/rings/v1alpha1"
|
||||
ringsv1alpha1 "github.com/microsoft/ring-operator/pkg/apis/rings/v1alpha1"
|
||||
|
||||
traefikcfg "github.com/containous/traefik/pkg/config"
|
||||
traefik "github.com/containous/traefik/pkg/provider/kubernetes/crd/traefik/v1alpha1"
|
||||
|
|
Загрузка…
Ссылка в новой задаче