From 140c716ca33724bfa1cdd0e5ba937bd3efa3328e Mon Sep 17 00:00:00 2001 From: liz Date: Thu, 2 Nov 2017 09:33:59 -0700 Subject: [PATCH] Add .travis.yml Signed-off-by: liz Signed-off-by: Jesse Hamilton jesse.hamilton@heptio.com Signed-off-by: Jesse Hamilton jesse.hamilton@heptio.com --- .travis.yml | 12 ++++++++++++ Makefile | 10 ++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..04b24b624 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +sudo: required +language: go +services: + - docker +install: true + +jobs: + include: + - stage: test + script: make test + # - stage: push + # script: echo "TODO" diff --git a/Makefile b/Makefile index 5d377aa3c..aa4beb379 100644 --- a/Makefile +++ b/Makefile @@ -50,14 +50,16 @@ KUBECFG_CMD = $(DOCKER) run \ $(KSONNET_BUILD_IMAGE) \ kubecfg show -o yaml -V RBAC_ENABLED=$(RBAC_ENABLED) -J $(WORKDIR) -o yaml $< > $@ +DOCKER_BUILD ?= $(DOCKER) run --rm -v $(DIR):$(BUILDMNT) -w $(BUILDMNT) $(BUILD_IMAGE) /bin/sh -c + .PHONY: all container push clean cbuild test local generate all: container -test: - $(DOCKER) run --rm -v $(DIR):$(BUILDMNT) -w $(BUILDMNT) $(BUILD_IMAGE) /bin/sh -c '$(TEST)' +test: cbuild + $(DOCKER_BUILD) '$(TEST)' -container: cbuild +container: test $(DOCKER) build \ -t $(REGISTRY)/$(TARGET):$(IMAGE_VERSION) \ -t $(REGISTRY)/$(TARGET):$(IMAGE_BRANCH) \ @@ -65,7 +67,7 @@ container: cbuild . cbuild: - $(DOCKER) run --rm -v $(DIR):$(BUILDMNT) -w $(BUILDMNT) $(BUILD_IMAGE) /bin/sh -c '$(BUILD) && $(TEST)' + $(DOCKER_BUILD) '$(BUILD)' push: $(DOCKER) push $(REGISTRY)/$(TARGET):$(IMAGE_BRANCH)