在詹金斯(Jenkins)工作时,间歇出现以下错误
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile (default-testCompile) on project my-tests: Fatal error compiling: directory not found: /var/jenkins_home/workspace/test_master/target/test-classes -> [Help 1]
此作业与以下Jenkins代码并行运行各个阶段。
timestamps {
node ('master') {
withFolderProperties{
nameSpace = "${env.namespace}"
}
println "Environment :: ${nameSpace}"
}
node('docker_test') {
checkout scm
stage ('Determining the tests to run') {
if (stand) {
List tests = [
"test, Run Test"
]
listTests.addAll(tests)
}
if (progress) {
List tests = [
"test_InProgress, Run Test - In Progress"
]
listTests.addAll(tests)
}
if (standB) {
List tests = [
"test_B, Run Test B"
]
listTests.addAll(tests)
}
if (progressB) {
List tests = [
"test_InProgress_B, Run Test B - In Progress"
]
listTests.addAll(tests)
}
}
stage ('Create build stages') {
for (item in listTests) {
String test = item.split(",")[0]
String testDesc = item.split(",")[1]
buildStages.put(item, stageConstructor(test, testDesc, nameSpace))
}
}
stage ('Run Parallel Tests') {
parallel(buildStages)
}
}
}
我能解决这个问题吗?实施Jenkins代码会有所帮助吗?如果是这样,我该如何实施?