2019-10-25 11:06:58 +00:00
|
|
|
@Library('salt@master-1.2') _
|
2019-07-19 10:06:58 +00:00
|
|
|
|
2019-05-29 12:51:43 +00:00
|
|
|
// Define the maximum time, in hours, that a test run should run for
|
2019-09-27 05:41:38 +00:00
|
|
|
def testrun_timeout = 6
|
2019-05-29 12:51:43 +00:00
|
|
|
|
2019-06-18 22:35:52 +00:00
|
|
|
def distro_name = 'centos'
|
|
|
|
def distro_version = '7'
|
|
|
|
def python_version = 'py2'
|
2019-10-25 11:06:58 +00:00
|
|
|
def nox_env_name = 'runtests-zeromq'
|
2019-09-25 14:13:58 +00:00
|
|
|
def salt_target_branch = 'master'
|
2019-11-08 18:52:46 +00:00
|
|
|
def golden_images_branch = 'master'
|
2019-07-19 10:06:58 +00:00
|
|
|
def nox_passthrough_opts = '--ssh-tests'
|
2019-10-25 11:06:58 +00:00
|
|
|
def concurrent_builds = 1
|
|
|
|
def use_spot_instances = true
|
|
|
|
def jenkins_slave_label = 'kitchen-slave'
|
2019-06-18 22:35:52 +00:00
|
|
|
|
2019-04-23 21:35:09 +00:00
|
|
|
properties([
|
2019-10-22 23:27:36 +00:00
|
|
|
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30')),
|
2019-06-10 21:28:54 +00:00
|
|
|
parameters([
|
|
|
|
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
|
|
|
|
])
|
2019-04-23 21:35:09 +00:00
|
|
|
])
|
2019-06-18 22:35:52 +00:00
|
|
|
|
2019-07-04 15:19:15 +00:00
|
|
|
// Be sure to cancel any previously running builds
|
|
|
|
def buildNumber = env.BUILD_NUMBER as int
|
2019-10-25 11:06:58 +00:00
|
|
|
if (buildNumber > concurrent_builds) {
|
2019-07-04 15:19:15 +00:00
|
|
|
// This will cancel the previous build which also defined a matching milestone
|
2019-10-25 11:06:58 +00:00
|
|
|
milestone(buildNumber - concurrent_builds)
|
2019-07-04 15:19:15 +00:00
|
|
|
}
|
|
|
|
// Define a milestone for this build so that, if another build starts, this one will be aborted
|
|
|
|
milestone(buildNumber)
|
|
|
|
|
2019-10-25 11:06:58 +00:00
|
|
|
runTests(
|
|
|
|
env: env,
|
|
|
|
distro_name: distro_name,
|
|
|
|
distro_version: distro_version,
|
|
|
|
python_version: python_version,
|
|
|
|
salt_target_branch: salt_target_branch,
|
|
|
|
golden_images_branch: golden_images_branch,
|
|
|
|
nox_env_name: nox_env_name,
|
|
|
|
nox_passthrough_opts: nox_passthrough_opts,
|
|
|
|
testrun_timeout: testrun_timeout,
|
|
|
|
run_full: params.runFull,
|
|
|
|
use_spot_instances: use_spot_instances,
|
|
|
|
jenkins_slave_label: jenkins_slave_label)
|
2019-04-25 13:35:43 +00:00
|
|
|
|
2019-06-18 22:35:52 +00:00
|
|
|
// vim: ft=groovy
|