我正在尝试为AEM项目创建管道。下面是我的管道脚本
#!/usr/bin/env groovy
pipeline {
agent any
tools {
maven 'maven_3_3_9'
}
environment {
CONTENT_REPOSITORY = 'Content API/source-code'
SITE = 'Site/Site-AEM'
SERVICE_API = 'Service API/service-api'
}
stages {
stage('Verify SERVICE API') {
steps {
bat 'echo Verifying SERVICE API: %SERVICE_API%'
bat 'cd %SERVICE_API% && mvn -B verify -DskipTests=true && mvn install:install-file -Dfile=core/target/service-api.core-1.0-SNAPSHOT.jar -DgroupId=com.service -DartifactId=service-api.core -Dversion=1.0-SNAPSHOT -Dpackaging=jar'
}
}
stage('Verify CONTENT REPOSITORY') {
steps {
bat 'echo Verifying Content repository: %CONTENT_REPOSITORY%'
bat 'cd %CONTENT_REPOSITORY % && mvn -B verify -DskipTests=true'
}
}
stage('Verify SITE') {
steps {
bat 'echo Verifying MBS site: %SITE%'
bat 'cd %SITE% && mvn -B verify -DskipTests=true'
}
}
stage('Deploy to 4443') {
steps {
bat 'echo Deploy to 4443 starting...'
bat 'echo Deploy to 4443 end.'
}
}
}
}
这是Jenkins服务器在构建期间生成的日志 https://i.imgur.com/HV9ggAZ.png
但是,如果转到目录文件夹,则使用相同的maven验证。它运行无任何编译器错误。 https://i.imgur.com/fM09GFv.png
这是我的Jenkins设置配置:
https://i.imgur.com/I93ZL3f.png https://i.imgur.com/gTQ6lCC.png
对此有何建议?
---谢谢,伙计们---