Merge pull request #264 from paulfantom/ci_fixes

Do not download tooling when it is already available
This commit is contained in:
Frederic Branczyk
2019-10-14 14:13:01 +02:00
committed by GitHub
2 changed files with 11 additions and 14 deletions

View File

@@ -16,6 +16,9 @@ services:
jobs: jobs:
include: include:
- script: make --always-make generate-in-docker && git diff --exit-code - name: Check generated files
- script: make --always-make test-in-docker script: make --always-make generate-in-docker && git diff --exit-code
- script: GO111MODULE=on ./tests/e2e/travis-e2e.sh - name: Run tests
script: make --always-make test-in-docker
- name: Run e2e tests
script: GO111MODULE=on ./tests/e2e/travis-e2e.sh

View File

@@ -7,8 +7,8 @@ else
endif endif
JSONNET_FMT := $(JSONNET_FMT_CMD) $(JSONNET_FMT_ARGS) JSONNET_FMT := $(JSONNET_FMT_CMD) $(JSONNET_FMT_ARGS)
JB_BINARY:=$(GOPATH)/bin/jb JB_BINARY := jb
EMBEDMD_BINARY:=$(GOPATH)/bin/embedmd EMBEDMD_BINARY := embedmd
CONTAINER_CMD:=docker run --rm \ CONTAINER_CMD:=docker run --rm \
-e http_proxy -e https_proxy -e no_proxy \ -e http_proxy -e https_proxy -e no_proxy \
-u="$(shell id -u):$(shell id -g)" \ -u="$(shell id -u):$(shell id -g)" \
@@ -31,14 +31,14 @@ clean:
generate: manifests **.md generate: manifests **.md
**.md: $(EMBEDMD_BINARY) $(shell find examples) build.sh example.jsonnet **.md: $(shell find examples) build.sh example.jsonnet
$(EMBEDMD_BINARY) -w `find . -name "*.md" | grep -v vendor` $(EMBEDMD_BINARY) -w `find . -name "*.md" | grep -v vendor`
manifests: vendor example.jsonnet build.sh manifests: vendor example.jsonnet build.sh
rm -rf manifests rm -rf manifests
./build.sh ./examples/kustomize.jsonnet ./build.sh ./examples/kustomize.jsonnet
vendor: $(JB_BINARY) jsonnetfile.json jsonnetfile.lock.json vendor: jsonnetfile.json jsonnetfile.lock.json
rm -rf vendor rm -rf vendor
$(JB_BINARY) install $(JB_BINARY) install
@@ -46,7 +46,7 @@ fmt:
find . -name 'vendor' -prune -o -name '*.libsonnet' -o -name '*.jsonnet' -print | \ find . -name 'vendor' -prune -o -name '*.libsonnet' -o -name '*.jsonnet' -print | \
xargs -n 1 -- $(JSONNET_FMT) -i xargs -n 1 -- $(JSONNET_FMT) -i
test: $(JB_BINARY) test:
$(JB_BINARY) install $(JB_BINARY) install
./test.sh ./test.sh
@@ -57,10 +57,4 @@ test-in-docker:
@echo ">> Compiling assets and generating Kubernetes manifests" @echo ">> Compiling assets and generating Kubernetes manifests"
$(CONTAINER_CMD) make $(MFLAGS) test $(CONTAINER_CMD) make $(MFLAGS) test
$(JB_BINARY):
go get -u github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
$(EMBEDMD_BINARY):
go get github.com/campoy/embedmd
.PHONY: generate generate-in-docker test test-in-docker fmt .PHONY: generate generate-in-docker test test-in-docker fmt