Add a build-timeout macro

This change adds a build-timeout macro.  This macro sets two parameters
1. sets a 'BUILD_TIMEOUT' environment variable which is set to the
   build timeout value.
2. sets the build to a failed state when a timeout has occurred.

This change requires the Jenkins build-timeout plugin >= ver 1.13
It will not work with older versions of the plugin.  When this parameter
is used with version 1.10 of the plugin Jenkins will set the timeout to 0
and abort builds immediately.

Change-Id: Ie261cac10b59a6094a7f3ec9167274c47b2fc4a3
This commit is contained in:
Khai Do 2014-05-27 13:54:47 -07:00
parent 454676b07e
commit 75b05731bf
2 changed files with 11 additions and 2 deletions

View File

@ -17,9 +17,8 @@
concurrent: true
wrappers:
- timeout:
- build-timeout:
timeout: 30
fail: true
- timestamps
logrotate:

View File

@ -295,6 +295,16 @@
# ======================================================================
- wrapper:
name: build-timeout
wrappers:
- timeout:
timeout: '{timeout}'
timeout-var: 'BUILD_TIMEOUT'
fail: true
# ======================================================================
- publisher:
name: tarball
publishers: