2 Star 0 Fork 0

WeBankPartners/wecube-plugins-artifacts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
原来你还在这里 提交于 2025-02-10 14:41 +08:00 . update: Makefile
current_dir=$(shell pwd)
version=$(shell bash ./build/version.sh)
date=$(shell date +%Y%m%d%H%M%S)
project_name=$(shell basename "${current_dir}")
remote_docker_image_registry=ccr.ccs.tencentyun.com/webankpartners/wecube-plugins-artifacts
with_nexus='true'
clean_py:
rm -rf $(current_dir)/artifacts-corepy/dist/
build_py: clean_py
pip3 install wheel
cd artifacts-corepy && python3 setup.py bdist_wheel
cd artifacts-ui && npm install --force && npm run plugin
image_py: build_py
wget -O nexus-data.tar.gz https://wecube-1259801214.cos.ap-guangzhou.myqcloud.com/nexus-data/nexus-data.tar.gz
@if [ $(with_nexus) == 'true' ]; \
then \
docker build -t $(project_name):$(version) .; \
else \
docker build -t $(project_name):$(version) -f Dockerfile_nonexus .; \
fi
package_py: image_py
rm -rf package
mkdir -p package
cd package && docker save $(project_name):$(version) -o image.tar
cd package && cp ../register.xml .
cd package && cp ../init.sql ./init.sql
cd package && sed -i "s~{{REPOSITORY}}~$(project_name)~g" register.xml
cd package && sed -i "s~{{VERSION}}~$(version)~g" register.xml
cd artifacts-ui/dist && zip -r ui.zip .
cd package && cp ../artifacts-ui/dist/ui.zip .
cd package && zip -r $(project_name)-$(version).zip .
docker rmi $(project_name):$(version)
upload_py: package_py
$(eval container_id:=$(shell docker run -v $(current_dir)/package:/package -itd --entrypoint=/bin/sh minio/mc))
docker exec $(container_id) mc config host add wecubeS3 $(s3_server_url) $(s3_access_key) $(s3_secret_key) wecubeS3
docker exec $(container_id) mc cp /package/$(project_name)-$(version).zip wecubeS3/wecube-plugin-package-bucket
docker stop $(container_id)
docker rm -f $(container_id)
rm -rf $(project_name)-$(version).zip
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/WeBankPartners/wecube-plugins-artifacts.git
git@gitee.com:WeBankPartners/wecube-plugins-artifacts.git
WeBankPartners
wecube-plugins-artifacts
wecube-plugins-artifacts
master

搜索帮助