From f3270123ba5efdbc52f7b5edadcb446ba88eb0a2 Mon Sep 17 00:00:00 2001 From: Woa <0903wzy@gmail.com> Date: Sun, 25 Jun 2023 19:52:17 +0800 Subject: [PATCH] fix: split `REGISTRY` into `BUILDER_REGISTRY` and `REGISTRY` (#395) --- plugins/wasm-go/Makefile | 5 +++-- plugins/wasm-go/README_EN.md | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/wasm-go/Makefile b/plugins/wasm-go/Makefile index 256343814..b6d83c5d2 100644 --- a/plugins/wasm-go/Makefile +++ b/plugins/wasm-go/Makefile @@ -1,11 +1,12 @@ PLUGIN_NAME ?= hello-world -REGISTRY ?= higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ +BUILDER_REGISTRY ?= higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ +REGISTRY ?= GO_VERSION ?= 1.19 TINYGO_VERSION ?= 0.25.0 ORAS_VERSION ?= 1.0.0 HIGRESS_VERSION ?= 1.0.0-rc USE_HIGRESS_TINYGO ?= true -BUILDER ?= ${REGISTRY}wasm-go-builder:go${GO_VERSION}-tinygo${TINYGO_VERSION}-oras${ORAS_VERSION} +BUILDER ?= ${BUILDER_REGISTRY}wasm-go-builder:go${GO_VERSION}-tinygo${TINYGO_VERSION}-oras${ORAS_VERSION} BUILD_TIME := $(shell date "+%Y%m%d-%H%M%S") COMMIT_ID := $(shell git rev-parse --short HEAD 2>/dev/null) IMAGE_TAG = $(if $(strip $(PLUGIN_VERSION)),${PLUGIN_VERSION},${BUILD_TIME}-${COMMIT_ID}) diff --git a/plugins/wasm-go/README_EN.md b/plugins/wasm-go/README_EN.md index 7f9c63d5f..a8f9220ea 100644 --- a/plugins/wasm-go/README_EN.md +++ b/plugins/wasm-go/README_EN.md @@ -29,11 +29,11 @@ You can also use `make build-push` to build and push the image at the same time. ### Environmental parameters -| Name | Optional/Required | Default | 含义 | -|---------------|-------------------|--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| -| `PLUGIN_NAME` | Optional | hello-world | The name of the plugin to build. | -| `REGISTRY` | Optional | empty | The regitstry address of the generated image, e.g. `example.registry.io/my-name/`. Note that the REGISTRY value should end with /. | -| `IMG` | Optional | If it is empty, it is generated based on the repository address, plugin name, build time, and git commit id. | The generated image tag will override the `REGISTRY` parameter if it is not empty. | +| Name | Optional/Required | Default | meaning | +|---------------|---------------|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------| +| `PLUGIN_NAME` | Optional | hello-world | The name of the plugin to build. | +| `REGISTRY` | Optional | empty | The registry address of the generated image, e.g. `example.registry.io/my-name/`. Note that the REGISTRY value should end with /. | +| `IMG` | Optional | If it is empty, it is generated based on the repository address, plugin name, build time, and git commit id. | The generated image tag will override the `REGISTRY` parameter if it is not empty. | ## Build on local yourself