[OpenStack-Infra] anyway to create ENV variables in JJB?

Sean Dague sean at dague.net
Mon Feb 24 12:22:38 UTC 2014


On 02/24/2014 04:46 AM, Antoine Musso wrote:
> Le 24/02/2014 02:09, Sean Dague a écrit :
>> After seeing grenade jobs fail the inner / outer timeout because it
>> turns out there are > 5 minutes of time outside the main run job, I
>> pulled together this new approach - https://review.openstack.org/#/c/75726/
>>
>> Ideally it would be nice to not have to keep adding a
>> DEVSTACK_GATE_TIMEOUT into all the jobs, but instead use the existing
>> time definition from devstack-gate.yaml
>>
>>
>>    wrappers:
>>       - timeout:
>>           timeout: 130
>>           fail: true
>>
>> What would be needed would be to make that timeout value available as an
>> environmental variable some how.
>>
>> Any thoughts on how to make that happen?
> 
> Hello,
> 
> The Jenkins "Build Timeout" plugin does not support parameters and would
> fallback to a 3 minutes timeout whenever it is passed a non integer
> value :-(
> 
> Some Java guru might be able to add support to the plugin so it
> recognize build parameters properly (ex: TIMEOUT).
> 
> 
> On the JJB side, you could use a parameters in a job-template:
> 
> - job-template:
>     name: 'timeout-job'
>     wrappers:
>      - timeout:
>          timeout: "{timeout}"
>          fail: true
> 
> Then invoke the template filling the 'timeout' parameter, either at the
> job level:
> 
> - project:
>     name: project
>     jobs:
>      - timeout-job:
>          timeout: 30
> 
> Or at the project level:
> 
> - project:
>     name: project
>     timeout: 30
>     jobs:
>      - timeout-job
> 
> In both cases you will end up with the following XML:
> 
> <project>
>   ...
>   <buildWrappers>
>     <hudson.plugins.build__timeout.BuildTimeoutWrapper>
>       <!-- And here you have {timeout} expanded to 30 -->
>       <timeoutMinutes>30</timeoutMinutes>
>       <failBuild>true</failBuild>
>       ...
>     </hudson.plugins.build__timeout.BuildTimeoutWrapper>
>   </buildWrappers>
> </project>
> 
> 
> cheers,

So I think that's not my question at all.

My concern is that we are specifying the timeout parameter twice in our
yaml files. Once in yaml for jenkins, and once for devstack-gate (where
we manually shave off some number of minutes that we guess is good enough).

I want to not have to specify it a second time, which would be fine if
JJB made timeout available in the Jenkins environment.

	-Sean

-- 
Sean Dague
Samsung Research America
sean at dague.net / sean.dague at samsung.com
http://dague.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-infra/attachments/20140224/d826e619/attachment.pgp>


More information about the OpenStack-Infra mailing list