diff --git a/Makefile b/Makefile index 733e025..0ba64ea 100644 --- a/Makefile +++ b/Makefile @@ -94,22 +94,24 @@ kube-mc-integration: build-server: docker run -e GO15VENDOREXPERIMENT=1 -e GOROOT=/usr/local/go --rm -v "${CURDIR}/server":/pwd -w /pwd golang:1.5.2 ./install.sh -build-mc: - docker run -e GO15VENDOREXPERIMENT=1 -e GOROOT=/usr/local/go --rm -v "${CURDIR}/mc":/pwd -w /pwd golang:1.5.2 ./install.sh +# targets for mc -docker-build-mc: - docker build -t ${MC_IMAGE} mc +mc-build: + make -C mc build -docker-push-mc: - docker push ${MC_IMAGE} - perl -pi -e "s|image: [a-z0-9.:]+\/deis\/mc:[0-9a-z-.]+|image: ${MC_IMAGE}|g" manifests/deis-mc-pod.yaml +mc-docker-build: + make -C mc docker-build -docker-build-mc-integration: - docker build -t ${MC_INTEGRATION_IMAGE} mc +mc-docker-push: + make -C mc docker-push -docker-push-mc-integration: - docker push ${MC_INTEGRATION_IMAGE} - perl -pi -e "s|image: [a-z0-9.:]+\/deis\/mc-integration:[0-9a-z-.]+|image: ${MC_INTEGRATION_IMAGE}|g" manifests/deis-mc-integration-pod.yaml +# targets for the mc integration tests + +mc-integration-docker-build: + make -C mc/integration docker-build + +mc-integration-docker-push: + make -C mc/integration docker-push test: @echo "Implement functional tests in _tests directory" diff --git a/mc/Dockerfile b/mc/Dockerfile index 05e4830..6875ac7 100644 --- a/mc/Dockerfile +++ b/mc/Dockerfile @@ -5,7 +5,7 @@ RUN apt-get update -y && apt-get install -y -q ca-certificates ADD mc /bin/mc ENV DEIS_RELEASE=2.0.0-dev -ADD ./integration.sh /bin/integration.sh +ADD ./integration/integration.sh /bin/integration.sh RUN chmod +x /bin/integration.sh # this is so the minio client (https://github.com/minio/mc) works properly diff --git a/mc/Makefile b/mc/Makefile new file mode 100644 index 0000000..ae848a0 --- /dev/null +++ b/mc/Makefile @@ -0,0 +1,16 @@ +DEV_REGISTRY ?= $(docker-machine ip deis):5000 +DEIS_REGISTRY ?= ${DEV_REGISTRY} +IMAGE_PREFIX ?= deis +VERSION ?= git-$(shell git rev-parse --short HEAD) + +MC_IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/mc:${VERSION} +MC_INTEGRATION_IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/mc:${VERSION} + +build: + docker run -e GO15VENDOREXPERIMENT=1 -e GOROOT=/usr/local/go --rm -v ${CURDIR}:/pwd -w /pwd golang:1.5.2 ./install.sh + +docker-build: + docker build -t ${MC_IMAGE} ${CURDIR} + +docker-push: + docker push ${MC_IMAGE} diff --git a/mc/integration/Makefile b/mc/integration/Makefile new file mode 100644 index 0000000..f9138a4 --- /dev/null +++ b/mc/integration/Makefile @@ -0,0 +1,12 @@ +DEV_REGISTRY ?= $(docker-machine ip deis):5000 +DEIS_REGISTRY ?= ${DEV_REGISTRY} +IMAGE_PREFIX ?= deis +VERSION ?= git-$(shell git rev-parse --short HEAD) + +IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/mc-integration:${VERSION} + +docker-build: + docker build -t ${IMAGE} ${CURDIR}/.. + +docker-push: + docker push ${IMAGE} diff --git a/mc/integration.sh b/mc/integration/integration.sh similarity index 100% rename from mc/integration.sh rename to mc/integration/integration.sh