[fix]:[20251208][构建docker,生成jar并构建镜像]
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
parent
99bf38c9ff
commit
a5c24fc31a
11
.drone.yml
11
.drone.yml
@ -62,6 +62,17 @@ steps:
|
|||||||
- mvn -s ~/.m2/settings.xml -DskipTests=true clean package
|
- mvn -s ~/.m2/settings.xml -DskipTests=true clean package
|
||||||
# 验证 JAR 文件是否生成
|
# 验证 JAR 文件是否生成
|
||||||
- ls -lah target/*.jar || (echo "JAR file not found!" && exit 1)
|
- ls -lah target/*.jar || (echo "JAR file not found!" && exit 1)
|
||||||
|
# 备份 JAR 文件到 /localcache/${DRONE_REPO_NAME}
|
||||||
|
- |
|
||||||
|
mkdir -p /localcache/${DRONE_REPO_NAME}
|
||||||
|
JAR_FILE=$(ls target/*.jar 2>/dev/null | head -1)
|
||||||
|
if [ -n "$JAR_FILE" ]; then
|
||||||
|
cp "$JAR_FILE" /localcache/${DRONE_REPO_NAME}/
|
||||||
|
echo "✅ JAR file backed up to /localcache/${DRONE_REPO_NAME}/$(basename $JAR_FILE)"
|
||||||
|
ls -lh /localcache/${DRONE_REPO_NAME}/
|
||||||
|
else
|
||||||
|
echo "⚠️ No JAR file found to backup"
|
||||||
|
fi
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include:
|
include:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user