加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.cmd 4.73 KB
一键复制 编辑 原始数据 按行查看 历史
Manuel Zorn 提交于 2023-09-06 08:42 . Merge branch 'pipeline/v172'
@echo off
set "qualifier=local"
set "pubregistry=metasfresh"
set /P version=<docker-builds/version.info
for /F "tokens=*" %%g in ('powershell -Command "& {Get-Date}"') do (set buildtime=%%g)
for /F "tokens=*" %%g in ('powershell -Command "& {Get-Date -Format """"yyMMddHHmm""""}"') do (set buildnr=%%g)
if not exist docker-builds\mvn\local-settings.xml ( copy docker-builds\mvn\settings.xml docker-builds\mvn\local-settings.xml)
(
echo build.name=local windows
echo build.system=%ComputerName%
echo build.time=%buildtime%
echo build.user=%USERNAME%
echo build.version=%version%.3-%qualifier%.%buildnr%
echo build.number=%buildnr%
) > docker-builds/metadata/build-info.properties
(
echo git.remote.origin.url=https\://github.com/metasfresh/metasfresh.git
echo git.branch=n/a
echo git.commit.id=n/a
echo git.commit.message=n/a
) > docker-builds/metadata/git.properties
echo.
echo --------------------------
echo declaring metadata
echo --------------------------
echo.
type docker-builds\metadata\build-info.properties
echo.
type docker-builds\metadata\git.properties
echo.
@echo on
@echo.
@echo --------------------------
@echo building maven artifacts
@echo --------------------------
docker build -f docker-builds/Dockerfile.common --secret id=mvn-settings,src=docker-builds/mvn/local-settings.xml -t %pubregistry%/metas-mvn-common:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.backend --secret id=mvn-settings,src=docker-builds/mvn/local-settings.xml -t %pubregistry%/metas-mvn-backend:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.backend.dist -t %pubregistry%/metas-mvn-backend-dist:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.camel --secret id=mvn-settings,src=docker-builds/mvn/local-settings.xml -t %pubregistry%/metas-mvn-camel:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.camel.dist -t %pubregistry%/metas-mvn-camel-dist:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.junit --secret id=mvn-settings,src=docker-builds/mvn/local-settings.xml -t %pubregistry%/metas-junit:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.camel.junit --secret id=mvn-settings,src=docker-builds/mvn/local-settings.xml -t %pubregistry%/metas-camel-junit:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.cucumber --secret id=mvn-settings,src=docker-builds/mvn/local-settings.xml -t %pubregistry%/metas-cucumber:%qualifier% . || @goto error
@echo.
@echo --------------------------
@echo building deployables
@echo --------------------------
docker build -f docker-builds/Dockerfile.backend.api -t %pubregistry%/metas-api:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.backend.app -t %pubregistry%/metas-app:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.camel.externalsystems -t %pubregistry%/metas-externalsystems:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.frontend -t %pubregistry%/metas-frontend:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.mobile -t %pubregistry%/metas-mobile:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.db-standalone -t %pubregistry%/metas-db:%qualifier% . || @goto error
docker build -f docker-builds/Dockerfile.db-migrations -t %pubregistry%/metas-db:%qualifier%-migrations . || @goto error
docker build -f docker-builds/Dockerfile.db-preloaded -t %pubregistry%/metas-db:%qualifier%-preloaded . || @goto error
@echo.
@echo --------------------------
@echo building classic-compatible deployables
@echo --------------------------
docker build -f docker-builds/Dockerfile.backend.api.compat -t %pubregistry%/metas-api:%qualifier%-compat . || @goto error
docker build -f docker-builds/Dockerfile.backend.app.compat -t %pubregistry%/metas-app:%qualifier%-compat . || @goto error
docker build -f docker-builds/Dockerfile.backend.report.compat -t %pubregistry%/metas-report:%qualifier%-compat . || @goto error
docker build -f docker-builds/Dockerfile.mobile.compat -t %pubregistry%/metas-mobile:%qualifier%-compat . || @goto error
docker build -f docker-builds/Dockerfile.frontend.compat -t %pubregistry%/metas-frontend:%qualifier%-compat . || @goto error
@REM ----- for a rainy day -----
@REM docker build -f docker-builds/Dockerfile.e2e -t %pubregistry%/metas-e2e:%qualifier% . || @goto error
@REM docker build -f docker-builds/Dockerfile.procurement.frontend -t %pubregistry%/metas-procurement-frontend:%qualifier% . || @goto error
@REM ---------------------------
:success
@echo.
@echo --------------------------
@echo success
@echo --------------------------
@docker images --filter=reference="%pubregistry%/metas-*"
@echo.
@exit
:error
@echo.
@echo --------------------------
@echo failure
@echo --------------------------
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化