增加项目的各个功能

This commit is contained in:
qiaoxinjiu
2026-05-07 19:21:19 +08:00
parent aba1618f89
commit ee6cd4ae66
121 changed files with 9346 additions and 43 deletions

18
Jenkinsfile vendored
View File

@@ -122,8 +122,11 @@ pipeline {
sshCommand remote: remote, sudo: false, command: """
set -e
docker ps --filter name=${CONTAINER_NAME}
curl -I http://127.0.0.1:${HOST_PORT}
sleep 10
docker ps -a --filter name=${CONTAINER_NAME}
docker inspect ${CONTAINER_NAME} --format '{{.State.Status}}'
docker logs --tail 100 ${CONTAINER_NAME} || true
curl -v http://127.0.0.1:${HOST_PORT}
"""
}
}
@@ -168,14 +171,15 @@ def deploy_node_by_password(Map args) {
remote.password = DEPLOY_PASS
def deployCommand = """
echo '${HARBOR_PASS}' | docker login '${REGISTRY}' -u '${HARBOR_USER}' --password-stdin &&
docker pull '${IMAGE_NAME}:latest' &&
docker rm -f '${CONTAINER_NAME}' || true &&
set -e
echo '${HARBOR_PASS}' | docker login '${REGISTRY}' -u '${HARBOR_USER}' --password-stdin
docker pull '${IMAGE_NAME}:latest'
docker rm -f '${CONTAINER_NAME}' || true
docker run -d \
--name '${CONTAINER_NAME}' \
--restart always \
-p '${HOST_PORT}:${CONTAINER_PORT}' \
'${IMAGE_NAME}:latest' &&
--network host \
'${IMAGE_NAME}:latest'
docker logout '${REGISTRY}' || true
"""