Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit 4ab1dc2

Browse files
author
smothiki
committed
feat(doctor): add curl script to access doctor endpoint
1 parent d8f2149 commit 4ab1dc2

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ export GO15VENDOREXPERIMENT=1
55

66
include versioning.mk
77

8-
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.9.0
8+
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.13.0
99
SWAGGER_IMAGE := quay.io/goswagger/swagger:0.5.0
1010
DEV_ENV_WORK_DIR := /go/src/github.com/deis/${SHORT_NAME}
1111
DEV_ENV_CMD := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
1212
SWAGGER_CMD := docker run --rm -e GOPATH=/go -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${SWAGGER_IMAGE}
13+
SHELL_SCRIPTS = rootfs/bin/doctor
1314

1415
# Common flags passed into Go's linker.
1516
LDFLAGS := "-s -X main.version=${VERSION}"
@@ -42,6 +43,9 @@ test:
4243
${SWAGGER_CMD} validate ./api/swagger-spec/swagger.yml
4344
${DEV_ENV_CMD} sh -c 'go test -v $$(glide nv)'
4445

46+
test-style:
47+
${DEV_ENV_CMD} shellcheck $(SHELL_SCRIPTS)
48+
4549
# For cases where we're building from local
4650
# We also alter the RC file to set the image name.
4751
docker-build: build

rootfs/bin/doctor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -eo pipefail
3+
uid=$(curl --silent --show-error -X POST localhost:8080/doctor)
4+
echo "Information sent to deis doctor is available at the following url ${DOCTOR_API_URL}/${uid}"

0 commit comments

Comments
 (0)