Add make tests entrypoint
* Fixes some gate script lint issues Change-Id: I333c7144d0cfc0af42f7f58faf651050e726fbf8
This commit is contained in:
parent
b9670d70a2
commit
38efdf4a53
20
Makefile
20
Makefile
|
@ -18,9 +18,13 @@ HELM_PIDFILE ?= $(abspath ./.helm-pid)
|
||||||
CHARTS := $(patsubst charts/%/.,%,$(wildcard charts/*/.))
|
CHARTS := $(patsubst charts/%/.,%,$(wildcard charts/*/.))
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: banner charts
|
all: charts lint
|
||||||
|
|
||||||
banner:
|
.PHONY: tests
|
||||||
|
tests: gate-lint
|
||||||
|
tox
|
||||||
|
|
||||||
|
chartbanner:
|
||||||
@echo Building charts: $(CHARTS)
|
@echo Building charts: $(CHARTS)
|
||||||
|
|
||||||
.PHONY: charts
|
.PHONY: charts
|
||||||
|
@ -36,7 +40,15 @@ helm-init-%: helm-serve
|
||||||
cd charts;if [ -s $*/requirements.yaml ]; then echo "Initializing $*";$(HELM) dep up $*; fi
|
cd charts;if [ -s $*/requirements.yaml ]; then echo "Initializing $*";$(HELM) dep up $*; fi
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: helm-lint
|
lint: helm-lint gate-lint
|
||||||
|
|
||||||
|
.PHONY: gate-lint
|
||||||
|
gate-lint: gate-lint-deps
|
||||||
|
tox -e gate-lint
|
||||||
|
|
||||||
|
.PHONY: gate-lint-deps
|
||||||
|
gate-lint-deps:
|
||||||
|
sudo apt-get install -y --no-install-recommends shellcheck
|
||||||
|
|
||||||
.PHONY: helm-lint
|
.PHONY: helm-lint
|
||||||
helm-lint: $(addprefix helm-lint-,$(CHARTS))
|
helm-lint: $(addprefix helm-lint-,$(CHARTS))
|
||||||
|
@ -55,7 +67,7 @@ dry-run-%: helm-lint-%
|
||||||
cd charts;$(HELM) template --set pod.resources.enabled=true $*
|
cd charts;$(HELM) template --set pod.resources.enabled=true $*
|
||||||
|
|
||||||
.PHONY: $(CHARTS)
|
.PHONY: $(CHARTS)
|
||||||
$(CHARTS): $(addprefix dry-run-,$(CHARTS))
|
$(CHARTS): $(addprefix dry-run-,$(CHARTS)) chartbanner
|
||||||
$(HELM) package -d charts charts/$@
|
$(HELM) package -d charts charts/$@
|
||||||
|
|
||||||
.PHONY: helm-serve
|
.PHONY: helm-serve
|
||||||
|
|
|
@ -43,7 +43,7 @@ promenade_render_validate_body() {
|
||||||
JSON="{\"rel\":\"design\",\"href\":\"${NGINX_URL}/promenade.yaml\",\"type\":\"application/x-yaml\"}"
|
JSON="{\"rel\":\"design\",\"href\":\"${NGINX_URL}/promenade.yaml\",\"type\":\"application/x-yaml\"}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ${JSON}
|
echo "${JSON}"
|
||||||
}
|
}
|
||||||
|
|
||||||
promenade_health_check() {
|
promenade_health_check() {
|
||||||
|
|
|
@ -18,12 +18,12 @@ else
|
||||||
docker build -q \
|
docker build -q \
|
||||||
--network host \
|
--network host \
|
||||||
-t "${IMAGE_PROMENADE}" \
|
-t "${IMAGE_PROMENADE}" \
|
||||||
--build-arg HTTP_PROXY=${HTTP_PROXY} \
|
--build-arg "HTTP_PROXY=${HTTP_PROXY:-}" \
|
||||||
--build-arg HTTPS_PROXY=${HTTPS_PROXY} \
|
--build-arg "HTTPS_PROXY=${HTTPS_PROXY:-}" \
|
||||||
--build-arg NO_PROXY=${NO_PROXY} \
|
--build-arg "NO_PROXY=${NO_PROXY:-}" \
|
||||||
--build-arg http_proxy=${http_proxy} \
|
--build-arg "http_proxy=${http_proxy:-}" \
|
||||||
--build-arg https_proxy=${https_proxy} \
|
--build-arg "https_proxy=${https_proxy:-}" \
|
||||||
--build-arg no_proxy=${no_proxy} \
|
--build-arg "no_proxy=${no_proxy:-}" \
|
||||||
"${WORKSPACE}"
|
"${WORKSPACE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ for NAME in "${NODES[@]}"; do
|
||||||
log Failed to get keystone token, exiting.
|
log Failed to get keystone token, exiting.
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
TOKEN_HASH=$(echo -n ${TOKEN} | md5sum)
|
TOKEN_HASH=$(echo -n "${TOKEN}" | md5sum)
|
||||||
log "Got keystone token, token md5sum: ${TOKEN_HASH}"
|
log "Got keystone token, token md5sum: ${TOKEN_HASH}"
|
||||||
CURL_ARGS+=("-H" "X-Auth-Token: ${TOKEN}")
|
CURL_ARGS+=("-H" "X-Auth-Token: ${TOKEN}")
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue