1 Star 0 Fork 997

hgh411/shenyu

forked from Apache ShenYu/shenyu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 3.62 KB
一键复制 编辑 原始数据 按行查看 历史
DamonXue 提交于 2023-08-14 17:19 . Update Makefile SNAPSHOT VERSION (#4996)
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SHENYU_HOME := "."
VERSION ?= "2.6.1-SNAPSHOT"
REGISTRY ?= "docker.io"
REPOSITORY_PREF ?= "apache/shenyu"
ADMIN_REPOSITORY ?= "${REPOSITORY_PREF}-admin"
BOOTSTRAP_REPOSITORY ?= "${REPOSITORY_PREF}-bootstrap"
TAG ?= latest
COMMIT_ID := $(shell git rev-parse HEAD)
default: build-all-image
build-all: build-admin build-bootstrap
@echo "build all"
build-admin:
@echo "build admin"
@${SHENYU_HOME}/mvnw -am \
-pl shenyu-dist/shenyu-admin-dist \
-Dmaven.javadoc.skip=true \
-Drat.skip=true \
-Djacoco.skip=true \
-DskipTests \
-Prelease \
clean package
build-bootstrap:
@echo "build bootstrap"
@${SHENYU_HOME}/mvnw -am \
-pl shenyu-dist/shenyu-bootstrap-dist \
-Dmaven.javadoc.skip=true \
-Drat.skip=true \
-Djacoco.skip=true \
-DskipTests \
-Prelease \
clean package
build-all-image: build-admin-image build-bootstrap-image ## build images on local, does not support multi platforms.
@echo "build images"
build-admin-image: build-admin ## build admin image for local
@echo "build admin image"
@docker buildx build --load \
-t ${REGISTRY}/${ADMIN_REPOSITORY}:${TAG} \
-f ${SHENYU_HOME}/shenyu-dist/shenyu-admin-dist/docker/Dockerfile \
--build-arg APP_NAME=apache-shenyu-${VERSION}-admin-bin \
--label "commit.id=${COMMIT_ID}" \
${SHENYU_HOME}/shenyu-dist/shenyu-admin-dist
build-bootstrap-image: build-bootstrap ## build bootstrap image for local
@echo "build bootstrap image"
@docker buildx build --load \
-t ${REGISTRY}/${BOOTSTRAP_REPOSITORY}:${TAG} \
-f ${SHENYU_HOME}/shenyu-dist/shenyu-bootstrap-dist/docker/Dockerfile \
--build-arg APP_NAME=apache-shenyu-${VERSION}-bootstrap-bin \
--label "commit.id=${COMMIT_ID}" \
${SHENYU_HOME}/shenyu-dist/shenyu-bootstrap-dist
publish-all-images: init publish-admin-image publish-bootstrap-image ## build and publish images on buildx, for producing multi platform images
@docker buildx rm shenyu
.PHONY: init
init:
@docker buildx create --name shenyu
@docker buildx use shenyu
publish-admin-image: build-admin
@echo "build and push admin image"
@docker buildx build --push \
--platform=linux/arm64,linux/amd64 \
-t ${REGISTRY}/${ADMIN_REPOSITORY}:latest \
-t ${REGISTRY}/${ADMIN_REPOSITORY}:${VERSION} \
--build-arg APP_NAME=apache-shenyu-${VERSION}-admin-bin \
--label "commit.id=${COMMIT_ID}" \
-f ${SHENYU_HOME}/shenyu-dist/shenyu-admin-dist/docker/Dockerfile \
${SHENYU_HOME}/shenyu-dist/shenyu-admin-dist
publish-bootstrap-image: build-bootstrap
@echo "build and push bootstrap image"
@docker buildx build --push \
--platform=linux/arm64,linux/amd64 \
-t ${REGISTRY}/${BOOSTRAP_REPOSITORY}:latest \
-t ${REGISTRY}/${BOOSTRAP_REPOSITORY}:${VERSION} \
--build-arg APP_NAME=apache-shenyu-${VERSION}-bootstrap-bin \
--label "commit.id=${COMMIT_ID}" \
-f ${SHENYU_HOME}/shenyu-dist/shenyu-bootstrap-dist/docker/Dockerfile \
${SHENYU_HOME}/shenyu-dist/shenyu-bootstrap-dist
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/hgh411/shenyu.git
git@gitee.com:hgh411/shenyu.git
hgh411
shenyu
shenyu
master

搜索帮助