Hello,

I've installed sonar plugin on jenkins instance.



Now, i'm trying configure to just enable sonar analysis on nightly builds.



I configured sonar to Skip if environment variable is defined: disabledSonar





i installed two plugins:

- Condition Plugin and EnvInject Plugin.



On Job, I add sonar action and I configured a Pre Step Condition as:

Run: Time

Earliest:08h

Latest:18h

Builder: Inject environment variables

Properties Content: disabledSonar=true



As Post Steps i added a Execute shell to list all env variables, just to
check if Pre Step Condition works:

****************************

echo "list env variables..."

env

****************************

So, on console output I see the variable enabled, including
disabledSonar,but analysis sonar still runs.



I tried another way with build parameter and it works. But, we can't
delegate this responsibility to users (enable/disable sonar).



Someone could help me saying what i'm doing wrong?


Could you give another way to just enable sonar on nightly builds?

Thanks.

-- 

Marcus Vinicius A. Silva

*P*  *ANTES DE IMPRIMIR pense em sua responsabilidade e compromisso
com o MEIO AMBIENTE.*

Reply via email to