Add travis integration test for plugin mode.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
794543065a
commit
15940c9319
11
.travis.yml
11
.travis.yml
@ -32,11 +32,13 @@ jobs:
|
||||
- make install.tools
|
||||
- make .gitvalidation
|
||||
- make binaries
|
||||
- make plugin
|
||||
go: 1.9.x
|
||||
- script:
|
||||
- make install.tools
|
||||
- make .gitvalidation
|
||||
- make binaries
|
||||
- make plugin
|
||||
go: tip
|
||||
- stage: Test
|
||||
script:
|
||||
@ -51,3 +53,12 @@ jobs:
|
||||
- cat /tmp/test-cri/cri-containerd.log
|
||||
- cat /tmp/test-cri/containerd.log
|
||||
go: 1.9.x
|
||||
- script:
|
||||
- make install.deps COOK_CONTAINERD=true
|
||||
- make test-integration STANDALONE_CRI_CONTAINERD=false
|
||||
- make test-cri STANDALONE_CRI_CONTAINERD=false
|
||||
after_script:
|
||||
# Abuse travis to preserve the log.
|
||||
- cat /tmp/test-integration/containerd.log
|
||||
- cat /tmp/test-cri/containerd.log
|
||||
go: 1.9.x
|
||||
|
10
Makefile
10
Makefile
@ -30,6 +30,7 @@ TARBALL := $(TARBALL_PREFIX)-$(VERSION).$(GOOS)-$(GOARCH).tar.gz
|
||||
BUILD_TAGS := seccomp apparmor
|
||||
GO_LDFLAGS := -X $(PROJECT)/pkg/version.CRIContainerdVersion=$(VERSION)
|
||||
SOURCES := $(shell find cmd/ pkg/ vendor/ -name '*.go')
|
||||
PLUGIN_SOURCES := $(shell ls *.go)
|
||||
INTEGRATION_SOURCES := $(shell find integration/ -name '*.go')
|
||||
|
||||
all: binaries
|
||||
@ -41,6 +42,7 @@ help:
|
||||
@echo
|
||||
@echo " * 'install' - Install binaries to system locations"
|
||||
@echo " * 'binaries' - Build cri-containerd"
|
||||
@echo " * 'plugin' - Build cri-containerd as a plugin package"
|
||||
@echo " * 'static-binaries - Build static cri-containerd"
|
||||
@echo " * 'release' - Build release tarball"
|
||||
@echo " * 'push' - Push release tarball to GCS"
|
||||
@ -107,6 +109,13 @@ clean:
|
||||
|
||||
binaries: $(BUILD_DIR)/cri-containerd
|
||||
|
||||
# TODO(random-liu): Make this only build when source files change and
|
||||
# add this to target all.
|
||||
plugin: $(PLUGIN_SOURCES) $(SOURCES)
|
||||
$(GO) build -tags '$(BUILD_TAGS)' \
|
||||
-ldflags '$(GO_LDFLAGS)' \
|
||||
-gcflags '$(GO_GCFLAGS)' \
|
||||
|
||||
static-binaries: GO_LDFLAGS += -extldflags "-fno-PIC -static"
|
||||
static-binaries: $(BUILD_DIR)/cri-containerd
|
||||
|
||||
@ -156,6 +165,7 @@ install.tools: .install.gitvalidation .install.gometalinter
|
||||
.PHONY: \
|
||||
binaries \
|
||||
static-binaries \
|
||||
plugin \
|
||||
release \
|
||||
push \
|
||||
boiler \
|
||||
|
Loading…
Reference in New Issue
Block a user