2017-03-21 14:42 GMT+01:00 Jesse Glick <jgl...@cloudbees.com>:

> On Tue, Mar 21, 2017 at 8:40 AM, Julien HENRY
> <julien.he...@sonarsource.com> wrote:
> > script {
>
> Should not be necessary AFAIK—you can use block-scoped steps like
> `withSonarQubeEnv`.
>
> > withEnv(["JAVA_HOME=${ tool '8u121' }", "PATH+MAVEN=${tool
> '3.3.9'}/bin:${env.JAVA_HOME}/bin"]) {
>
> `tools` section
>

Indeed, it works fine without script block.

>
> > script  {
> >   def qg = waitForQualityGate()
> >   if (qg.status != 'OK') {
> >     error "Pipeline aborted due to quality gate failure: ${qg.status}"
>
> This part is not Declarative-friendly. You could add an option to
> `waitForQualityGate` to set the build result to `UNSTABLE`.
>

Here is a ticket: https://jira.sonarsource.com/browse/SONARJNKNS-280

Still that doesn't explain why the "communication" between the
withSonarQubeEnv and the waitForQualityGate steps is not working for some
people.

Jesse, withSonarQubeEnv is a SimpleBuildWrapper. We attach to it a Disposer
that collect some properties, and attach them to the build using
an InvisibleAction. Then later the waitForQualityGate step try to read it
back to get the values. For some people it seems to fail somewhere, in a
mater/slave configuration. I was not able to reproduce but are you aware of
any problem with this approach?

Thanks

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxEaRoFuvffGq8bx%2Bn8CjirFwLMao1pEPSUq5aDKV0Zbxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to