Minor fixes/adjustments to the new CI pipelines

This commit is contained in:
Pedro Algarvio 2019-06-24 11:38:00 +01:00
parent b61da95d70
commit d76ef84c0e
No known key found for this signature in database
GPG Key ID: BB36BF6584A298FF
17 changed files with 167 additions and 257 deletions

View File

@ -1,14 +1,9 @@
// Define the maximum time, in hours, that a test run should run for
def global_timeout = 2
def salt_target_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
])
def shell_header
@ -44,7 +39,7 @@ timeout(time: global_timeout, unit: 'HOURS') {
pyenv install --skip-existing 3.6.8
pyenv shell 3.6.8
python --version
pip install -U https://github.com/s0undt3ch/nox/archive/hotfix/py2.zip#egg=Nox==2018.10.17
pip install -U nox-py2
nox --version
'''
}

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'centos'
def distro_version = '6'
def python_version = 'py2'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'centos'
def distro_version = '7'
def python_version = 'py2'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'centos'
def distro_version = '7'
def python_version = 'py3'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'debian'
def distro_version = '8'
def python_version = 'py2'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'debian'
def distro_version = '8'
def python_version = 'py3'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'debian'
def distro_version = '9'
def python_version = 'py2'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'debian'
def distro_version = '9'
def python_version = 'py3'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'fedora'
def distro_version = '29'
def python_version = 'py2'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'fedora'
def distro_version = '29'
def python_version = 'py3'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -1,4 +1,4 @@
//// Define the maximum time, in hours, that a test run should run for
// Define the maximum time, in hours, that a test run should run for
def testrun_timeout = 6
// Now define a global pipeline timeout. This is the test run timeout with one(1) additional
// hour to allow for artifacts to be downloaded, if possible.
@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'ubuntu'
def distro_version = '1604'
def python_version = 'py2'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -1,4 +1,4 @@
//// Define the maximum time, in hours, that a test run should run for
// Define the maximum time, in hours, that a test run should run for
def testrun_timeout = 6
// Now define a global pipeline timeout. This is the test run timeout with one(1) additional
// hour to allow for artifacts to be downloaded, if possible.
@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'ubuntu'
def distro_version = '1604'
def python_version = 'py3'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'ubuntu'
def distro_version = '1804'
def python_version = 'py2'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'ubuntu'
def distro_version = '1804'
def python_version = 'py3'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -1,5 +1,5 @@
// Define the maximum time, in hours, that a test run should run for
def testrun_timeout = 6
def testrun_timeout = 8
// Now define a global pipeline timeout. This is the test run timeout with one(1) additional
// hour to allow for artifacts to be downloaded, if possible.
def global_timeout = testrun_timeout + 1;
@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'windows'
def distro_version = '2016'
def python_version = 'py2'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,10 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
'NOX_PASSTHROUGH_OPTS=--ssh-tests',
"NOX_PASSTHROUGH_OPTS=--unit",
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

View File

@ -1,5 +1,5 @@
// Define the maximum time, in hours, that a test run should run for
def testrun_timeout = 6
def testrun_timeout = 8
// Now define a global pipeline timeout. This is the test run timeout with one(1) additional
// hour to allow for artifacts to be downloaded, if possible.
def global_timeout = testrun_timeout + 1;
@ -7,17 +7,11 @@ def global_timeout = testrun_timeout + 1;
def distro_name = 'windows'
def distro_version = '2016'
def python_version = 'py3'
def golden_images_branch = '2018.3'
def salt_target_branch = '2018.3'
def golden_images_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
parameters([
booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull')
])
@ -35,9 +29,10 @@ timeout(time: global_timeout, unit: 'HOURS') {
'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/nox-platforms.yml',
'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/nox-verifier.yml',
'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml',
"SALT_TARGET_BRANCH=${salt_target_branch}",
'NOX_ENV_NAME=runtests-zeromq',
'NOX_ENABLE_FROM_FILENAMES=true',
"NOX_PASSTHROUGH_OPTS=--unit",
"SALT_TARGET_BRANCH=${salt_target_branch}",
"GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}",
"CODECOV_FLAGS=${distro_name}${distro_version},${python_version}",
'PATH=~/.rbenv/shims:/usr/local/rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin',

254
.ci/lint
View File

@ -1,49 +1,42 @@
// Define the maximum time, in hours, that a test run should run for
def global_timeout = 3
def salt_target_branch = '2018.3'
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
[
$class: 'ScannerJobProperty', doNotScan: false
],
[
$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false
],
])
def shell_header
def salt_target_branch = '2018.3'
timeout(time: global_timeout, unit: 'HOURS') {
node('lint') {
ansiColor('xterm') {
timestamps {
withEnv([
"SALT_TARGET_BRANCH=${salt_target_branch}",
]) {
try {
// Set the GH status even before cloning the repo
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
stage('github-pending') {
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'Python lint begins...',
status: 'PENDING',
context: "jenkins/pr/lint"
}
shell_header = 'export PYENV_ROOT="/usr/local/pyenv"\nexport PATH="$PYENV_ROOT/bin:$PATH"'
} else {
shell_header = ''
try {
// Set the GH status even before cloning the repo
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
stage('github-pending') {
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'Python lint begins...',
status: 'PENDING',
context: "jenkins/pr/lint"
}
shell_header = 'export PYENV_ROOT="/usr/local/pyenv"\nexport PATH="$PYENV_ROOT/bin:$PATH"'
} else {
shell_header = ''
}
withEnv(["SALT_TARGET_BRANCH=${salt_target_branch}"]) {
// Checkout the repo
stage('checkout-scm') {
cleanWs notFailBuild: true
checkout scm
sh 'git fetch --no-tags https://github.com/saltstack/salt.git +refs/heads/${SALT_TARGET_BRANCH}:refs/remotes/origin/${SALT_TARGET_BRANCH}'
}
// Setup the kitchen required bundle
stage('Setup') {
sh shell_header + '''
git fetch --no-tags https://github.com/saltstack/salt.git +refs/heads/${SALT_TARGET_BRANCH}:refs/remotes/origin/${SALT_TARGET_BRANCH}
# Need -M to detect renames otherwise they are reported as Delete and Add, need -C to detect copies, -C includes -M
# -M is on by default in git 2.9+
git diff --name-status -l99999 -C "origin/${SALT_TARGET_BRANCH}" > file-list-status.log
@ -56,140 +49,151 @@ timeout(time: global_timeout, unit: 'HOURS') {
pyenv install --skip-existing 2.7.15
pyenv shell 2.7.15
python --version
pip install -U https://github.com/s0undt3ch/nox/archive/hotfix/py2.zip#egg=Nox==2018.10.17
pip install -U nox-py2
nox --version
# Create the required virtualenvs in serial
nox --install-only -e lint-salt
nox --install-only -e lint-tests
'''
archiveArtifacts artifacts: 'file-list-status.log,file-list-changed.log,file-list-deleted.log,file-list-experiment.log'
}
stage('Lint Changes') {
try {
parallel(
lintSalt: {
stage('Lint Salt Changes') {
if (readFile('file-list-changed.log') =~ /(?i)(^|\n)(salt\/.*\.py|setup\.py)\n/) {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-salt-chg.log
grep -Ei '^salt/.*\\.py$|^setup\\.py$' file-list-changed.log | xargs -r '--delimiter=\\n' nox -e lint-salt --
EC=$?
exit $EC
'''
}
}
},
lintTests: {
stage('Lint Test Changes') {
if (readFile('file-list-changed.log') =~ /(?i)(^|\n)tests\/.*\.py\n/) {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-tests-chg.log
grep -Ei '^tests/.*\\.py$' file-list-changed.log | xargs -r '--delimiter=\\n' nox -e lint-tests --
EC=$?
exit $EC
'''
}
archiveArtifacts artifacts: 'file-list-status.log,file-list-changed.log,file-list-deleted.log,file-list-experiment.log'
}
stage('Lint Changes') {
try {
parallel(
lintSalt: {
stage('Lint Salt Changes') {
if (readFile('file-list-changed.log') =~ /(?i)(^|\n)(salt\/.*\.py|setup\.py)\n/) {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-salt-chg.log
grep -Ei '^salt/.*\\.py$|^setup\\.py$' file-list-changed.log | xargs -r '--delimiter=\\n' nox -e lint-salt --
EC=$?
exit $EC
'''
}
}
)
} finally {
archiveArtifacts artifacts: 'pylint-report-*-chg.log', allowEmptyArchive: true
},
lintTests: {
stage('Lint Test Changes') {
if (readFile('file-list-changed.log') =~ /(?i)(^|\n)tests\/.*\.py\n/) {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-tests-chg.log
grep -Ei '^tests/.*\\.py$' file-list-changed.log | xargs -r '--delimiter=\\n' nox -e lint-tests --
EC=$?
exit $EC
'''
}
}
}
)
} finally {
def changed_logs_pattern = 'pylint-report-*-chg.log'
archiveArtifacts artifacts: changed_logs_pattern, allowEmptyArchive: true
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
step([$class: 'WarningsPublisher',
parserConfigurations: [[
parserName: 'PyLint',
pattern: 'pylint-report-*-chg.log'
pattern: changed_logs_pattern
]],
failedTotalAll: '0',
useDeltaValues: false,
canRunOnFailed: true,
usePreviousBuildAsReference: true
])
} else {
recordIssues(enabledForFailure: true, tool: pyLint(pattern: changed_logs_pattern, reportEncoding: 'UTF-8'))
}
}
stage('Lint Full') {
if (env.CHANGE_BRANCH =~ /(?i)^merge[._-]/) {
// perform a full linit if this is a merge forward and the change only lint passed.
try {
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'Python lint on everything begins...',
status: 'PENDING',
context: "jenkins/pr/lint"
}
parallel(
lintSaltFull: {
stage('Lint Salt Full') {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-salt-full.log
nox -e lint-salt
EC=$?
exit $EC
'''
}
},
lintTestsFull: {
stage('Lint Tests Full') {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-tests-full.log
nox -e lint-salt
EC=$?
exit $EC
'''
}
}
stage('Lint Full') {
if (env.CHANGE_BRANCH =~ /(?i)^merge[._-]/) {
// perform a full linit if this is a merge forward and the change only lint passed.
try {
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'Python lint on everything begins...',
status: 'PENDING',
context: "jenkins/pr/lint"
}
parallel(
lintSaltFull: {
stage('Lint Salt Full') {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-salt-full.log
nox -e lint-salt
EC=$?
exit $EC
'''
}
)
} finally {
archiveArtifacts artifacts: 'pylint-report-*-full.log', allowEmptyArchive: true
},
lintTestsFull: {
stage('Lint Tests Full') {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-tests-full.log
nox -e lint-salt
EC=$?
exit $EC
'''
}
}
)
} finally {
def full_logs_pattern = 'pylint-report-*-full.log'
archiveArtifacts artifacts: full_logs_pattern, allowEmptyArchive: true
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
step([$class: 'WarningsPublisher',
parserConfigurations: [[
parserName: 'PyLint',
pattern: 'pylint-report-*-full.log'
pattern: full_logs_pattern
]],
failedTotalAll: '0',
useDeltaValues: false,
canRunOnFailed: true,
usePreviousBuildAsReference: true
])
} else {
recordIssues(enabledForFailure: true, tool: pyLint(pattern: full_logs_pattern, reportEncoding: 'UTF-8'))
}
}
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} finally {
cleanWs notFailBuild: true
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'The lint test passed',
status: 'SUCCESS',
context: "jenkins/pr/lint"
}
} else {
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'The lint test failed',
status: 'FAILURE',
context: "jenkins/pr/lint"
}
try {
slackSend channel: "#jenkins-prod-pr",
color: '#FF0000',
message: "FAILED: PR-Job: '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})"
} catch (Exception e) {
sh 'echo Failed to send the Slack notification'
}
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} finally {
cleanWs notFailBuild: true
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'The lint test passed',
status: 'SUCCESS',
context: "jenkins/pr/lint"
}
} else {
if (env.NODE_NAME.startsWith('jenkins-pr-')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'The lint test failed',
status: 'FAILURE',
context: "jenkins/pr/lint"
}
try {
slackSend channel: "#jenkins-prod-pr",
color: '#FF0000',
message: "FAILED: PR-Job: '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})"
} catch (Exception e) {
sh 'echo Failed to send the Slack notification'
}
}
}