优化部署
This commit is contained in:
1 parent
9b7f26f0df
commit
f851e5d3ff
2 files changed
+1
-29
No files matched your search
Vendored
-29
@@ -51,35 +51,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Validate Docker Inputs') {
|
||||
steps {
|
||||
sh '''
|
||||
set -e
|
||||
test -f docker-compose.yml
|
||||
test -f backend/Dockerfile
|
||||
test -f "docs/(表+字段).md"
|
||||
|
||||
if grep -Eq '^docs/?$' .dockerignore 2>/dev/null && ! grep -Fxq '!docs/(表+字段).md' .dockerignore; then
|
||||
echo "[Validate Docker Inputs] .dockerignore excludes docs, but docs/(表+字段).md is not re-included."
|
||||
echo "[Validate Docker Inputs] Please keep docs/(表+字段).md in the Docker build context for Text2SQL."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -Fq 'context: .' docker-compose.yml || ! grep -Fq 'dockerfile: backend/Dockerfile' docker-compose.yml; then
|
||||
echo "[Validate Docker Inputs] docker-compose.yml must build hxops-backend from repository root with backend/Dockerfile."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -Fq 'COPY docs/(表+字段).md /app/docs/(表+字段).md' backend/Dockerfile; then
|
||||
echo "[Validate Docker Inputs] backend/Dockerfile must copy docs/(表+字段).md into the image."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[Validate Docker Inputs] Docker build context and Text2SQL schema inputs are ready."
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('Detect Changes') {
|
||||
steps {
|
||||
script {
|
||||
|
||||
Reference in new issue
Block a user