我无法在 Maven 中构建存储。设置文件丢失。jenkinsfile中有这样的代码。如果它不在存储库本身中,它如何引用?帮助我理解
stages {
stage("Copying credentials files") {
steps {
withCredentials([file(credentialsId: 'settings.xml', variable: 'SETTINGS'), file(credentialsId: 'settings-security.xml', variable: 'SETTINGS_SECURITY')]) {
bat '''COPY %SETTINGS% %WORKSPACE%'''
bat '''COPY %SETTINGS_SECURITY% %WORKSPACE%'''
}
}
}
stage("Test") {
steps {
script {
try {
bat "mvn clean install -s settings.xml -Dsettings.security=settings-security.xml -DTagConfigFile=${configFile} -DTAGS=${tags}"
} catch (err) {
currentBuild.result = 'FAILURE'
throw err
} finally {
stage("Allure report") {
allure([
commandline : '2.8.0',
includeProperties: false,
jdk : '',
properties : [],
reportBuildPolicy: 'ALWAYS',
report : 'target/allure-report',
results : [[path: 'target/allure-results']]
])
}
}
}
}
}
}
}
长风秋雁
相关分类