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.
This commit is contained in:
parent
1bcacfac8e
commit
1e5a0c1634
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/bin
|
||||||
1
.travis.yml
Symbolic link
1
.travis.yml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
release-tools/travis.yml
|
||||||
@ -1,7 +1,7 @@
|
|||||||
FROM centos:7.4.1708
|
FROM centos:7.4.1708
|
||||||
|
|
||||||
# Copy nfsplugin from build _output directory
|
# 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
|
RUN yum -y install nfs-utils && yum -y install epel-release && yum -y install jq && yum clean all
|
||||||
|
|
||||||
|
|||||||
27
Makefile
27
Makefile
@ -12,28 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
REGISTRY_NAME=quay.io/k8scsi
|
CMDS=nfsplugin
|
||||||
IMAGE_NAME=nfsplugin
|
all: build
|
||||||
IMAGE_VERSION=v1.0.0
|
|
||||||
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
|
|
||||||
REV=$(shell git describe --long --tags --dirty)
|
|
||||||
|
|
||||||
.PHONY: all nfs clean nfs-container push
|
include release-tools/build.make
|
||||||
|
|
||||||
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
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user