You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2022/09/06 07:13:45 UTC
[incubator-devlake] branch main updated: chore: 🤖 Add build-images cmds in Makefile (#2970)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 7ac6e285 chore: 🤖 Add build-images cmds in Makefile (#2970)
7ac6e285 is described below
commit 7ac6e285a1a9dee6f412873c36fa96ce9fcff717
Author: Liu Shaohui <ls...@gmail.com>
AuthorDate: Tue Sep 6 15:13:41 2022 +0800
chore: 🤖 Add build-images cmds in Makefile (#2970)
Add build-images cmds in Makefile to build images quickly for debug
devlake on k8s
---
Makefile | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 688da8f6..e9d6c254 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,8 @@
# https://tutorialedge.net/golang/makefiles-for-go-developers/
SHA = $(shell git show -s --format=%h)
-TAG = $(shell git tag --points-at HEAD)
+TAG ?= $(shell git tag --points-at HEAD)
+IMAGE_REPO ?= "apache"
VERSION = $(TAG)@$(SHA)
dep:
@@ -45,6 +46,29 @@ build: build-plugin build-server
all: build build-worker
+build-server-image:
+ docker build -t $(IMAGE_REPO)/devlake:$(TAG) --file ./Dockerfile .
+
+build-config-ui-image:
+ cd config-ui; docker build -t $(IMAGE_REPO)/devlake-config-ui:$(TAG) --file ./Dockerfile .
+
+build-grafana-image:
+ cd grafana; docker build -t $(IMAGE_REPO)/devlake-grafana:$(TAG) --file ./Dockerfile .
+
+build-images: build-server-image build-config-ui-image build-grafana-image
+
+
+push-server-image: build-server-image
+ docker push $(IMAGE_REPO)/devlake:$(TAG)
+
+push-config-ui-image: build-config-ui-image
+ docker push $(IMAGE_REPO)/devlake-config-ui:$(TAG)
+
+push-grafana-image: build-grafana-image
+ docker push $(IMAGE_REPO)/devlake-grafana:$(TAG)
+
+push-images: push-server-image push-config-ui-image push-grafana-image
+
run:
go run main.go