Jenkins quality gates in a declarative syntax?

19 views
Skip to first unread message

Javi D R

unread,
Aug 29, 2017, 9:59:05 AM8/29/17
to SonarQube
Hi

I am having some problems when calling the quality gates plugin from Jenkins using a declarative syntax

Using a scripted syntax, its really easy

stage("Quality Gate") { 
  timeout(time: 10, unit: 'MINUTES') { 
    def qg = waitForQualityGate() 
    if (qg.status != 'OK') {
      error "Pipeline aborted due to quality gate failure: ${qg.status}"
    }
  }
 

But.. when moving it to a declarative model, how could i make it work?

Thanks
Reply all
Reply to author
Forward
0 new messages