Jenkins build
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good

This commit is contained in:
2025-12-29 16:28:02 +08:00
parent 8ad9ca304d
commit 92d5fe9069

33
Jenkinsfile vendored
View File

@@ -92,38 +92,9 @@ pipeline {
def imageTag = "${BUILD_NUMBER}-${env.GIT_COMMIT.take(7)}"
env.IMAGE_TAG = imageTag
// 创建一个简单的 nginx 配置(可选)
sh '''
cat > nginx.conf << 'EOF'
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}
EOF
'''
sh """
docker build -t ${DOCKER_IMAGE}:latest .
docker build -t ${DOCKER_IMAGE}:${imageTag} .
docker tag ${DOCKER_IMAGE}:${imageTag} ${DOCKER_IMAGE}:latest
"""
}
}