Remove go build run containers

This commit is contained in:
Arash Bannazadeh-Mahani 2016-06-28 11:42:52 -07:00
parent 87e043510c
commit a5d112c061

View File

@ -108,23 +108,19 @@ go-builder:
gosuper: go-builder gosuper: go-builder
-mkdir -p bin -mkdir -p bin
-docker rm --volumes -f resin_build_gosuper_$(JOB_NAME) || true -docker rm --volumes -f resin_build_gosuper_$(JOB_NAME) || true
docker run --name resin_build_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper/bin:/usr/src/app/bin -e USER_ID=$(shell id -u) -e GROUP_ID=$(shell id -g) -e GOARCH=$(GOARCH) -e GOARM=$(GOARM) resin/go-supervisor-builder:$(SUPERVISOR_VERSION) docker run --rm --name resin_build_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper/bin:/usr/src/app/bin -e USER_ID=$(shell id -u) -e GROUP_ID=$(shell id -g) -e GOARCH=$(GOARCH) -e GOARM=$(GOARM) resin/go-supervisor-builder:$(SUPERVISOR_VERSION)
docker rm --volumes -f resin_build_gosuper_$(JOB_NAME)
mv gosuper/bin/linux_$(GOARCH)/gosuper bin/gosuper mv gosuper/bin/linux_$(GOARCH)/gosuper bin/gosuper
test-gosuper: go-builder test-gosuper: go-builder
-docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true -docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true
docker run --name resin_test_gosuper_$(JOB_NAME) -v /var/run/dbus:/mnt/root/run/dbus -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && ./test_formatting.sh && go test -v ./gosuper" docker run --rm --name resin_test_gosuper_$(JOB_NAME) -v /var/run/dbus:/mnt/root/run/dbus -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && ./test_formatting.sh && go test -v ./gosuper"
docker rm --volumes -f resin_test_gosuper_$(JOB_NAME)
format-gosuper: go-builder format-gosuper: go-builder
-docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true -docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true
docker run --name resin_test_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper:/usr/src/app/src/resin-supervisor/gosuper resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go fmt ./..." docker run --rm --name resin_test_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper:/usr/src/app/src/resin-supervisor/gosuper resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go fmt ./..."
docker rm --volumes -f resin_test_gosuper_$(JOB_NAME)
test-integration: go-builder test-integration: go-builder
-docker rm --volumes -f resin_test_integration_$(JOB_NAME) || true -docker rm --volumes -f resin_test_integration_$(JOB_NAME) || true
docker run --name resin_test_integration_$(JOB_NAME) --net=host -e SUPERVISOR_IP="$(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' resin_supervisor_1)" --volumes-from resin_supervisor_1 -v /var/run/dbus:/mnt/root/run/dbus -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go test -v ./supertest" docker run --rm --name resin_test_integration_$(JOB_NAME) --net=host -e SUPERVISOR_IP="$(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' resin_supervisor_1)" --volumes-from resin_supervisor_1 -v /var/run/dbus:/mnt/root/run/dbus -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go test -v ./supertest"
docker rm --volumes -f resin_test_integration_$(JOB_NAME)
.PHONY: supervisor deploy supervisor-dind run-supervisor .PHONY: supervisor deploy supervisor-dind run-supervisor