You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/09 20:56:31 UTC
[GitHub] [apisix-docker] leslie-tsang opened a new pull request #219: feat: more human friendly makefile output
leslie-tsang opened a new pull request #219:
URL: https://github.com/apache/apisix-docker/pull/219
* better makefile output
* more flexible docker ENV inject support
https://github.com/NGX-AI/apisix-docker/blob/0576345238eabb7ef4e07dbffe100722ba365f1d/Makefile#L35-L38
> before
```bash
Makefile rules:
build-on-centos: Build apache/apisix:xx-centos image
build-on-alpine: Build apache/apisix:xx-alpine image
build-on-alpine-local: Build apache/apisix:xx-alpine-local image
push-on-centos: Push apache/apisix:xx-centos image
push-on-alpine: Push apache/apisix:xx-alpine image
build-on-alpine-cn: Build apache/apisix:xx-alpine image (for chinese)
build-all-in-one: Build All in one Docker container for Apache APISIX
save-centos-tar: tar apache/apisix:xx-centos image
save-alpine-tar: tar apache/apisix:xx-alpine image
build-dashboard: Build apache/dashboard:tag image
push-dashboard: Push apache/dashboard:tag image
save-dashboard-tar: tar apache/apisix-dashboard:tag image
help: Show Makefile rules
```
> after
```bash
[ info ] Makefile rules:
make build-on-centos : Build apache/apisix:xx-centos image
make build-on-alpine : Build apache/apisix:xx-alpine image
make build-on-alpine-local : Build apache/apisix:xx-alpine-local image
make push-on-centos : Push apache/apisix:xx-centos image
make push-on-alpine : Push apache/apisix:xx-alpine image
make build-on-alpine-cn : Build apache/apisix:xx-alpine image (for chinese)
make build-all-in-one : Build All in one Docker container for Apache APISIX
make save-centos-tar : tar apache/apisix:xx-centos image
make save-alpine-tar : tar apache/apisix:xx-alpine image
make build-dashboard : Build apache/dashboard:tag image
make push-dashboard : Push apache/dashboard:tag image
make save-dashboard-tar : tar apache/apisix-dashboard: tag image
make help : Show Makefile rules
```
Signed-off-by: Leslie <le...@icloud.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leslie-tsang commented on a change in pull request #219: feat: more human friendly makefile output
Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on a change in pull request #219:
URL: https://github.com/apache/apisix-docker/pull/219#discussion_r706959375
##########
File path: Makefile
##########
@@ -24,69 +28,131 @@ APISIX_DASHBOARD_VERSION ?= 2.8
APISIX_DASHBOARD_IMAGE_NAME = apache/apisix-dashboard
APISIX_DASHBOARD_IMAGE_TAR_NAME = apache_apisix_dashboard
-### build-on-centos: Build apache/apisix:xx-centos image
+
+# Makefile ENV
+ENV_OS_NAME ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
+ENV_APISIX_TAR_NAME ?= $(IMAGE_TAR_NAME)_$(APISIX_VERSION)
+ENV_APISIX_IMAGE_TAG_NAME ?= $(IMAGE_NAME):$(APISIX_VERSION)
+ENV_DOCKER ?= docker
+
+
+# Makefile basic extension function
+_color_red =\E[1;31m
+_color_green =\E[1;32m
+_color_yellow =\E[1;33m
+_color_blue =\E[1;34m
+_color_wipe =\E[0m
+
+
+define func_echo_status
+ printf "[$(_color_blue) info $(_color_wipe)] %s\n" $(1)
+endef
+
+
+define func_echo_warn_status
+ printf "[$(_color_yellow) info $(_color_wipe)] %s\n" $(1)
+endef
Review comment:
These two functions are reserved for better extend support
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] bzp2010 merged pull request #219: feat: more human friendly makefile output
Posted by GitBox <gi...@apache.org>.
bzp2010 merged pull request #219:
URL: https://github.com/apache/apisix-docker/pull/219
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leslie-tsang commented on a change in pull request #219: feat: more human friendly makefile output
Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on a change in pull request #219:
URL: https://github.com/apache/apisix-docker/pull/219#discussion_r706962626
##########
File path: Makefile
##########
@@ -24,69 +28,131 @@ APISIX_DASHBOARD_VERSION ?= 2.8
APISIX_DASHBOARD_IMAGE_NAME = apache/apisix-dashboard
APISIX_DASHBOARD_IMAGE_TAR_NAME = apache_apisix_dashboard
-### build-on-centos: Build apache/apisix:xx-centos image
+
+# Makefile ENV
+ENV_OS_NAME ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
+ENV_APISIX_TAR_NAME ?= $(IMAGE_TAR_NAME)_$(APISIX_VERSION)
+ENV_APISIX_IMAGE_TAG_NAME ?= $(IMAGE_NAME):$(APISIX_VERSION)
+ENV_DOCKER ?= docker
+
+
+# Makefile basic extension function
+_color_red =\E[1;31m
+_color_green =\E[1;32m
+_color_yellow =\E[1;33m
+_color_blue =\E[1;34m
+_color_wipe =\E[0m
+
+
+define func_echo_status
+ printf "[$(_color_blue) info $(_color_wipe)] %s\n" $(1)
+endef
+
+
+define func_echo_warn_status
+ printf "[$(_color_yellow) info $(_color_wipe)] %s\n" $(1)
+endef
Review comment:
> Hi, these two functions seem not used? Any reason for this?
eg: more clear run out
```bash
### build-on-centos: Build apache/apisix:xx-centos image
build-on-centos:
@$(call func_echo_status, "$@ -> [ Start ]")
docker build -t $(IMAGE_NAME):$(APISIX_VERSION)-centos -f ./centos/Dockerfile .
@$(call func_echo_success_status, "$@ -> [ Done ]")
```
> output
```bash
[ info ] build-on-centos -> [ Start ]
docker build output ...
[ info ] build-on-centos -> [ Done ]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] imjoey commented on a change in pull request #219: feat: more human friendly makefile output
Posted by GitBox <gi...@apache.org>.
imjoey commented on a change in pull request #219:
URL: https://github.com/apache/apisix-docker/pull/219#discussion_r706958392
##########
File path: Makefile
##########
@@ -24,69 +28,131 @@ APISIX_DASHBOARD_VERSION ?= 2.8
APISIX_DASHBOARD_IMAGE_NAME = apache/apisix-dashboard
APISIX_DASHBOARD_IMAGE_TAR_NAME = apache_apisix_dashboard
-### build-on-centos: Build apache/apisix:xx-centos image
+
+# Makefile ENV
+ENV_OS_NAME ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
+ENV_APISIX_TAR_NAME ?= $(IMAGE_TAR_NAME)_$(APISIX_VERSION)
+ENV_APISIX_IMAGE_TAG_NAME ?= $(IMAGE_NAME):$(APISIX_VERSION)
+ENV_DOCKER ?= docker
+
+
+# Makefile basic extension function
+_color_red =\E[1;31m
+_color_green =\E[1;32m
+_color_yellow =\E[1;33m
+_color_blue =\E[1;34m
+_color_wipe =\E[0m
+
+
+define func_echo_status
+ printf "[$(_color_blue) info $(_color_wipe)] %s\n" $(1)
+endef
+
+
+define func_echo_warn_status
+ printf "[$(_color_yellow) info $(_color_wipe)] %s\n" $(1)
+endef
Review comment:
Hi, these two functions seem not used? Any reason for this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] imjoey commented on a change in pull request #219: feat: more human friendly makefile output
Posted by GitBox <gi...@apache.org>.
imjoey commented on a change in pull request #219:
URL: https://github.com/apache/apisix-docker/pull/219#discussion_r706975876
##########
File path: Makefile
##########
@@ -24,69 +28,131 @@ APISIX_DASHBOARD_VERSION ?= 2.8
APISIX_DASHBOARD_IMAGE_NAME = apache/apisix-dashboard
APISIX_DASHBOARD_IMAGE_TAR_NAME = apache_apisix_dashboard
-### build-on-centos: Build apache/apisix:xx-centos image
+
+# Makefile ENV
+ENV_OS_NAME ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
+ENV_APISIX_TAR_NAME ?= $(IMAGE_TAR_NAME)_$(APISIX_VERSION)
+ENV_APISIX_IMAGE_TAG_NAME ?= $(IMAGE_NAME):$(APISIX_VERSION)
+ENV_DOCKER ?= docker
+
+
+# Makefile basic extension function
+_color_red =\E[1;31m
+_color_green =\E[1;32m
+_color_yellow =\E[1;33m
+_color_blue =\E[1;34m
+_color_wipe =\E[0m
+
+
+define func_echo_status
+ printf "[$(_color_blue) info $(_color_wipe)] %s\n" $(1)
+endef
+
+
+define func_echo_warn_status
+ printf "[$(_color_yellow) info $(_color_wipe)] %s\n" $(1)
+endef
Review comment:
@leslie-tsang Got you, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org