def buildName = manager.envVars['JOB_NAME'];
def buildId = manager.envVars['BUILD_ID'];

manager.listener.logger.println(buildName);


On Saturday, October 29, 2011 at 6:18:06 AM UTC+8, Hans wrote:
>
> Hello, 
>
> I am trying to figure out how I can use the value of an environment 
> variable to set the result of a build in Jenkins. 
>
> I have a Python script with does a few checks and sets an environment 
> variable in a file using the EnvInject Plugin. 
>
> I want to make a Groovy script that checks the results of this 
> variable. The file is formatted as "CMV_RESULT = FALSE/TRUE". I would 
> like to have some kind of Groovy script that does 
>
> if($CMV_RESULT = TRUE) { 
> buildSuccess() 
> } else { 
> buildFailure() 
> } 
>
> I have looked at the examples and the hudson.model.AbstractBuild 
> documentation but I cannot come up with a solution myself. I hope 
> somebody can help with this. 
>
> Kind regards, 
>
> Hans

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5d3c8668-9135-4cdf-9366-88f1e81facac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to