github.com/ahjdzx/deis@v1.1.1/cache/Makefile (about)

     1  include ../includes.mk
     2  
     3  COMPONENT = cache
     4  IMAGE = $(IMAGE_PREFIX)$(COMPONENT):$(BUILD_TAG)
     5  DEV_IMAGE = $(DEV_REGISTRY)/$(IMAGE)
     6  BUILD_IMAGE := $(COMPONENT)-build
     7  
     8  build: check-docker
     9  	docker build -t $(BUILD_IMAGE) image
    10  	docker cp `docker run -d $(BUILD_IMAGE)`:/usr/local/bin/redis-server bin/
    11  	docker cp `docker run -d $(BUILD_IMAGE)`:/go/bin/boot bin/
    12  	docker build -t $(IMAGE) .
    13  	rm bin/boot
    14  	rm bin/redis-server
    15  
    16  clean: check-docker check-registry
    17  	docker rmi $(IMAGE)
    18  
    19  full-clean: check-docker check-registry
    20  	docker images -q $(IMAGE_PREFIX)$(COMPONENT) | xargs docker rmi -f
    21  
    22  install: check-deisctl
    23  	deisctl install $(COMPONENT)
    24  
    25  uninstall: check-deisctl
    26  	deisctl uninstall $(COMPONENT)
    27  
    28  start: check-deisctl
    29  	deisctl start $(COMPONENT)
    30  
    31  stop: check-deisctl
    32  	deisctl stop $(COMPONENT)
    33  
    34  restart: stop start
    35  
    36  run: install start
    37  
    38  dev-release: push set-image
    39  
    40  push: check-registry
    41  	docker tag $(IMAGE) $(DEV_IMAGE)
    42  	docker push $(DEV_IMAGE)
    43  
    44  set-image: check-deisctl
    45  	deisctl config $(COMPONENT) set image=$(DEV_IMAGE)
    46  
    47  release:
    48  	docker push $(IMAGE)
    49  
    50  deploy: build dev-release restart
    51  
    52  test: test-unit test-functional
    53  
    54  test-unit:
    55  	@echo no unit tests
    56  
    57  test-functional:
    58  	@docker history deis/test-etcd >/dev/null 2>&1 || docker pull deis/test-etcd:latest
    59  	GOPATH=$(CURDIR)/../tests/_vendor:$(GOPATH) go test -v ./tests/...