Jenkins build
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -40,7 +40,7 @@ pipeline {
|
|||||||
stage('Build timeline-frontend dist') {
|
stage('Build timeline-frontend dist') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def workspace = '.'
|
def workspace = $(pwd)
|
||||||
echo "当前工作空间路径: ${workspace}"
|
echo "当前工作空间路径: ${workspace}"
|
||||||
|
|
||||||
// 确保路径正确
|
// 确保路径正确
|
||||||
@@ -51,7 +51,7 @@ pipeline {
|
|||||||
sh "chown -R jenkins:jenkins ${workspace}"
|
sh "chown -R jenkins:jenkins ${workspace}"
|
||||||
|
|
||||||
// 使用更健壮的Docker命令
|
// 使用更健壮的Docker命令
|
||||||
sh 'docker run -v ./:/app -w /app node:18-alpine sh -c "cd /app && npm install && npm run build"'
|
sh 'docker run -v ./:/app -w /app node:18-alpine sh -c "cd /app && ls -la && npm install && npm run build"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user