release tools
This synchronizes the build rules with other repos and (as part of that) bumps the Go version to 1.11.1. The recommended formatting changed slightly in that Go version.
This commit is contained in:
13
.travis.yml
13
.travis.yml
@@ -1,13 +0,0 @@
|
|||||||
language: go
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- go: 1.10.3
|
|
||||||
script:
|
|
||||||
- go fmt $(go list ./... | grep -v vendor) | wc -l | grep 0
|
|
||||||
- go vet $(go list ./... | grep -v vendor)
|
|
||||||
- go test $(go list ./... | grep -v vendor)
|
|
||||||
after_success:
|
|
||||||
- if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
|
||||||
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io;
|
|
||||||
make push;
|
|
||||||
fi
|
|
1
.travis.yml
Symbolic link
1
.travis.yml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
release-tools/travis.yml
|
34
Makefile
34
Makefile
@@ -14,34 +14,6 @@
|
|||||||
|
|
||||||
.PHONY: all csi-snapshotter clean test
|
.PHONY: all csi-snapshotter clean test
|
||||||
|
|
||||||
REGISTRY_NAME=quay.io/k8scsi
|
CMDS=csi-snapshotter
|
||||||
IMAGE_NAME=csi-snapshotter
|
all: build
|
||||||
IMAGE_VERSION=canary
|
include release-tools/build.make
|
||||||
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
|
|
||||||
|
|
||||||
REV=$(shell git describe --long --tags --match='v*' --dirty)
|
|
||||||
|
|
||||||
ifdef V
|
|
||||||
TESTARGS = -v -args -alsologtostderr -v 5
|
|
||||||
else
|
|
||||||
TESTARGS =
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: csi-snapshotter
|
|
||||||
|
|
||||||
csi-snapshotter:
|
|
||||||
mkdir -p bin
|
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/csi-snapshotter ./cmd/csi-snapshotter
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-rm -rf bin
|
|
||||||
|
|
||||||
container: csi-snapshotter
|
|
||||||
docker build -t $(IMAGE_TAG) .
|
|
||||||
|
|
||||||
push: container
|
|
||||||
docker push $(IMAGE_TAG)
|
|
||||||
|
|
||||||
test:
|
|
||||||
go test `go list ./... | grep -v 'vendor'` $(TESTARGS)
|
|
||||||
go vet `go list ./... | grep -v vendor`
|
|
||||||
|
@@ -68,7 +68,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var snapshotterSecretParams = deprecatedSecretParamsMap{
|
var snapshotterSecretParams = deprecatedSecretParamsMap{
|
||||||
name: "Snapshotter",
|
name: "Snapshotter",
|
||||||
deprecatedSecretNameKey: snapshotterSecretNameKey,
|
deprecatedSecretNameKey: snapshotterSecretNameKey,
|
||||||
deprecatedSecretNamespaceKey: snapshotterSecretNamespaceKey,
|
deprecatedSecretNamespaceKey: snapshotterSecretNamespaceKey,
|
||||||
secretNameKey: prefixedSnapshotterSecretNameKey,
|
secretNameKey: prefixedSnapshotterSecretNameKey,
|
||||||
|
Reference in New Issue
Block a user