diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..eff94d93a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +sudo: required +language: go +services: + - docker +install: true + +jobs: + include: + - stage: test + script: make test + - script: make cbuild + # - stage: push + # script: echo "TODO" diff --git a/Makefile b/Makefile index 5d377aa3c..c84b4381a 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_RUN ?= $(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)' + $(DOCKER_RUN) '$(TEST)' -container: cbuild +container: test cbuild $(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_RUN) '$(BUILD)' push: $(DOCKER) push $(REGISTRY)/$(TARGET):$(IMAGE_BRANCH)