Skip to content

Commit

Permalink
fix jenkins verification issue
Browse files Browse the repository at this point in the history
  • Loading branch information
adohe committed Nov 17, 2016
1 parent 3a97cb7 commit c24d4e1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 2 additions & 0 deletions pkg/master/thirdparty/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ go_library(
"//pkg/registry/generic:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/storage/storagebackend:go_default_library",
"//pkg/util/sets:go_default_library",
"//vendor:github.com/emicklei/go-restful",
"//vendor:github.com/golang/glog",
],
)
2 changes: 1 addition & 1 deletion pkg/master/thirdparty/thirdparty.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type thirdPartyEntry struct {
}

func (g *thirdPartyGroup) versionInstalled(version string) bool {
for installedVersion, _ := range g.versionedEntry {
for installedVersion := range g.versionedEntry {
if reflect.DeepEqual(version, installedVersion) {
return true
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/registry/extensions/rest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ go_library(
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/api/meta:go_default_library",
"//pkg/api/rest:go_default_library",
"//pkg/api/unversioned:go_default_library",
"//pkg/apis/extensions:go_default_library",
"//pkg/apis/extensions/v1beta1:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library",
Expand Down
12 changes: 11 additions & 1 deletion pkg/registry/extensions/rest/thirdparty_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (t *ThirdPartyController) syncResourceList(list runtime.Object) error {
Kind: kind,
})
// place it in the set of resources that we expect, so that we don't delete it in the delete pass
fullAPIPath := MakeThirdPartyPath(group) + "/" + version.Name + "/" + plural.Resource
fullAPIPath := makeFullAPIPath(group, version.Name) + "/" + plural.Resource
existing.Insert(fullAPIPath)
}
// ensure a RESTful resource for this schema exists on the master
Expand Down Expand Up @@ -134,6 +134,16 @@ func MakeThirdPartyPath(group string) string {
return thirdpartyprefix + "/" + group
}

func makeFullAPIPath(group, version string) string {
if len(group) == 0 {
return thirdpartyprefix
}
if len(version) == 0 {
return thirdpartyprefix + "/" + group
}
return thirdpartyprefix + "/" + group + "/" + version
}

func GetThirdPartyGroupName(path string) string {
ix := strings.LastIndex(path, "/")
if ix == -1 {
Expand Down
5 changes: 1 addition & 4 deletions test/e2e/generated/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ load(

go_library(
name = "go_default_library",
srcs = [
"bindata.go",
"main.go",
],
srcs = ["main.go"],
tags = ["automanaged"],
)

0 comments on commit c24d4e1

Please sign in to comment.