Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 91d9ffc

Browse files
committed
Point Dockfiles at public Docker Hub repo; Add make help
1 parent 68d1e97 commit 91d9ffc

File tree

3 files changed

+43
-25
lines changed

3 files changed

+43
-25
lines changed

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.dev.ob1.io/openbazaar-qa:0.10
1+
FROM openbazaar/server-qa:0.10
22

33
RUN go get -u github.com/gogo/protobuf/proto \
44
github.com/golang/protobuf/protoc-gen-go \

Dockerfile.qa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ COPY ./Makefile ./Makefile
3131

3232
VOLUME /go/src/github.com/OpenBazaar/openbazaar-go
3333

34-
CMD make qa
34+
CMD make qa_test

Makefile

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
1+
.DEFAULT_GOAL := help
2+
3+
##
4+
## Global ENV vars
5+
##
6+
17
GIT_SHA ?= $(shell git rev-parse --short=8 HEAD)
28
GIT_TAG ?= $(shell git describe --tags --abbrev=0)
39

10+
##
11+
## Helpful Help
12+
##
13+
14+
.PHONY: help
15+
help:
16+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
17+
18+
419
##
520
## Building
621
##
722

823
.PHONY: ios_framework
9-
ios_framework:
24+
ios_framework: ## Build iOS Framework for mobile
1025
gomobile bind -target=ios github.com/OpenBazaar/openbazaar-go/mobile
1126

1227
.PHONY: android_framework
13-
android_framework:
28+
android_framework: ## Build Android Framework for mobile
1429
gomobile bind -target=android github.com/OpenBazaar/openbazaar-go/mobile
1530

1631
##
@@ -22,54 +37,57 @@ P_ANY = Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any
2237
PKGMAP = $(P_TIMESTAMP),$(P_ANY)
2338

2439
.PHONY: protos
25-
protos:
40+
protos: ## Build go files for proto definitions
2641
cd pb/protos && PATH=$(PATH):$(GOPATH)/bin protoc --go_out=$(PKGMAP):.. *.proto
2742

2843

2944
##
3045
## Testing
3146
##
32-
3347
OPENBAZAARD_NAME ?= openbazaard-$(GIT_TAG)-$(GIT_SHA)
3448
BITCOIND_PATH ?= .
3549

3650
.PHONY: openbazaard
37-
openbazaard:
51+
openbazaard: ## Build daemon
3852
$(info "Building openbazaar daemon...")
3953
go build -o ./$(OPENBAZAARD_NAME) .
4054

41-
.PHONY: qa
42-
qa: openbazaard
55+
.PHONY: qa_test
56+
qa_test: openbazaard ## Run QA test suite against current working copy
4357
$(info "Running QA... (openbazaard: ../$(OPENBAZAARD_NAME) bitcoind: $(BITCOIND_PATH)/bin/bitcoind)")
4458
(cd qa && ./runtests.sh ../$(OPENBAZAARD_NAME) $(BITCOIND_PATH)/bin/bitcoind)
4559

4660
##
4761
## Docker
4862
##
4963
PUBLIC_DOCKER_REGISTRY ?= openbazaar
50-
OB_DOCKER_REGISTRY ?= docker.dev.ob1.io
64+
QA_DEV_TAG ?= 0.10
5165

52-
DOCKER_IMAGE_NAME ?= $(PUBLIC_DOCKER_REGISTRY_PROFILE)/server:$(GIT_TAG)
53-
DOCKER_QA_IMAGE_NAME ?= $(OB_DOCKER_REGISTRY)/openbazaar-qa:$(GIT_SHA)
54-
DOCKER_DEV_IMAGE_NAME ?= openbazaar-dev:$(GIT_SHA)
66+
DOCKER_SERVER_IMAGE_NAME ?= $(PUBLIC_DOCKER_REGISTRY)/server:$(GIT_TAG)
67+
DOCKER_QA_IMAGE_NAME ?= $(PUBLIC_DOCKER_REGISTRY)/server-qa:$(QA_DEV_TAG)
68+
DOCKER_DEV_IMAGE_NAME ?= $(PUBLIC_DOCKER_REGISTRY)/server-dev:$(QA_DEV_TAG)
5569

5670

57-
.PHONY: docker
58-
docker:
59-
docker build -t $(DOCKER_IMAGE_NAME) .
71+
.PHONY: docker_build
72+
docker_build: ## Build container for daemon
73+
docker build -t $(DOCKER_SERVER_IMAGE_NAME) .
6074

61-
.PHONY: push_docker
62-
push_docker: docker
63-
docker push $(DOCKER_IMAGE_NAME)
75+
.PHONY: docker_push
76+
docker_push: docker ## Push container for daemon
77+
docker push $(DOCKER_SERVER_IMAGE_NAME)
6478

65-
.PHONY: qa_docker
66-
qa_docker:
79+
.PHONY: qa_docker_build
80+
qa_docker_build: ## Build container with QA test dependencies included
6781
docker build -t $(DOCKER_QA_IMAGE_NAME) -f ./Dockerfile.qa .
6882

69-
.PHONY: push_qa_docker
70-
push_qa_docker: qa_docker
83+
.PHONY: qa_docker_push
84+
qa_docker_push: qa_docker_build ## Push container for daemon QA test environment
7185
docker push $(DOCKER_QA_IMAGE_NAME)
7286

73-
.PHONY: dev_docker
74-
dev_docker:
87+
.PHONY: dev_docker_build
88+
dev_docker: ## Build container with dev dependencies included
7589
docker build -t $(DOCKER_DEV_IMAGE_NAME) -f ./Dockerfile.dev .
90+
91+
.PHONY: dev_docker_push
92+
dev_docker_push: dev_docker_build ## Push container for daemon dev environment
93+
docker push $(DOCKER_DEV_IMAGE_NAME)

0 commit comments

Comments
 (0)