我使用Jenkins Declarative语法来定义我的管道。
我的管道在我的声纳质量门中被打破,所有阶段都被跳过,但最新的阶段显示绿色表示成功。
这是BlueOcean插件的问题还是我做错了什么:
maxRetries + 1
Jenkins日志显示了跳过的其余阶段:
pipeline{
agent { label 'maven-build-slave' }
options {
skipDefaultCheckout()
buildDiscarder(logRotator(numToKeepStr: '5'))
}
stages{
stage("Checkout Project"){
steps{
checkout scm
}
}
stage('Unit Test & Build Application') {
steps{
buildApplication()
}
}
stage("Sonar Quality & Security"){
steps{
sonarScanner()
sonarAnalysis()
}
}
stage('Checkout JBoss Binaries') {
steps{
checkoutBinaries()
}
}
stage('Pull WARs') {
steps{
copyBuildArtifacts()
}
}
stage('Pull Configuration') {
steps{
pullConfiguration()
}
}
stage('Configure Vaults') {
steps{
configureVaults()
}
}
stage('Configure Secrets') {
steps{
configureConfigMap()
}
}
stage('Configure Properties') {
steps{
configureBuildConfig()
}
}
stage('Deploy Image') {
steps{
configureAndDeploy()
}
}
stage("Integration Tests"){
parallel {
stage("Integration (REST API)"){
steps{
runIntegrationTestsRest()
}
}
stage("Integration (Workflow)"){
steps{
runIntegrationTestsWorkflow()
}
}
stage("Integration (SoapUI)"){
agent { label 'jenkins-slave-soapui' }
steps{
runIntegrationTestSoapUi()
}
}
}
}
}
post{
always{
script{
sendNotification status: currentBuild.result,
subject: "Deployment Completed"
}
}
}
}
有什么想法吗?
我希望将Integration Test Stage视为空。我根本没有进行测试,唯一的问题是绿色对我的管道来说基本上是假阳性。