Jenkins build
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
This commit is contained in:
33
Jenkinsfile
vendored
33
Jenkinsfile
vendored
@@ -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
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user