Skip to content

Commit

Permalink
go module rename to stolostron for release-2.2 (#126)
Browse files Browse the repository at this point in the history
Signed-off-by: Xiangjing Li <[email protected]>
  • Loading branch information
xiangjingli authored Jan 15, 2022
1 parent c1039a8 commit 4218674
Show file tree
Hide file tree
Showing 23 changed files with 76 additions and 173 deletions.
42 changes: 28 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ TRAVIS_BUILD ?= 1
# Image URL to use all building/pushing image targets;
# Use your own docker registry and image name for dev/test by overridding the IMG and REGISTRY environment variable.
IMG ?= $(shell cat COMPONENT_NAME 2> /dev/null)
REGISTRY ?= quay.io/open-cluster-management

# Github host to use for checking the source tree;
# Override this variable ue with your own value if you're working on forked repo.
GIT_HOST ?= github.com/open-cluster-management
REGISTRY ?= quay.io/stolostron

PWD := $(shell pwd)
BASE_DIR := $(shell basename $(PWD))
Expand All @@ -35,7 +31,6 @@ GOBIN_DEFAULT := $(GOPATH)/bin
export GOBIN ?= $(GOBIN_DEFAULT)
TESTARGS_DEFAULT := "-v"
export TESTARGS ?= $(TESTARGS_DEFAULT)
DEST ?= $(GOPATH)/src/$(GIT_HOST)/$(BASE_DIR)
VERSION ?= $(shell cat COMPONENT_VERSION 2> /dev/null)
IMAGE_NAME_AND_VERSION ?= $(REGISTRY)/$(IMG)

Expand All @@ -51,17 +46,21 @@ else
$(error "This system's OS $(LOCAL_OS) isn't recognized/supported")
endif

.PHONY: fmt lint test coverage build build-images
TEST_TMP :=/tmp
export KUBEBUILDER_ASSETS ?=$(TEST_TMP)/kubebuilder/bin
K8S_VERSION ?=1.19.2
GOHOSTOS ?=$(shell go env GOHOSTOS)
GOHOSTARCH ?= $(shell go env GOHOSTARCH)
KB_TOOLS_ARCHIVE_NAME :=kubebuilder-tools-$(K8S_VERSION)-$(GOHOSTOS)-$(GOHOSTARCH).tar.gz
KB_TOOLS_ARCHIVE_PATH := $(TEST_TMP)/$(KB_TOOLS_ARCHIVE_NAME)

ifneq ("$(realpath $(DEST))", "$(realpath $(PWD))")
$(error Please run 'make' from $(DEST). Current directory is $(PWD))
endif
.PHONY: fmt lint test coverage build build-images

# GITHUB_USER containing '@' char must be escaped with '%40'
GITHUB_USER := $(shell echo $(GITHUB_USER) | sed 's/@/%40/g')
GITHUB_TOKEN ?=

GOPRIVATE := github.com/open-cluster-management
GOPRIVATE := github.com/stolostron

ifdef GITHUB_TOKEN
$(shell git config --global url."https://$(GITHUB_TOKEN):[email protected]/".insteadOf "https://github.com/")
Expand All @@ -71,7 +70,7 @@ USE_VENDORIZED_BUILD_HARNESS ?=

ifndef USE_VENDORIZED_BUILD_HARNESS
ifeq ($(TRAVIS_BUILD),1)
-include $(shell curl -H 'Authorization: token ${GITHUB_TOKEN}' -H 'Accept: application/vnd.github.v4.raw' -L https://api.github.com/repos/open-cluster-management/build-harness-extensions/contents/templates/Makefile.build-harness-bootstrap -o .build-harness-bootstrap; echo .build-harness-bootstrap)
-include $(shell curl -H 'Authorization: token ${GITHUB_TOKEN}' -H 'Accept: application/vnd.github.v4.raw' -L https://api.github.com/repos/stolostron/build-harness-extensions/contents/templates/Makefile.build-harness-bootstrap -o .build-harness-bootstrap; echo .build-harness-bootstrap)
endif
else
-include vbh/.build-harness-vendorized
Expand Down Expand Up @@ -115,8 +114,23 @@ lint: lint-all
# test section
############################################################

test:
go test -coverprofile=coverage.out ./...
.PHONY: ensure-kubebuilder-tools

# download the kubebuilder-tools to get kube-apiserver binaries from it
ensure-kubebuilder-tools:
ifeq "" "$(wildcard $(KUBEBUILDER_ASSETS))"
$(info Downloading kube-apiserver into '$(KUBEBUILDER_ASSETS)')
mkdir -p '$(KUBEBUILDER_ASSETS)'
curl -s -f -L https://storage.googleapis.com/kubebuilder-tools/$(KB_TOOLS_ARCHIVE_NAME) -o '$(KB_TOOLS_ARCHIVE_PATH)'
tar -C '$(KUBEBUILDER_ASSETS)' --strip-components=2 -zvxf '$(KB_TOOLS_ARCHIVE_PATH)'
else
$(info Using existing kube-apiserver from "$(KUBEBUILDER_ASSETS)")
endif

.PHONY: test

test: ensure-kubebuilder-tools
go test -timeout 300s -v ./pkg/...

############################################################
# coverage section
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# multicloud-operators-placementrule

[![Build](https://api.travis-ci.com/open-cluster-management/multicloud-operators-placementrule.svg?branch=master)](https://api.travis-ci.com/open-cluster-management/multicloud-operators-placementrule.svg?branch=master)
[![GoDoc](https://godoc.org/github.com/open-cluster-management/multicloud-operators-placementrule?status.svg)](https://godoc.org/github.com/open-cluster-management/multicloud-operators-placementrule)
[![Go Report Card](https://goreportcard.com/badge/github.com/open-cluster-management/multicloud-operators-placementrule)](https://goreportcard.com/report/github.com/open-cluster-management/multicloud-operators-placementrule)
[![Build](https://api.travis-ci.com/stolostron/multicloud-operators-placementrule.svg?branch=main)](https://api.travis-ci.com/stolostron/multicloud-operators-placementrule.svg?branch=main)
[![GoDoc](https://godoc.org/github.com/stolostron/multicloud-operators-placementrule?status.svg)](https://godoc.org/github.com/stolostron/multicloud-operators-placementrule)
[![Go Report Card](https://goreportcard.com/badge/github.com/stolostron/multicloud-operators-placementrule)](https://goreportcard.com/report/github.com/stolostron/multicloud-operators-placementrule)
[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=open-cluster-management_multicloud-operators-placementrule&metric=coverage)](https://sonarcloud.io/api/project_badges/measure?project=open-cluster-management_multicloud-operators-placementrule&metric=coverage)
[![License](https://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)

Expand Down Expand Up @@ -52,9 +52,9 @@ Check the [Security Doc](SECURITY.md) if you've found a security issue.

### multicloud-operators repositories

- [multicloud-operators-application](https://github.com/open-cluster-management/multicloud-operators-application)
- [multicloud-operators-channel](https://github.com/open-cluster-management/multicloud-operators-channel)
- [multicloud-operators-deployable](https://github.com/open-cluster-management/multicloud-operators-deployable)
- [multicloud-operators-placementrule](https://github.com/open-cluster-management/multicloud-operators-placementrule)
- [multicloud-operators-subscription](https://github.com/open-cluster-management/multicloud-operators-subscription)
- [multicloud-operators-subscription-release](https://github.com/open-cluster-management/multicloud-operators-subscription-release)
- [multicloud-operators-application](https://github.com/stolostron/multicloud-operators-application)
- [multicloud-operators-channel](https://github.com/stolostron/multicloud-operators-channel)
- [multicloud-operators-deployable](https://github.com/stolostron/multicloud-operators-deployable)
- [multicloud-operators-placementrule](https://github.com/stolostron/multicloud-operators-placementrule)
- [multicloud-operators-subscription](https://github.com/stolostron/multicloud-operators-subscription)
- [multicloud-operators-subscription-release](https://github.com/stolostron/multicloud-operators-subscription-release)
8 changes: 4 additions & 4 deletions cmd/argocdcluster/exec/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"fmt"
"os"

endpointapis "github.com/open-cluster-management/endpoint-operator/pkg/apis"
"github.com/open-cluster-management/multicloud-operators-placementrule/pkg/apis"
"github.com/open-cluster-management/multicloud-operators-placementrule/pkg/controller"
"github.com/open-cluster-management/multicloud-operators-placementrule/pkg/utils"
endpointapis "github.com/stolostron/endpoint-operator/pkg/apis"
"github.com/stolostron/multicloud-operators-placementrule/pkg/apis"
"github.com/stolostron/multicloud-operators-placementrule/pkg/controller"
"github.com/stolostron/multicloud-operators-placementrule/pkg/utils"
v1 "k8s.io/api/core/v1"

"k8s.io/client-go/rest"
Expand Down
2 changes: 1 addition & 1 deletion cmd/argocdcluster/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"k8s.io/klog"

"github.com/open-cluster-management/multicloud-operators-placementrule/cmd/argocdcluster/exec"
"github.com/stolostron/multicloud-operators-placementrule/cmd/argocdcluster/exec"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/manager/exec/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"fmt"
"os"

"github.com/open-cluster-management/multicloud-operators-placementrule/pkg/apis"
"github.com/open-cluster-management/multicloud-operators-placementrule/pkg/controller"
"github.com/open-cluster-management/multicloud-operators-placementrule/pkg/utils"
"github.com/stolostron/multicloud-operators-placementrule/pkg/apis"
"github.com/stolostron/multicloud-operators-placementrule/pkg/controller"
"github.com/stolostron/multicloud-operators-placementrule/pkg/utils"

"k8s.io/client-go/rest"
"k8s.io/klog"
Expand Down
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"k8s.io/klog"

"github.com/open-cluster-management/multicloud-operators-placementrule/cmd/manager/exec"
"github.com/stolostron/multicloud-operators-placementrule/cmd/manager/exec"
)

func main() {
Expand Down
9 changes: 6 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/open-cluster-management/multicloud-operators-placementrule
module github.com/stolostron/multicloud-operators-placementrule

go 1.15

Expand All @@ -8,8 +8,8 @@ require (
github.com/go-openapi/spec v0.19.4
github.com/onsi/gomega v1.10.1
github.com/open-cluster-management/api v0.0.0-20201007180356-41d07eee4294
github.com/open-cluster-management/endpoint-operator v1.0.1-2020-05-28-18-29-00.0.20201123150704-b95ad181d88a
github.com/spf13/pflag v1.0.5
github.com/stolostron/endpoint-operator v1.2.2-0-20220114-0ddd7f9
golang.org/x/net v0.0.0-20200707034311-ab3426394381
k8s.io/api v0.19.3
k8s.io/apiextensions-apiserver v0.19.3
Expand All @@ -20,4 +20,7 @@ require (
sigs.k8s.io/controller-runtime v0.6.3
)

replace k8s.io/client-go => k8s.io/client-go v0.19.3
replace (
github.com/open-cluster-management/api => open-cluster-management.io/api v0.0.0-20201007180356-41d07eee4294
k8s.io/client-go => k8s.io/client-go v0.19.3
)
Loading

0 comments on commit 4218674

Please sign in to comment.