From 1e5a0c1634182e977c5d0f96321bdd63c5f85a16 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 20 Feb 2019 09:10:47 +0100 Subject: [PATCH] switch to csi-release-tools This imports the shared csi-release-tools and uses it for Travis CI and building. The binary and image name are "nfsplugin", as before. --- .gitignore | 1 + .travis.yml | 1 + Dockerfile | 2 +- Makefile | 27 +++------------------------ {app => cmd/nfsplugin}/main.go | 0 5 files changed, 6 insertions(+), 25 deletions(-) create mode 100644 .gitignore create mode 120000 .travis.yml rename {app => cmd/nfsplugin}/main.go (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/.travis.yml b/.travis.yml new file mode 120000 index 00000000..a554dfc7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1 @@ +release-tools/travis.yml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index cfb490dd..13f5d248 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM centos:7.4.1708 # Copy nfsplugin from build _output directory -COPY _output/nfsplugin /nfsplugin +COPY bin/nfsplugin /nfsplugin RUN yum -y install nfs-utils && yum -y install epel-release && yum -y install jq && yum clean all diff --git a/Makefile b/Makefile index 2a6e4ce7..765f97e8 100644 --- a/Makefile +++ b/Makefile @@ -12,28 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -REGISTRY_NAME=quay.io/k8scsi -IMAGE_NAME=nfsplugin -IMAGE_VERSION=v1.0.0 -IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION) -REV=$(shell git describe --long --tags --dirty) +CMDS=nfsplugin +all: build -.PHONY: all nfs clean nfs-container push - -test: - go test github.com/kubernetes-csi/csi-driver-nfs/pkg/... -cover - go vet github.com/kubernetes-csi/csi-driver-nfs/pkg/... - -nfs: - if [ ! -d ./vendor ]; then dep ensure -vendor-only; fi - CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/nfsplugin ./app/ - -nfs-container: nfs - docker build -t $(IMAGE_TAG) -f ./Dockerfile . - -push: nfs-container - docker push $(IMAGE_TAG) - -clean: - go clean -r -x - -rm -rf _output +include release-tools/build.make diff --git a/app/main.go b/cmd/nfsplugin/main.go similarity index 100% rename from app/main.go rename to cmd/nfsplugin/main.go