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