From de26d54984d9120b35d822375fe98b6831eedb8a Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Fri, 20 Sep 2019 14:07:20 -0600 Subject: [PATCH 01/44] remove usage of sshagent plugin like the branch tests --- .ci/kitchen-amazon2-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-amazon2-py3 | 111 ++++++++++++++++----------------- .ci/kitchen-centos6-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-centos7-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-centos7-py2-tcp | 111 ++++++++++++++++----------------- .ci/kitchen-centos7-py3 | 111 ++++++++++++++++----------------- .ci/kitchen-centos7-py3-tcp | 111 ++++++++++++++++----------------- .ci/kitchen-debian8-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-debian8-py3 | 111 ++++++++++++++++----------------- .ci/kitchen-debian9-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-debian9-py3 | 111 ++++++++++++++++----------------- .ci/kitchen-fedora29-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-fedora29-py3 | 111 ++++++++++++++++----------------- .ci/kitchen-ubuntu1604-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-ubuntu1604-py2-tcp | 111 ++++++++++++++++----------------- .ci/kitchen-ubuntu1604-py3 | 111 ++++++++++++++++----------------- .ci/kitchen-ubuntu1604-py3-tcp | 111 ++++++++++++++++----------------- .ci/kitchen-ubuntu1804-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-ubuntu1804-py3 | 111 ++++++++++++++++----------------- .ci/kitchen-windows2016-py2 | 111 ++++++++++++++++----------------- .ci/kitchen-windows2016-py3 | 111 ++++++++++++++++----------------- 21 files changed, 1155 insertions(+), 1176 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index a3bc34a297a9..007ed42eab60 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index ff508d3d030d..a3e999fa0c9e 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 98bfb68c8aed..9f80c17e5a45 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index e64e1ffd6586..682cb021149e 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index b742feaadf83..eac920d52d83 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index d6094f37e5af..e82a523331eb 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index daba37d78a08..ffbf963324ab 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index 9a0fe07faacb..c8c3fba4fa39 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 43ec963b9e69..f3cf25ffec4b 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index 1288dd047f4e..159505782fa1 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index f863dc4cf16f..0ee2aed5a9bd 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index 9232163c87fb..2700f8837bf4 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index 543189af6154..e57d53e25e82 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 07256109ae88..0ced5099a98f 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index bc7a6b9c92ef..8de479e8a307 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index 0feb96855f49..b61a887caf7d 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index 9a9ff87e0ddb..c6ee96a3e925 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index 66df539fd948..2e4d2dca67cf 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 3eca715225e3..2a58125843dc 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-windows2016-py2 b/.ci/kitchen-windows2016-py2 index 99ddce189d9b..a8f89e045454 100644 --- a/.ci/kitchen-windows2016-py2 +++ b/.ci/kitchen-windows2016-py2 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } diff --git a/.ci/kitchen-windows2016-py3 b/.ci/kitchen-windows2016-py3 index 550043eddd71..0ff3bc426866 100644 --- a/.ci/kitchen-windows2016-py3 +++ b/.ci/kitchen-windows2016-py3 @@ -78,72 +78,71 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } } - sshagent(credentials: ['jenkins-testing-ssh-key']) { - sh 'ssh-add ~/.ssh/kitchen.pem' - try { - timeout(time: testrun_timeout, unit: 'HOURS') { - stage('Converge VM') { - sh 'bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" fi if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" fi """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 ''' } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}" || true - fi - ''' - } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' } } } From b1f26870182a7b62d9ef44019bf7d32586ca3798 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Tue, 24 Sep 2019 22:22:31 -0600 Subject: [PATCH 02/44] attempt to use spot instances if available --- .ci/kitchen-amazon2-py2 | 3 ++- .ci/kitchen-amazon2-py3 | 3 ++- .ci/kitchen-centos6-py2 | 3 ++- .ci/kitchen-centos7-py2 | 3 ++- .ci/kitchen-centos7-py2-tcp | 3 ++- .ci/kitchen-centos7-py3 | 3 ++- .ci/kitchen-centos7-py3-tcp | 3 ++- .ci/kitchen-debian8-py2 | 3 ++- .ci/kitchen-debian8-py3 | 3 ++- .ci/kitchen-debian9-py2 | 3 ++- .ci/kitchen-debian9-py3 | 3 ++- .ci/kitchen-fedora29-py2 | 3 ++- .ci/kitchen-fedora29-py3 | 3 ++- .ci/kitchen-ubuntu1604-py2 | 3 ++- .ci/kitchen-ubuntu1604-py2-tcp | 3 ++- .ci/kitchen-ubuntu1604-py3 | 3 ++- .ci/kitchen-ubuntu1604-py3-tcp | 3 ++- .ci/kitchen-ubuntu1804-py2 | 3 ++- .ci/kitchen-ubuntu1804-py3 | 3 ++- 19 files changed, 38 insertions(+), 19 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index 007ed42eab60..b866760bf791 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index a3e999fa0c9e..f45b0635ab5a 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 9f80c17e5a45..282694741cd5 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index 682cb021149e..6d5dac0320c4 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index eac920d52d83..cc9c58946a16 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index e82a523331eb..270fc7b2e74c 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index ffbf963324ab..a728e50ff600 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index c8c3fba4fa39..06630bfa8d69 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index f3cf25ffec4b..3a426eb0147a 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index 159505782fa1..daa88954a4ce 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 0ee2aed5a9bd..c11d2e1d6465 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index 2700f8837bf4..372a2856374a 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index e57d53e25e82..aee843d34ced 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 0ced5099a98f..1aaa5f4ca631 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index 8de479e8a307..bf848c6346cc 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index b61a887caf7d..0f077f3aed99 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index c6ee96a3e925..38ad24d21c12 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index 2e4d2dca67cf..14171ea652dc 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 2a58125843dc..23743e53bebd 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -65,7 +65,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then From eb878165590f940824e5deb0051c632610539580 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Tue, 27 Aug 2019 19:16:09 -0600 Subject: [PATCH 03/44] change to saltstack version of kitchen-salt --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 86786e1560d5..441fd6def76e 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' # Point this back at the test-kitchen package after >1.2.5 is relased gem 'test-kitchen', :git => 'https://github.com/dwoz/test-kitchen.git', :branch => 'keepalive_maxcount' -gem 'kitchen-salt', :git => 'https://github.com/s0undt3ch/kitchen-salt.git', :branch => 'features/nox' +gem 'kitchen-salt', :git => 'https://github.com/saltstack/kitchen-salt.git' gem 'kitchen-sync' gem 'git' From f5492bd7f03a6dbc4f4322114a3fca83662544a8 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Mon, 26 Aug 2019 15:12:20 -0600 Subject: [PATCH 04/44] add debian 10 requirements --- requirements/static/debian-10.in | 44 +++++++ .../static/py3.4/zeromq-debian-10.txt | 118 ++++++++++++++++++ .../static/py3.5/zeromq-debian-10.txt | 116 +++++++++++++++++ .../static/py3.6/zeromq-debian-10.txt | 115 +++++++++++++++++ .../static/py3.7/zeromq-debian-10.txt | 115 +++++++++++++++++ 5 files changed, 508 insertions(+) create mode 100644 requirements/static/debian-10.in create mode 100644 requirements/static/py3.4/zeromq-debian-10.txt create mode 100644 requirements/static/py3.5/zeromq-debian-10.txt create mode 100644 requirements/static/py3.6/zeromq-debian-10.txt create mode 100644 requirements/static/py3.7/zeromq-debian-10.txt diff --git a/requirements/static/debian-10.in b/requirements/static/debian-10.in new file mode 100644 index 000000000000..e56336bb3ee0 --- /dev/null +++ b/requirements/static/debian-10.in @@ -0,0 +1,44 @@ +# This is a compilation of requirements installed on salt-jenkins git.salt state run +ansible; python_version < '3.0' +apache-libcloud==2.0.0 +boto3 +boto>=2.46.0 +cffi +cherrypy==17.3.0 +clustershell +croniter>=0.3.0,!=0.3.22 +dnspython +docker<4.0 +futures>=2.0; python_version < '3.0' +GitPython +jsonschema<=2.6.0 +junos-eznc +jxmlease +keyring==5.7.1 +kubernetes<4.0 +mock>=2.0.0; python_version < '3.6' +more-itertools==5.0.0 +moto +msgpack-python >= 0.4.2, != 0.5.5 +paramiko==2.1.2 +psutil +# Let's install cryptodome instead of pycrypto because of pycrypto's outstanding security issues +# PyCrypto, if pulled, will be removed from the generated static requirements +pycryptodome +pygit2 +pyinotify +pylxd>=2.2.5 +pyopenssl +python-etcd>0.4.2 +python-gnupg +pyvmomi +requests +rfc3987 +salttesting==2017.6.1 +setproctitle +strict_rfc3339 +supervisor==3.3.5; python_version < '3' +timelib +tornado<5.0 +virtualenv +yamlordereddictloader diff --git a/requirements/static/py3.4/zeromq-debian-10.txt b/requirements/static/py3.4/zeromq-debian-10.txt new file mode 100644 index 000000000000..c3de9078e60f --- /dev/null +++ b/requirements/static/py3.4/zeromq-debian-10.txt @@ -0,0 +1,118 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile -o requirements/static/py3.4/zeromq-debian-10.txt -v requirements/base.txt requirements/zeromq.txt requirements/pytest.txt requirements/static/debian-10.in +# +apache-libcloud==2.0.0 +asn1crypto==0.24.0 # via cryptography +atomicwrites==1.3.0 # via pytest +attrs==19.1.0 # via pytest +aws-xray-sdk==0.95 # via moto +backports-abc==0.5 # via tornado +backports.functools-lru-cache==1.5 # via cheroot +backports.ssl-match-hostname==3.7.0.1 # via docker, websocket-client +boto3==1.9.132 +boto==2.49.0 +botocore==1.12.132 # via boto3, moto, s3transfer +cachetools==3.1.0 # via google-auth +certifi==2019.3.9 # via kubernetes, requests, tornado +cffi==1.12.2 +chardet==3.0.4 # via requests +cheroot==6.5.4 # via cherrypy +cherrypy==17.3.0 +clustershell==1.8.1 +contextlib2==0.5.5 # via cherrypy +croniter==0.3.29 +cryptography==2.6.1 # via moto, paramiko, pylxd, pyopenssl +dnspython==1.16.0 +docker-pycreds==0.4.0 # via docker +docker==3.7.2 +docutils==0.14 # via botocore +ecdsa==0.13.2 # via python-jose +future==0.17.1 # via python-jose +gitdb2==2.0.5 # via gitpython +gitpython==2.1.11 +google-auth==1.6.3 # via kubernetes +idna==2.8 # via requests +ipaddress==1.0.22 # via kubernetes +jaraco.functools==2.0 # via tempora +jinja2==2.10.1 +jmespath==0.9.4 # via boto3, botocore +jsondiff==1.1.1 # via moto +jsonpickle==1.1 # via aws-xray-sdk +jsonschema==2.6.0 +junos-eznc==2.2.0 +jxmlease==1.0.1 +keyring==5.7.1 +kubernetes==3.0.0 +lxml==4.3.3 # via junos-eznc, ncclient +markupsafe==1.1.1 +mock==2.0.0 ; python_version < "3.6" +more-itertools==5.0.0 +moto==1.3.7 +msgpack-python==0.5.6 +msgpack==0.6.1 +ncclient==0.6.4 # via junos-eznc +netaddr==0.7.19 # via junos-eznc +paramiko==2.1.2 +pathlib2==2.3.3 # via pytest +pbr==5.1.3 # via mock, pylxd +pluggy==0.11.0 # via pytest +portend==2.4 # via cherrypy +psutil==5.6.1 +py==1.8.0 # via pytest +pyaml==19.4.1 # via moto +pyasn1-modules==0.2.4 # via google-auth +pyasn1==0.4.5 # via paramiko, pyasn1-modules, rsa +pycparser==2.19 # via cffi +# Next line explicitly commented out by pip-tools-compile because of the following regex: '^pycrypto==(.*)$' +# pycrypto==2.6.1 ; sys_platform != "win32" +pycryptodome==3.8.1 +pygit2==0.28.1 +pyinotify==0.9.6 +pylxd==2.2.9 +pyopenssl==19.0.0 +pyserial==3.4 # via junos-eznc +pytest-helpers-namespace==2019.1.8 +pytest-salt-runtests-bridge==2019.1.30 +pytest-salt==2019.5.10.post1 +pytest-tempdir==2018.8.11 +pytest-timeout==1.3.3 +pytest==4.4.2 +python-dateutil==2.8.0 # via botocore, croniter, kubernetes, moto, pylxd +python-etcd==0.4.5 +python-gnupg==0.4.4 +python-jose==2.0.2 # via moto +pytz==2019.1 # via moto, tempora +pyvmomi==6.7.1.2018.12 +pyyaml==3.13 +pyzmq==17.0.0 ; python_version == "3.4" +requests-toolbelt==0.9.1 # via pylxd +requests-unixsocket==0.1.5 # via pylxd +requests==2.21.0 +responses==0.10.6 # via moto +rfc3987==1.3.8 +rsa==4.0 # via google-auth +s3transfer==0.2.0 # via boto3 +salttesting==2017.6.1 +scandir==1.10.0 # via pathlib2 +scp==0.13.2 # via junos-eznc +selectors2==2.0.1 # via ncclient +setproctitle==1.1.10 +singledispatch==3.4.0.3 # via tornado +six==1.12.0 # via cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pathlib2, pygit2, pylxd, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, websocket-client +smmap2==2.0.5 # via gitdb2 +strict-rfc3339==0.7 +tempora==1.14.1 # via portend +timelib==0.2.4 +tornado==4.5.3 ; python_version >= "3.4" +urllib3==1.24.3 # via botocore, kubernetes, python-etcd, requests, requests-unixsocket +virtualenv==16.4.3 +websocket-client==0.40.0 # via docker, kubernetes +werkzeug==0.15.2 # via moto +wrapt==1.11.1 # via aws-xray-sdk +ws4py==0.5.1 # via pylxd +xmltodict==0.12.0 # via moto +yamlordereddictloader==0.4.0 +zc.lockfile==1.4 # via cherrypy diff --git a/requirements/static/py3.5/zeromq-debian-10.txt b/requirements/static/py3.5/zeromq-debian-10.txt new file mode 100644 index 000000000000..9bd6d7ad6f71 --- /dev/null +++ b/requirements/static/py3.5/zeromq-debian-10.txt @@ -0,0 +1,116 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile -o requirements/static/py3.5/zeromq-debian-10.txt -v requirements/base.txt requirements/zeromq.txt requirements/pytest.txt requirements/static/debian-10.in +# +apache-libcloud==2.0.0 +asn1crypto==0.24.0 # via cryptography +atomicwrites==1.3.0 # via pytest +attrs==19.1.0 # via pytest +aws-xray-sdk==0.95 # via moto +backports-abc==0.5 # via tornado +backports.functools-lru-cache==1.5 # via cheroot +backports.ssl-match-hostname==3.7.0.1 # via websocket-client +boto3==1.9.132 +boto==2.49.0 +botocore==1.12.132 # via boto3, moto, s3transfer +cachetools==3.1.0 # via google-auth +certifi==2019.3.9 # via kubernetes, requests, tornado +cffi==1.12.2 +chardet==3.0.4 # via requests +cheroot==6.5.4 # via cherrypy +cherrypy==17.3.0 +clustershell==1.8.1 +contextlib2==0.5.5 # via cherrypy +croniter==0.3.29 +cryptography==2.6.1 # via moto, paramiko, pylxd, pyopenssl +dnspython==1.16.0 +docker-pycreds==0.4.0 # via docker +docker==3.7.2 +docutils==0.14 # via botocore +ecdsa==0.13.2 # via python-jose +future==0.17.1 # via python-jose +gitdb2==2.0.5 # via gitpython +gitpython==2.1.11 +google-auth==1.6.3 # via kubernetes +idna==2.8 # via requests +ipaddress==1.0.22 # via kubernetes +jaraco.functools==2.0 # via tempora +jinja2==2.10.1 +jmespath==0.9.4 # via boto3, botocore +jsondiff==1.1.1 # via moto +jsonpickle==1.1 # via aws-xray-sdk +jsonschema==2.6.0 +junos-eznc==2.2.0 +jxmlease==1.0.1 +keyring==5.7.1 +kubernetes==3.0.0 +lxml==4.3.3 # via junos-eznc, ncclient +markupsafe==1.1.1 +mock==2.0.0 ; python_version < "3.6" +more-itertools==5.0.0 +moto==1.3.7 +msgpack-python==0.5.6 +msgpack==0.6.1 +ncclient==0.6.4 # via junos-eznc +netaddr==0.7.19 # via junos-eznc +paramiko==2.1.2 +pathlib2==2.3.3 # via pytest +pbr==5.1.3 # via mock, pylxd +pluggy==0.11.0 # via pytest +portend==2.4 # via cherrypy +psutil==5.6.1 +py==1.8.0 # via pytest +pyaml==19.4.1 # via moto +pyasn1-modules==0.2.4 # via google-auth +pyasn1==0.4.5 # via paramiko, pyasn1-modules, rsa +pycparser==2.19 # via cffi +# Next line explicitly commented out by pip-tools-compile because of the following regex: '^pycrypto==(.*)$' +# pycrypto==2.6.1 ; sys_platform != "win32" +pycryptodome==3.8.1 +pygit2==0.28.1 +pyinotify==0.9.6 +pylxd==2.2.9 +pyopenssl==19.0.0 +pyserial==3.4 # via junos-eznc +pytest-helpers-namespace==2019.1.8 +pytest-salt-runtests-bridge==2019.1.30 +pytest-salt==2019.5.10.post1 +pytest-tempdir==2018.8.11 +pytest-timeout==1.3.3 +pytest==4.4.2 +python-dateutil==2.8.0 # via botocore, croniter, kubernetes, moto, pylxd +python-etcd==0.4.5 +python-gnupg==0.4.4 +python-jose==2.0.2 # via moto +pytz==2019.1 # via moto, tempora +pyvmomi==6.7.1.2018.12 +pyyaml==3.13 +pyzmq==18.0.1 ; python_version != "3.4" +requests-toolbelt==0.9.1 # via pylxd +requests-unixsocket==0.1.5 # via pylxd +requests==2.21.0 +responses==0.10.6 # via moto +rfc3987==1.3.8 +rsa==4.0 # via google-auth +s3transfer==0.2.0 # via boto3 +salttesting==2017.6.1 +scp==0.13.2 # via junos-eznc +setproctitle==1.1.10 +singledispatch==3.4.0.3 # via tornado +six==1.12.0 # via cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pathlib2, pygit2, pylxd, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, websocket-client +smmap2==2.0.5 # via gitdb2 +strict-rfc3339==0.7 +tempora==1.14.1 # via portend +timelib==0.2.4 +tornado==4.5.3 ; python_version >= "3.4" +urllib3==1.24.3 # via botocore, kubernetes, python-etcd, requests, requests-unixsocket +virtualenv==16.4.3 +websocket-client==0.40.0 # via docker, kubernetes +werkzeug==0.15.2 # via moto +wrapt==1.11.1 # via aws-xray-sdk +ws4py==0.5.1 # via pylxd +xmltodict==0.12.0 # via moto +yamlordereddictloader==0.4.0 +zc.lockfile==1.4 # via cherrypy diff --git a/requirements/static/py3.6/zeromq-debian-10.txt b/requirements/static/py3.6/zeromq-debian-10.txt new file mode 100644 index 000000000000..96f71ae1353b --- /dev/null +++ b/requirements/static/py3.6/zeromq-debian-10.txt @@ -0,0 +1,115 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile -o requirements/static/py3.6/zeromq-debian-10.txt -v requirements/base.txt requirements/zeromq.txt requirements/pytest.txt requirements/static/debian-10.in +# +apache-libcloud==2.0.0 +asn1crypto==0.24.0 # via cryptography +atomicwrites==1.3.0 # via pytest +attrs==19.1.0 # via pytest +aws-xray-sdk==0.95 # via moto +backports-abc==0.5 # via tornado +backports.functools-lru-cache==1.5 # via cheroot +backports.ssl-match-hostname==3.7.0.1 # via websocket-client +boto3==1.9.132 +boto==2.49.0 +botocore==1.12.132 # via boto3, moto, s3transfer +cachetools==3.1.0 # via google-auth +certifi==2019.3.9 # via kubernetes, requests, tornado +cffi==1.12.2 +chardet==3.0.4 # via requests +cheroot==6.5.4 # via cherrypy +cherrypy==17.3.0 +clustershell==1.8.1 +contextlib2==0.5.5 # via cherrypy +croniter==0.3.29 +cryptography==2.6.1 # via moto, paramiko, pylxd, pyopenssl +dnspython==1.16.0 +docker-pycreds==0.4.0 # via docker +docker==3.7.2 +docutils==0.14 # via botocore +ecdsa==0.13.2 # via python-jose +future==0.17.1 # via python-jose +gitdb2==2.0.5 # via gitpython +gitpython==2.1.11 +google-auth==1.6.3 # via kubernetes +idna==2.8 # via requests +ipaddress==1.0.22 # via kubernetes +jaraco.functools==2.0 # via tempora +jinja2==2.10.1 +jmespath==0.9.4 # via boto3, botocore +jsondiff==1.1.1 # via moto +jsonpickle==1.1 # via aws-xray-sdk +jsonschema==2.6.0 +junos-eznc==2.2.0 +jxmlease==1.0.1 +keyring==5.7.1 +kubernetes==3.0.0 +lxml==4.3.3 # via junos-eznc, ncclient +markupsafe==1.1.1 +mock==2.0.0 # via moto +more-itertools==5.0.0 +moto==1.3.7 +msgpack-python==0.5.6 +msgpack==0.6.1 +ncclient==0.6.4 # via junos-eznc +netaddr==0.7.19 # via junos-eznc +paramiko==2.1.2 +pbr==5.1.3 # via mock, pylxd +pluggy==0.11.0 # via pytest +portend==2.4 # via cherrypy +psutil==5.6.1 +py==1.8.0 # via pytest +pyaml==19.4.1 # via moto +pyasn1-modules==0.2.4 # via google-auth +pyasn1==0.4.5 # via paramiko, pyasn1-modules, rsa +pycparser==2.19 # via cffi +# Next line explicitly commented out by pip-tools-compile because of the following regex: '^pycrypto==(.*)$' +# pycrypto==2.6.1 ; sys_platform != "win32" +pycryptodome==3.8.1 +pygit2==0.28.1 +pyinotify==0.9.6 +pylxd==2.2.9 +pyopenssl==19.0.0 +pyserial==3.4 # via junos-eznc +pytest-helpers-namespace==2019.1.8 +pytest-salt-runtests-bridge==2019.1.30 +pytest-salt==2019.5.10.post1 +pytest-tempdir==2018.8.11 +pytest-timeout==1.3.3 +pytest==4.4.2 +python-dateutil==2.8.0 # via botocore, croniter, kubernetes, moto, pylxd +python-etcd==0.4.5 +python-gnupg==0.4.4 +python-jose==2.0.2 # via moto +pytz==2019.1 # via moto, tempora +pyvmomi==6.7.1.2018.12 +pyyaml==3.13 +pyzmq==18.0.1 ; python_version != "3.4" +requests-toolbelt==0.9.1 # via pylxd +requests-unixsocket==0.1.5 # via pylxd +requests==2.21.0 +responses==0.10.6 # via moto +rfc3987==1.3.8 +rsa==4.0 # via google-auth +s3transfer==0.2.0 # via boto3 +salttesting==2017.6.1 +scp==0.13.2 # via junos-eznc +setproctitle==1.1.10 +singledispatch==3.4.0.3 # via tornado +six==1.12.0 # via cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pygit2, pylxd, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, websocket-client +smmap2==2.0.5 # via gitdb2 +strict-rfc3339==0.7 +tempora==1.14.1 # via portend +timelib==0.2.4 +tornado==4.5.3 ; python_version >= "3.4" +urllib3==1.24.3 # via botocore, kubernetes, python-etcd, requests, requests-unixsocket +virtualenv==16.4.3 +websocket-client==0.40.0 # via docker, kubernetes +werkzeug==0.15.2 # via moto +wrapt==1.11.1 # via aws-xray-sdk +ws4py==0.5.1 # via pylxd +xmltodict==0.12.0 # via moto +yamlordereddictloader==0.4.0 +zc.lockfile==1.4 # via cherrypy diff --git a/requirements/static/py3.7/zeromq-debian-10.txt b/requirements/static/py3.7/zeromq-debian-10.txt new file mode 100644 index 000000000000..2fcc3772a354 --- /dev/null +++ b/requirements/static/py3.7/zeromq-debian-10.txt @@ -0,0 +1,115 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile -o requirements/static/py3.7/zeromq-debian-10.txt -v requirements/base.txt requirements/zeromq.txt requirements/pytest.txt requirements/static/debian-10.in +# +apache-libcloud==2.0.0 +asn1crypto==0.24.0 # via cryptography +atomicwrites==1.3.0 # via pytest +attrs==19.1.0 # via pytest +aws-xray-sdk==0.95 # via moto +backports-abc==0.5 # via tornado +backports.functools-lru-cache==1.5 # via cheroot +backports.ssl-match-hostname==3.7.0.1 # via websocket-client +boto3==1.9.132 +boto==2.49.0 +botocore==1.12.132 # via boto3, moto, s3transfer +cachetools==3.1.0 # via google-auth +certifi==2019.3.9 # via kubernetes, requests, tornado +cffi==1.12.2 +chardet==3.0.4 # via requests +cheroot==6.5.4 # via cherrypy +cherrypy==17.3.0 +clustershell==1.8.1 +contextlib2==0.5.5 # via cherrypy +croniter==0.3.29 +cryptography==2.6.1 # via moto, paramiko, pylxd, pyopenssl +dnspython==1.16.0 +docker-pycreds==0.4.0 # via docker +docker==3.7.2 +docutils==0.14 # via botocore +ecdsa==0.13.2 # via python-jose +future==0.17.1 # via python-jose +gitdb2==2.0.5 # via gitpython +gitpython==2.1.11 +google-auth==1.6.3 # via kubernetes +idna==2.8 # via requests +ipaddress==1.0.22 # via kubernetes +jaraco.functools==2.0 # via tempora +jinja2==2.10.1 +jmespath==0.9.4 # via boto3, botocore +jsondiff==1.1.1 # via moto +jsonpickle==1.1 # via aws-xray-sdk +jsonschema==2.6.0 +junos-eznc==2.2.0 +jxmlease==1.0.1 +keyring==5.7.1 +kubernetes==3.0.0 +lxml==4.3.3 # via junos-eznc, ncclient +markupsafe==1.1.1 +mock==2.0.0 # via moto +more-itertools==5.0.0 +moto==1.3.7 +msgpack-python==0.5.6 +msgpack==0.6.1 +ncclient==0.6.4 # via junos-eznc +netaddr==0.7.19 # via junos-eznc +paramiko==2.1.2 +pbr==5.1.3 # via mock, pylxd +pluggy==0.11.0 # via pytest +portend==2.4 # via cherrypy +psutil==5.6.1 +py==1.8.0 # via pytest +pyaml==19.4.1 # via moto +pyasn1-modules==0.2.4 # via google-auth +pyasn1==0.4.5 # via paramiko, pyasn1-modules, rsa +pycparser==2.19 # via cffi +# Next line explicitly commented out by pip-tools-compile because of the following regex: '^pycrypto==(.*)$' +# pycrypto==2.6.1 ; sys_platform != "win32" +pycryptodome==3.8.1 +pygit2==0.28.1 +pyinotify==0.9.6 +pylxd==2.2.9 +pyopenssl==19.0.0 +pyserial==3.4 # via junos-eznc +pytest-helpers-namespace==2019.1.8 +pytest-salt-runtests-bridge==2019.1.30 +pytest-salt==2019.5.10.post1 +pytest-tempdir==2018.8.11 +pytest-timeout==1.3.3 +pytest==4.4.2 +python-dateutil==2.8.0 # via botocore, croniter, kubernetes, moto, pylxd +python-etcd==0.4.5 +python-gnupg==0.4.4 +python-jose==2.0.2 # via moto +pytz==2019.1 # via moto, tempora +pyvmomi==6.7.1.2018.12 +pyyaml==3.13 +pyzmq==18.0.1 ; python_version != "3.4" +requests-toolbelt==0.9.1 # via pylxd +requests-unixsocket==0.1.5 # via pylxd +requests==2.21.0 +responses==0.10.6 # via moto +rfc3987==1.3.8 +rsa==4.0 # via google-auth +s3transfer==0.2.0 # via boto3 +salttesting==2017.6.1 +scp==0.13.2 # via junos-eznc +setproctitle==1.1.10 +singledispatch==3.4.0.3 # via tornado +six==1.12.0 # via cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pygit2, pylxd, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, websocket-client +smmap2==2.0.5 # via gitdb2 +strict-rfc3339==0.7 +tempora==1.14.1 # via portend +timelib==0.2.4 +tornado==4.5.3 ; python_version >= "3.4" +urllib3==1.24.3 # via botocore, kubernetes, python-etcd, requests, requests-unixsocket +virtualenv==16.4.3 +websocket-client==0.40.0 # via docker, kubernetes +werkzeug==0.15.2 # via moto +wrapt==1.11.1 # via aws-xray-sdk +ws4py==0.5.1 # via pylxd +xmltodict==0.12.0 # via moto +yamlordereddictloader==0.4.0 +zc.lockfile==1.4 # via cherrypy From 08cfb16534115857dcb84f01fbd51e497b0d80bc Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Wed, 25 Sep 2019 08:00:28 -0600 Subject: [PATCH 05/44] add debian 10 tests --- .ci/kitchen-debian10-py3 | 155 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 .ci/kitchen-debian10-py3 diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 new file mode 100644 index 000000000000..75eb3d1d1d86 --- /dev/null +++ b/.ci/kitchen-debian10-py3 @@ -0,0 +1,155 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'debian' +def distro_version = '10' +def python_version = 'py3' +def test_transport = 'ZeroMQ' +def salt_target_branch = '2019.2.1' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '--ssh-tests' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + } + + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy From 2e3247e6e182504bf3666332a4500cf4c5192f38 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Wed, 25 Sep 2019 08:13:58 -0600 Subject: [PATCH 06/44] update salt_target_branch --- .ci/docs | 2 +- .ci/kitchen-amazon2-py2 | 2 +- .ci/kitchen-amazon2-py3 | 2 +- .ci/kitchen-centos6-py2 | 2 +- .ci/kitchen-centos7-py2 | 2 +- .ci/kitchen-centos7-py2-tcp | 2 +- .ci/kitchen-centos7-py3 | 2 +- .ci/kitchen-centos7-py3-tcp | 2 +- .ci/kitchen-debian10-py3 | 4 ++-- .ci/kitchen-debian8-py2 | 2 +- .ci/kitchen-debian8-py3 | 2 +- .ci/kitchen-debian9-py2 | 2 +- .ci/kitchen-debian9-py3 | 2 +- .ci/kitchen-fedora29-py2 | 2 +- .ci/kitchen-fedora29-py3 | 2 +- .ci/kitchen-ubuntu1604-py2 | 2 +- .ci/kitchen-ubuntu1604-py2-tcp | 2 +- .ci/kitchen-ubuntu1604-py3 | 2 +- .ci/kitchen-ubuntu1604-py3-tcp | 2 +- .ci/kitchen-ubuntu1804-py2 | 2 +- .ci/kitchen-ubuntu1804-py3 | 2 +- .ci/kitchen-windows2016-py2 | 2 +- .ci/kitchen-windows2016-py3 | 2 +- .ci/lint | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.ci/docs b/.ci/docs index c9aa337a04a7..2ff232deaa46 100644 --- a/.ci/docs +++ b/.ci/docs @@ -2,7 +2,7 @@ // Define the maximum time, in hours, that a test run should run for def global_timeout = 2 -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' properties([ buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index b866760bf791..ecb3d5c4ad40 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -10,7 +10,7 @@ def distro_name = 'amazon' def distro_version = '2' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index f45b0635ab5a..bd931c936475 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -10,7 +10,7 @@ def distro_name = 'amazon' def distro_version = '2' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 282694741cd5..6094516be068 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -10,7 +10,7 @@ def distro_name = 'centos' def distro_version = '6' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index 6d5dac0320c4..675f9c0688ad 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -10,7 +10,7 @@ def distro_name = 'centos' def distro_version = '7' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index cc9c58946a16..1954654f0ac1 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -10,7 +10,7 @@ def distro_name = 'centos' def distro_version = '7' def python_version = 'py2' def test_transport = 'TCP' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index 270fc7b2e74c..40ebf43b5797 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -10,7 +10,7 @@ def distro_name = 'centos' def distro_version = '7' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index a728e50ff600..67784be9e37d 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -10,7 +10,7 @@ def distro_name = 'centos' def distro_version = '7' def python_version = 'py3' def test_transport = 'TCP' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index 75eb3d1d1d86..655b07b0baae 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -10,8 +10,8 @@ def distro_name = 'debian' def distro_version = '10' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' -def golden_images_branch = '2019.2' +def salt_target_branch = 'master' +def golden_images_branch = 'neon' def nox_passthrough_opts = '--ssh-tests' properties([ diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index 06630bfa8d69..6f55b66d9c8f 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -10,7 +10,7 @@ def distro_name = 'debian' def distro_version = '8' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 3a426eb0147a..2de31675af4d 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -10,7 +10,7 @@ def distro_name = 'debian' def distro_version = '8' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index daa88954a4ce..bef00b737892 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -10,7 +10,7 @@ def distro_name = 'debian' def distro_version = '9' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index c11d2e1d6465..a06c671bf37c 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -10,7 +10,7 @@ def distro_name = 'debian' def distro_version = '9' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index 372a2856374a..0b6feb6ec488 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -10,7 +10,7 @@ def distro_name = 'fedora' def distro_version = '29' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index aee843d34ced..0e222ac5a839 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -10,7 +10,7 @@ def distro_name = 'fedora' def distro_version = '29' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 1aaa5f4ca631..cb6131a0745f 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -10,7 +10,7 @@ def distro_name = 'ubuntu' def distro_version = '1604' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index bf848c6346cc..6c00d52a4da1 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -10,7 +10,7 @@ def distro_name = 'ubuntu' def distro_version = '1604' def python_version = 'py2' def test_transport = 'TCP' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index 0f077f3aed99..fc7fa721857e 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -10,7 +10,7 @@ def distro_name = 'ubuntu' def distro_version = '1604' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index 38ad24d21c12..7e470dc7535b 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -10,7 +10,7 @@ def distro_name = 'ubuntu' def distro_version = '1604' def python_version = 'py3' def test_transport = 'TCP' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index 14171ea652dc..8918965f66b9 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -10,7 +10,7 @@ def distro_name = 'ubuntu' def distro_version = '1804' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 23743e53bebd..70e2562559e5 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -10,7 +10,7 @@ def distro_name = 'ubuntu' def distro_version = '1804' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' diff --git a/.ci/kitchen-windows2016-py2 b/.ci/kitchen-windows2016-py2 index a8f89e045454..801dc7542374 100644 --- a/.ci/kitchen-windows2016-py2 +++ b/.ci/kitchen-windows2016-py2 @@ -10,7 +10,7 @@ def distro_name = 'windows' def distro_version = '2016' def python_version = 'py2' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--unit' diff --git a/.ci/kitchen-windows2016-py3 b/.ci/kitchen-windows2016-py3 index 0ff3bc426866..db2998e66f00 100644 --- a/.ci/kitchen-windows2016-py3 +++ b/.ci/kitchen-windows2016-py3 @@ -10,7 +10,7 @@ def distro_name = 'windows' def distro_version = '2016' def python_version = 'py3' def test_transport = 'ZeroMQ' -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' def golden_images_branch = '2019.2' def nox_passthrough_opts = '--unit' diff --git a/.ci/lint b/.ci/lint index dee263e46ac2..4e02755c0b4e 100644 --- a/.ci/lint +++ b/.ci/lint @@ -2,7 +2,7 @@ // Define the maximum time, in hours, that a test run should run for def global_timeout = 3 -def salt_target_branch = '2019.2.1' +def salt_target_branch = 'master' properties([ buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), From 81fa73397a5dd307724673f4c5f996b1e0ff5ad8 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Wed, 25 Sep 2019 09:38:01 -0600 Subject: [PATCH 07/44] change to use multiple instance types with spot instances --- .ci/kitchen-amazon2-py2 | 2 +- .ci/kitchen-amazon2-py3 | 2 +- .ci/kitchen-centos6-py2 | 2 +- .ci/kitchen-centos7-py2 | 2 +- .ci/kitchen-centos7-py2-tcp | 2 +- .ci/kitchen-centos7-py3 | 2 +- .ci/kitchen-centos7-py3-tcp | 2 +- .ci/kitchen-debian10-py3 | 2 +- .ci/kitchen-debian8-py2 | 2 +- .ci/kitchen-debian8-py3 | 2 +- .ci/kitchen-debian9-py2 | 2 +- .ci/kitchen-debian9-py3 | 2 +- .ci/kitchen-fedora29-py2 | 2 +- .ci/kitchen-fedora29-py3 | 2 +- .ci/kitchen-ubuntu1604-py2 | 2 +- .ci/kitchen-ubuntu1604-py2-tcp | 2 +- .ci/kitchen-ubuntu1604-py3 | 2 +- .ci/kitchen-ubuntu1604-py3-tcp | 2 +- .ci/kitchen-ubuntu1804-py2 | 2 +- .ci/kitchen-ubuntu1804-py3 | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index ecb3d5c4ad40..d0a7f0faddd1 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index bd931c936475..c3d33fdadf0d 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 6094516be068..7629da944c00 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index 675f9c0688ad..43124fcf7534 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index 1954654f0ac1..4ee7068ddf4a 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index 40ebf43b5797..d05d2a5cc937 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index 67784be9e37d..09b3aea2a58f 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index 655b07b0baae..90d3b3728d14 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index 6f55b66d9c8f..c02913848684 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 2de31675af4d..84b512ebdea9 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index bef00b737892..8c2e3e31af0a 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index a06c671bf37c..2b4bdeefb351 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index 0b6feb6ec488..c1e8dbd7932e 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index 0e222ac5a839..218bd9f06ee3 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index cb6131a0745f..98f178ea11a2 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index 6c00d52a4da1..ad980b9f4a6f 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index fc7fa721857e..1be10246acb7 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index 7e470dc7535b..671994968042 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index 8918965f66b9..a98d42129570 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 70e2562559e5..afd57eedd8ab 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360" > .kitchen.local.yml + echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ From f8b093b385bf7101e18a7c0935d005f7bd723a8f Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Wed, 25 Sep 2019 15:21:31 -0600 Subject: [PATCH 08/44] change to spot config from jenkins-slave --- .ci/kitchen-amazon2-py2 | 2 +- .ci/kitchen-amazon2-py3 | 2 +- .ci/kitchen-centos6-py2 | 2 +- .ci/kitchen-centos7-py2 | 2 +- .ci/kitchen-centos7-py2-tcp | 2 +- .ci/kitchen-centos7-py3 | 2 +- .ci/kitchen-centos7-py3-tcp | 2 +- .ci/kitchen-debian10-py3 | 2 +- .ci/kitchen-debian8-py2 | 2 +- .ci/kitchen-debian8-py3 | 2 +- .ci/kitchen-debian9-py2 | 2 +- .ci/kitchen-debian9-py3 | 2 +- .ci/kitchen-fedora29-py2 | 2 +- .ci/kitchen-fedora29-py3 | 2 +- .ci/kitchen-ubuntu1604-py2 | 2 +- .ci/kitchen-ubuntu1604-py2-tcp | 2 +- .ci/kitchen-ubuntu1604-py3 | 2 +- .ci/kitchen-ubuntu1604-py3-tcp | 2 +- .ci/kitchen-ubuntu1804-py2 | 2 +- .ci/kitchen-ubuntu1804-py3 | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index d0a7f0faddd1..abf8efa2ab4e 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index c3d33fdadf0d..58030515d88b 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 7629da944c00..9c2cf06cc1a0 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index 43124fcf7534..826729e0c48f 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index 4ee7068ddf4a..6904a47cb252 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index d05d2a5cc937..ec6b0f05d8ed 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index 09b3aea2a58f..aec59604872a 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index 90d3b3728d14..3026ad391af2 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index c02913848684..b6fc76c516d1 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 84b512ebdea9..ba5659cb3fc4 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index 8c2e3e31af0a..83eca1f20222 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 2b4bdeefb351..9037a6ad57ea 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index c1e8dbd7932e..b6242de7df38 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index 218bd9f06ee3..51e6bbb591ef 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 98f178ea11a2..31c24e08c935 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index ad980b9f4a6f..9afc302ee997 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index 1be10246acb7..560c077771bb 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index 671994968042..99d29712f5f3 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index a98d42129570..93be41fef53f 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index afd57eedd8ab..3358162f1286 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -65,7 +65,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { retry(3) { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - echo -e "driver:\n spot_price: on-demand\n block_duration_minutes: 360\n instance_type:\n - m5.large\n - c5.xlarge\n - m4.large\n - c4.xlarge" > .kitchen.local.yml + cp -f ~/workspace/spot.yml .kitchen.local.yml bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ From 1881f0e43cccbf368f8143fadd186476d547db39 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Wed, 25 Sep 2019 21:53:08 -0600 Subject: [PATCH 09/44] reduce timeout for linux to 5 hours --- .ci/kitchen-amazon2-py2 | 2 +- .ci/kitchen-amazon2-py3 | 2 +- .ci/kitchen-centos6-py2 | 2 +- .ci/kitchen-centos7-py2 | 2 +- .ci/kitchen-centos7-py2-tcp | 2 +- .ci/kitchen-centos7-py3 | 2 +- .ci/kitchen-centos7-py3-tcp | 2 +- .ci/kitchen-debian10-py3 | 2 +- .ci/kitchen-debian8-py2 | 2 +- .ci/kitchen-debian8-py3 | 2 +- .ci/kitchen-debian9-py2 | 2 +- .ci/kitchen-debian9-py3 | 2 +- .ci/kitchen-fedora29-py2 | 2 +- .ci/kitchen-fedora29-py3 | 2 +- .ci/kitchen-ubuntu1604-py2 | 2 +- .ci/kitchen-ubuntu1604-py2-tcp | 2 +- .ci/kitchen-ubuntu1604-py3 | 2 +- .ci/kitchen-ubuntu1604-py3-tcp | 2 +- .ci/kitchen-ubuntu1804-py2 | 2 +- .ci/kitchen-ubuntu1804-py3 | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index abf8efa2ab4e..301bdf5fa6db 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index 58030515d88b..ec75fc8b16cf 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 9c2cf06cc1a0..03eee818617f 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index 826729e0c48f..2467ea4ac945 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index 6904a47cb252..401fab20d124 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index ec6b0f05d8ed..fa3e1be0986b 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index aec59604872a..34d67d1f5ce9 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index 3026ad391af2..8df2bed9e6f3 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index b6fc76c516d1..dcfa947eba17 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index ba5659cb3fc4..3eb551cfcc83 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index 83eca1f20222..32dca79fbc40 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 9037a6ad57ea..9c917d0d70cf 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index b6242de7df38..df07ed773004 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index 51e6bbb591ef..a50bf25fa248 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 31c24e08c935..bd0509603ca6 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index 9afc302ee997..c83d28b7a43a 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index 560c077771bb..f604ade51213 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index 99d29712f5f3..13e825f1e7fc 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index 93be41fef53f..bc49ac8169d0 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 3358162f1286..862b066db3d3 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 6 +def testrun_timeout = 5 // 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; From 6d7ab3ebf21bbea664b1e2d242046f56dff11bf7 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 10:26:53 -0600 Subject: [PATCH 10/44] print ami id and instance type during test run --- .ci/kitchen-amazon2-py2 | 3 +++ .ci/kitchen-amazon2-py3 | 3 +++ .ci/kitchen-centos6-py2 | 3 +++ .ci/kitchen-centos7-py2 | 3 +++ .ci/kitchen-centos7-py2-tcp | 3 +++ .ci/kitchen-centos7-py3 | 3 +++ .ci/kitchen-centos7-py3-tcp | 3 +++ .ci/kitchen-debian10-py3 | 3 +++ .ci/kitchen-debian8-py2 | 3 +++ .ci/kitchen-debian8-py3 | 3 +++ .ci/kitchen-debian9-py2 | 3 +++ .ci/kitchen-debian9-py3 | 3 +++ .ci/kitchen-fedora29-py2 | 3 +++ .ci/kitchen-fedora29-py3 | 3 +++ .ci/kitchen-ubuntu1604-py2 | 3 +++ .ci/kitchen-ubuntu1604-py2-tcp | 3 +++ .ci/kitchen-ubuntu1604-py3 | 3 +++ .ci/kitchen-ubuntu1604-py3-tcp | 3 +++ .ci/kitchen-ubuntu1804-py2 | 3 +++ .ci/kitchen-ubuntu1804-py3 | 3 +++ .ci/kitchen-windows2016-py2 | 3 +++ .ci/kitchen-windows2016-py3 | 3 +++ 22 files changed, 66 insertions(+) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index 301bdf5fa6db..7bed35d3745b 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index ec75fc8b16cf..a421a5064220 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 03eee818617f..7e88ac56c689 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index 2467ea4ac945..e191795911e6 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index 401fab20d124..5f795a45d233 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index fa3e1be0986b..57ecb697d510 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index 34d67d1f5ce9..5a2c679c5567 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index 8df2bed9e6f3..e3edc2e85711 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index dcfa947eba17..3bbd1be0df3a 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 3eb551cfcc83..08108aa515b3 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index 32dca79fbc40..4c7cf66e444a 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 9c917d0d70cf..24a7725bb94a 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index df07ed773004..05fc0d9ca4f4 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index a50bf25fa248..462c9a14ea16 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index bd0509603ca6..a3725a2f276b 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index c83d28b7a43a..8583530a16b0 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index f604ade51213..619de3e9aab8 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index 13e825f1e7fc..abdb745a4665 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index bc49ac8169d0..60771d51577a 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 862b066db3d3..c4eb5bb59079 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -77,6 +77,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-windows2016-py2 b/.ci/kitchen-windows2016-py2 index 801dc7542374..184c57b7669f 100644 --- a/.ci/kitchen-windows2016-py2 +++ b/.ci/kitchen-windows2016-py2 @@ -76,6 +76,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { diff --git a/.ci/kitchen-windows2016-py3 b/.ci/kitchen-windows2016-py3 index db2998e66f00..1493b56dcb25 100644 --- a/.ci/kitchen-windows2016-py3 +++ b/.ci/kitchen-windows2016-py3 @@ -76,6 +76,9 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { fi """ } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + ''' } try { From 26439b25ba5a932f7b8c86d189ee173275b2f833 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 13:26:04 -0600 Subject: [PATCH 11/44] increase timeout for daemon startup --- tests/integration/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 415531028822..187857ad8ab8 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -296,7 +296,7 @@ def start_zeromq_daemons(self): daemon_class=SaltMaster, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) @@ -333,7 +333,7 @@ def start_zeromq_daemons(self): daemon_class=SaltMinion, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) @@ -370,7 +370,7 @@ def start_zeromq_daemons(self): daemon_class=SaltMinion, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) @@ -408,7 +408,7 @@ def start_zeromq_daemons(self): daemon_class=SaltMaster, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) @@ -445,7 +445,7 @@ def start_zeromq_daemons(self): daemon_class=SaltSyndic, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) @@ -484,7 +484,7 @@ def start_zeromq_daemons(self): daemon_class=SaltProxy, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) From 8e0d3cb50b56ea529a299331e267977f8249e6ec Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 13:59:31 -0600 Subject: [PATCH 12/44] improve printing ami id and instance type --- .ci/kitchen-amazon2-py2 | 3 ++- .ci/kitchen-amazon2-py3 | 3 ++- .ci/kitchen-centos6-py2 | 3 ++- .ci/kitchen-centos7-py2 | 3 ++- .ci/kitchen-centos7-py2-tcp | 3 ++- .ci/kitchen-centos7-py3 | 3 ++- .ci/kitchen-centos7-py3-tcp | 3 ++- .ci/kitchen-debian10-py3 | 3 ++- .ci/kitchen-debian8-py2 | 3 ++- .ci/kitchen-debian8-py3 | 3 ++- .ci/kitchen-debian9-py2 | 3 ++- .ci/kitchen-debian9-py3 | 3 ++- .ci/kitchen-fedora29-py2 | 3 ++- .ci/kitchen-fedora29-py3 | 3 ++- .ci/kitchen-ubuntu1604-py2 | 3 ++- .ci/kitchen-ubuntu1604-py2-tcp | 3 ++- .ci/kitchen-ubuntu1604-py3 | 3 ++- .ci/kitchen-ubuntu1604-py3-tcp | 3 ++- .ci/kitchen-ubuntu1804-py2 | 3 ++- .ci/kitchen-ubuntu1804-py3 | 3 ++- .ci/kitchen-windows2016-py2 | 3 ++- .ci/kitchen-windows2016-py3 | 3 ++- 22 files changed, 44 insertions(+), 22 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index 7bed35d3745b..a0f14152afd3 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index a421a5064220..82dba9acb48d 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 7e88ac56c689..2d54b64f7d01 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index e191795911e6..deec3630079e 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index 5f795a45d233..5f7ffd9dc176 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index 57ecb697d510..27c24b65905e 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index 5a2c679c5567..9fca47a08c24 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index e3edc2e85711..6d376540c12d 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index 3bbd1be0df3a..006416f6855e 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 08108aa515b3..e5880f72d72e 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index 4c7cf66e444a..f604e9f92aa1 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 24a7725bb94a..bbb43316ab99 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index 05fc0d9ca4f4..6710c338b8ea 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index 462c9a14ea16..bc418ea3affa 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index a3725a2f276b..97798122ad87 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index 8583530a16b0..816afea53651 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index 619de3e9aab8..a825f58be49d 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index abdb745a4665..c827b7f77ba5 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index 60771d51577a..b0fa69a426da 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index c4eb5bb59079..1f517105d159 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -78,7 +78,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-windows2016-py2 b/.ci/kitchen-windows2016-py2 index 184c57b7669f..b5fece38623c 100644 --- a/.ci/kitchen-windows2016-py2 +++ b/.ci/kitchen-windows2016-py2 @@ -77,7 +77,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } diff --git a/.ci/kitchen-windows2016-py3 b/.ci/kitchen-windows2016-py3 index 1493b56dcb25..c6737de0974c 100644 --- a/.ci/kitchen-windows2016-py3 +++ b/.ci/kitchen-windows2016-py3 @@ -77,7 +77,8 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { """ } sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type: \\|image_id: ' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 ''' } From f341b599ebd5ef0681d938b83ebeb3cd7a83dbd2 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 15:29:56 -0600 Subject: [PATCH 13/44] change debian 10 to using 2019.2 golden images --- .ci/kitchen-debian10-py3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index 6d376540c12d..f0e6bd6caa8d 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -11,7 +11,7 @@ def distro_version = '10' def python_version = 'py3' def test_transport = 'ZeroMQ' def salt_target_branch = 'master' -def golden_images_branch = 'neon' +def golden_images_branch = '2019.2' def nox_passthrough_opts = '--ssh-tests' properties([ From 8fe38ce861fe93a44f519f1401be477164f22041 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 16:56:03 -0600 Subject: [PATCH 14/44] improve lint job --- .ci/lint | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.ci/lint b/.ci/lint index 4e02755c0b4e..fd61de5b8814 100644 --- a/.ci/lint +++ b/.ci/lint @@ -46,9 +46,10 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') { eval "$(pyenv init -)" pyenv --version pyenv install --skip-existing 2.7.15 - pyenv shell 2.7.15 + pyenv install --skip-existing 3.6.8 + pyenv shell 3.6.8 2.7.15 python --version - pip install -U nox-py2 + pip3 install -U nox-py2 nox --version # Create the required virtualenvs in serial nox --install-only -e lint-salt @@ -69,7 +70,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') { 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 + pyenv shell 3.6.8 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 -- @@ -80,7 +81,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') { // Always lint something so reporting doesn't fail sh shell_header + ''' eval "$(pyenv init - --no-rehash)" - pyenv shell 2.7.15 + pyenv shell 3.6.8 2.7.15 EC=254 export PYLINT_REPORT=pylint-report-salt-chg.log nox -e lint-salt -- salt/ext/__init__.py @@ -95,7 +96,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') { if (readFile('file-list-changed.log') =~ /(?i)(^|\n)tests\/.*\.py\n/) { sh shell_header + ''' eval "$(pyenv init - --no-rehash)" - pyenv shell 2.7.15 + pyenv shell 3.6.8 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 -- @@ -128,7 +129,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') { stage('Lint Salt Full') { sh shell_header + ''' eval "$(pyenv init - --no-rehash)" - pyenv shell 2.7.15 + pyenv shell 3.6.8 2.7.15 EC=254 export PYLINT_REPORT=pylint-report-salt-full.log nox -e lint-salt @@ -141,7 +142,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') { stage('Lint Tests Full') { sh shell_header + ''' eval "$(pyenv init - --no-rehash)" - pyenv shell 2.7.15 + pyenv shell 3.6.8 2.7.15 EC=254 export PYLINT_REPORT=pylint-report-tests-full.log nox -e lint-salt From b73281fcc4d190e45580ffa527998ee2ddae25d4 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 17:43:16 -0600 Subject: [PATCH 15/44] update path's to be correct --- .ci/kitchen-amazon2-py2 | 2 +- .ci/kitchen-amazon2-py3 | 2 +- .ci/kitchen-centos6-py2 | 2 +- .ci/kitchen-centos7-py2 | 2 +- .ci/kitchen-centos7-py2-tcp | 2 +- .ci/kitchen-centos7-py3 | 2 +- .ci/kitchen-centos7-py3-tcp | 2 +- .ci/kitchen-debian10-py3 | 2 +- .ci/kitchen-debian8-py2 | 2 +- .ci/kitchen-debian8-py3 | 2 +- .ci/kitchen-debian9-py2 | 2 +- .ci/kitchen-debian9-py3 | 2 +- .ci/kitchen-fedora29-py2 | 2 +- .ci/kitchen-fedora29-py3 | 2 +- .ci/kitchen-ubuntu1604-py2 | 2 +- .ci/kitchen-ubuntu1604-py2-tcp | 2 +- .ci/kitchen-ubuntu1604-py3 | 2 +- .ci/kitchen-ubuntu1604-py3-tcp | 2 +- .ci/kitchen-ubuntu1804-py2 | 2 +- .ci/kitchen-ubuntu1804-py3 | 2 +- .ci/kitchen-windows2016-py2 | 2 +- .ci/kitchen-windows2016-py3 | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index a0f14152afd3..99cbea79e50e 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index 82dba9acb48d..f7841eb08370 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 2d54b64f7d01..6dfb6ac16e6e 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index deec3630079e..d3901f367537 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index 5f7ffd9dc176..c92ca63db53e 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index 27c24b65905e..052d265a907d 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index 9fca47a08c24..ce784d2682f5 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index f0e6bd6caa8d..df617c69415a 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index 006416f6855e..e9585d32ad70 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index e5880f72d72e..2654f22d078d 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index f604e9f92aa1..a016d100c312 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index bbb43316ab99..00da170ea800 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index 6710c338b8ea..94fa2b9fcb43 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index bc418ea3affa..cceed326af29 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 97798122ad87..634585d8f5bc 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index 816afea53651..ca9117e8781f 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index a825f58be49d..f74fed52a284 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index c827b7f77ba5..40e3c1d16eb4 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index b0fa69a426da..d4254ecb4d67 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 1f517105d159..a2ba3f147bc0 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-windows2016-py2 b/.ci/kitchen-windows2016-py2 index b5fece38623c..9d3c1a258451 100644 --- a/.ci/kitchen-windows2016-py2 +++ b/.ci/kitchen-windows2016-py2 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", diff --git a/.ci/kitchen-windows2016-py3 b/.ci/kitchen-windows2016-py3 index c6737de0974c..8cd0f6fa5659 100644 --- a/.ci/kitchen-windows2016-py3 +++ b/.ci/kitchen-windows2016-py3 @@ -42,7 +42,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { "SALT_TARGET_BRANCH=${salt_target_branch}", "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'RBENV_VERSION=2.6.3', "TEST_SUITE=${python_version}", "TEST_PLATFORM=${distro_name}-${distro_version}", From c1ff1d4656ec6d5d3bf2765cb009d4d29a70e3ab Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 18:12:43 -0600 Subject: [PATCH 16/44] add windows 2019 tests --- .ci/kitchen-windows2019-py2 | 158 ++++++++++++++++++++++++++++++++++++ .ci/kitchen-windows2019-py3 | 158 ++++++++++++++++++++++++++++++++++++ 2 files changed, 316 insertions(+) create mode 100644 .ci/kitchen-windows2019-py2 create mode 100644 .ci/kitchen-windows2019-py3 diff --git a/.ci/kitchen-windows2019-py2 b/.ci/kitchen-windows2019-py2 new file mode 100644 index 000000000000..1337d7e81aad --- /dev/null +++ b/.ci/kitchen-windows2019-py2 @@ -0,0 +1,158 @@ +@Library('salt@1.1') _ + +// Define the maximum time, in hours, that a test run should run for +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; + +def distro_name = 'windows' +def distro_version = '2019' +def python_version = 'py2' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '--unit' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy diff --git a/.ci/kitchen-windows2019-py3 b/.ci/kitchen-windows2019-py3 new file mode 100644 index 000000000000..1327620ddfd0 --- /dev/null +++ b/.ci/kitchen-windows2019-py3 @@ -0,0 +1,158 @@ +@Library('salt@1.1') _ + +// Define the maximum time, in hours, that a test run should run for +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; + +def distro_name = 'windows' +def distro_version = '2019' +def python_version = 'py3' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '--unit' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout, unit: 'HOURS') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy From 186a8f6fdf32ff075c8a715b68fc83cc9de8ef32 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 23:41:38 -0600 Subject: [PATCH 17/44] Revert "reduce timeout for linux to 5 hours" This reverts commit 95b3d9f90e73e7b77568850af82f27b93fb99e34. --- .ci/kitchen-amazon2-py2 | 2 +- .ci/kitchen-amazon2-py3 | 2 +- .ci/kitchen-centos6-py2 | 2 +- .ci/kitchen-centos7-py2 | 2 +- .ci/kitchen-centos7-py2-tcp | 2 +- .ci/kitchen-centos7-py3 | 2 +- .ci/kitchen-centos7-py3-tcp | 2 +- .ci/kitchen-debian10-py3 | 2 +- .ci/kitchen-debian8-py2 | 2 +- .ci/kitchen-debian8-py3 | 2 +- .ci/kitchen-debian9-py2 | 2 +- .ci/kitchen-debian9-py3 | 2 +- .ci/kitchen-fedora29-py2 | 2 +- .ci/kitchen-fedora29-py3 | 2 +- .ci/kitchen-ubuntu1604-py2 | 2 +- .ci/kitchen-ubuntu1604-py2-tcp | 2 +- .ci/kitchen-ubuntu1604-py3 | 2 +- .ci/kitchen-ubuntu1604-py3-tcp | 2 +- .ci/kitchen-ubuntu1804-py2 | 2 +- .ci/kitchen-ubuntu1804-py3 | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index 99cbea79e50e..fe7e02aca9b0 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index f7841eb08370..9f1fb00ac4f4 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 6dfb6ac16e6e..279e8a78c70c 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index d3901f367537..79375be59580 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index c92ca63db53e..096c359201cb 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index 052d265a907d..111f37e5969d 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index ce784d2682f5..3c96e6beb0ae 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index df617c69415a..a3184233da07 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index e9585d32ad70..b0379c1946be 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 2654f22d078d..63ff18116fbf 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index a016d100c312..797b6ddeb6cf 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 00da170ea800..8517406c1fa1 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index 94fa2b9fcb43..8736b15ee2c6 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index cceed326af29..66937d13182e 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 634585d8f5bc..a91245840bab 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index ca9117e8781f..5ba37b761d75 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index f74fed52a284..599c25296f59 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index 40e3c1d16eb4..c0d8f61d804e 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index d4254ecb4d67..3bdbfe0e7461 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index a2ba3f147bc0..171e792a3521 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -1,7 +1,7 @@ @Library('salt@1.1') _ // Define the maximum time, in hours, that a test run should run for -def testrun_timeout = 5 +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. def global_timeout = testrun_timeout + 1; From 07c9bb6e2913863ceb9237a195c5aa258aa51495 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 23:44:45 -0600 Subject: [PATCH 18/44] extend timeout to 5:45 --- .ci/kitchen-amazon2-py2 | 2 +- .ci/kitchen-amazon2-py3 | 2 +- .ci/kitchen-centos6-py2 | 2 +- .ci/kitchen-centos7-py2 | 2 +- .ci/kitchen-centos7-py2-tcp | 2 +- .ci/kitchen-centos7-py3 | 2 +- .ci/kitchen-centos7-py3-tcp | 2 +- .ci/kitchen-debian10-py3 | 2 +- .ci/kitchen-debian8-py2 | 2 +- .ci/kitchen-debian8-py3 | 2 +- .ci/kitchen-debian9-py2 | 2 +- .ci/kitchen-debian9-py3 | 2 +- .ci/kitchen-fedora29-py2 | 2 +- .ci/kitchen-fedora29-py3 | 2 +- .ci/kitchen-ubuntu1604-py2 | 2 +- .ci/kitchen-ubuntu1604-py2-tcp | 2 +- .ci/kitchen-ubuntu1604-py3 | 2 +- .ci/kitchen-ubuntu1604-py3-tcp | 2 +- .ci/kitchen-ubuntu1804-py2 | 2 +- .ci/kitchen-ubuntu1804-py3 | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index fe7e02aca9b0..c10a8d2c7a37 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index 9f1fb00ac4f4..54565eab2e75 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 279e8a78c70c..320036ea4065 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index 79375be59580..816c227e3917 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index 096c359201cb..99ea123ea552 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index 111f37e5969d..02a9a2b62fac 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index 3c96e6beb0ae..987466cf8648 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index a3184233da07..9fc619ee1587 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index b0379c1946be..b9c01d15aaf4 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 63ff18116fbf..471692ac798d 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index 797b6ddeb6cf..f8c5a2785ae1 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 8517406c1fa1..2ff32bb99f7d 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index 8736b15ee2c6..b0585f7fda45 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index 66937d13182e..8609e21c3f14 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index a91245840bab..890e4b63b781 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index 5ba37b761d75..fa4582390731 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index 599c25296f59..416009b96da7 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index c0d8f61d804e..ea378c749ae3 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index 3bdbfe0e7461..00f3e62b0e1f 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 171e792a3521..0feac72ee4c6 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -84,7 +84,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { } try { - timeout(time: testrun_timeout, unit: 'HOURS') { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { stage('Converge VM') { sh ''' ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' From 9e8e852e4802769c146978f73ed98aa87d1c4b41 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Thu, 26 Sep 2019 23:51:26 -0600 Subject: [PATCH 19/44] fix docs capitalization --- doc/ref/cache/all/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ref/cache/all/index.rst b/doc/ref/cache/all/index.rst index 8a9689909d62..91bd79cf82bc 100644 --- a/doc/ref/cache/all/index.rst +++ b/doc/ref/cache/all/index.rst @@ -1,7 +1,7 @@ .. _all-salt.cache: ============= -Cache Modules +cache modules ============= .. currentmodule:: salt.cache From 2992b359686deb5b19d3091b38939774b991e5f8 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Fri, 27 Sep 2019 10:12:12 -0600 Subject: [PATCH 20/44] increase timeout for multi-master daemon startup --- tests/multimaster/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/multimaster/__init__.py b/tests/multimaster/__init__.py index 205b422030ca..9bed204f4f59 100644 --- a/tests/multimaster/__init__.py +++ b/tests/multimaster/__init__.py @@ -191,7 +191,7 @@ def start_zeromq_daemons(self): daemon_class=SaltMaster, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) @@ -235,7 +235,7 @@ def start_zeromq_daemons(self): daemon_class=SaltMaster, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) @@ -272,7 +272,7 @@ def start_zeromq_daemons(self): daemon_class=SaltMinion, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) @@ -309,7 +309,7 @@ def start_zeromq_daemons(self): daemon_class=SaltMinion, bin_dir_path=SCRIPT_DIR, fail_hard=True, - start_timeout=60) + start_timeout=120) sys.stdout.write( '\r{0}\r'.format( ' ' * getattr(self.parser.options, 'output_columns', PNUM) From 0f8df2993967b03dc49c1890f851fa7ba9aef0b6 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Fri, 27 Sep 2019 15:56:31 -0600 Subject: [PATCH 21/44] do kitchen destroy if spot instance allocation fails --- .ci/kitchen-amazon2-py2 | 2 +- .ci/kitchen-amazon2-py3 | 2 +- .ci/kitchen-centos6-py2 | 2 +- .ci/kitchen-centos7-py2 | 2 +- .ci/kitchen-centos7-py2-tcp | 2 +- .ci/kitchen-centos7-py3 | 2 +- .ci/kitchen-centos7-py3-tcp | 2 +- .ci/kitchen-debian10-py3 | 2 +- .ci/kitchen-debian8-py2 | 2 +- .ci/kitchen-debian8-py3 | 2 +- .ci/kitchen-debian9-py2 | 2 +- .ci/kitchen-debian9-py3 | 2 +- .ci/kitchen-fedora29-py2 | 2 +- .ci/kitchen-fedora29-py3 | 2 +- .ci/kitchen-ubuntu1604-py2 | 2 +- .ci/kitchen-ubuntu1604-py2-tcp | 2 +- .ci/kitchen-ubuntu1604-py3 | 2 +- .ci/kitchen-ubuntu1604-py3-tcp | 2 +- .ci/kitchen-ubuntu1804-py2 | 2 +- .ci/kitchen-ubuntu1804-py3 | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.ci/kitchen-amazon2-py2 b/.ci/kitchen-amazon2-py2 index c10a8d2c7a37..f8c027486983 100644 --- a/.ci/kitchen-amazon2-py2 +++ b/.ci/kitchen-amazon2-py2 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-amazon2-py3 b/.ci/kitchen-amazon2-py3 index 54565eab2e75..159e1dda1f7d 100644 --- a/.ci/kitchen-amazon2-py3 +++ b/.ci/kitchen-amazon2-py3 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index 320036ea4065..f217666ebf95 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index 816c227e3917..f980e3ce5999 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos7-py2-tcp b/.ci/kitchen-centos7-py2-tcp index 99ea123ea552..3f9265520c68 100644 --- a/.ci/kitchen-centos7-py2-tcp +++ b/.ci/kitchen-centos7-py2-tcp @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index 02a9a2b62fac..b004d61172a6 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-centos7-py3-tcp b/.ci/kitchen-centos7-py3-tcp index 987466cf8648..3b7339c2aedd 100644 --- a/.ci/kitchen-centos7-py3-tcp +++ b/.ci/kitchen-centos7-py3-tcp @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian10-py3 b/.ci/kitchen-debian10-py3 index 9fc619ee1587..1a00e06f92dc 100644 --- a/.ci/kitchen-debian10-py3 +++ b/.ci/kitchen-debian10-py3 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index b9c01d15aaf4..89b7f0af6c14 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index 471692ac798d..e854de837f58 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index f8c5a2785ae1..1b4c37acb1ce 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 2ff32bb99f7d..023ede4aae7a 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-fedora29-py2 b/.ci/kitchen-fedora29-py2 index b0585f7fda45..19bb3bc5ebca 100644 --- a/.ci/kitchen-fedora29-py2 +++ b/.ci/kitchen-fedora29-py2 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-fedora29-py3 b/.ci/kitchen-fedora29-py3 index 8609e21c3f14..99b881dc3358 100644 --- a/.ci/kitchen-fedora29-py3 +++ b/.ci/kitchen-fedora29-py3 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 890e4b63b781..9de36a87ed6b 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1604-py2-tcp b/.ci/kitchen-ubuntu1604-py2-tcp index fa4582390731..2d27d04fb533 100644 --- a/.ci/kitchen-ubuntu1604-py2-tcp +++ b/.ci/kitchen-ubuntu1604-py2-tcp @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index 416009b96da7..2aae4c26f599 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1604-py3-tcp b/.ci/kitchen-ubuntu1604-py3-tcp index ea378c749ae3..47a150ac4f32 100644 --- a/.ci/kitchen-ubuntu1604-py3-tcp +++ b/.ci/kitchen-ubuntu1604-py3-tcp @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index 00f3e62b0e1f..270bebc1c330 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 0feac72ee4c6..4a6bf582b44c 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -66,7 +66,7 @@ wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { sh ''' t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; ''' sh """ if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then From 148c41075bd6788e0ba9d152a895431a1a06117d Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Fri, 27 Sep 2019 15:56:54 -0600 Subject: [PATCH 22/44] add fedora-30 --- .ci/kitchen-fedora30-py2 | 159 +++++++++++++++++++++++++++++++++++++++ .ci/kitchen-fedora30-py3 | 159 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 318 insertions(+) create mode 100644 .ci/kitchen-fedora30-py2 create mode 100644 .ci/kitchen-fedora30-py3 diff --git a/.ci/kitchen-fedora30-py2 b/.ci/kitchen-fedora30-py2 new file mode 100644 index 000000000000..3f45aa3c802c --- /dev/null +++ b/.ci/kitchen-fedora30-py2 @@ -0,0 +1,159 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'fedora' +def distro_version = '30' +def python_version = 'py2' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '--ssh-tests' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + cp -f ~/workspace/spot.yml .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy diff --git a/.ci/kitchen-fedora30-py3 b/.ci/kitchen-fedora30-py3 new file mode 100644 index 000000000000..194020b69113 --- /dev/null +++ b/.ci/kitchen-fedora30-py3 @@ -0,0 +1,159 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'fedora' +def distro_version = '30' +def python_version = 'py3' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '--ssh-tests' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + cp -f ~/workspace/spot.yml .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy From 3d474e8847185d73877162abe450ce1bc0ce4696 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Mon, 30 Sep 2019 09:33:07 -0600 Subject: [PATCH 23/44] add opensuse-15 --- .ci/kitchen-opensuse15-py2 | 159 +++++++++++++++++++++++++++++++++++++ .ci/kitchen-opensuse15-py3 | 159 +++++++++++++++++++++++++++++++++++++ 2 files changed, 318 insertions(+) create mode 100644 .ci/kitchen-opensuse15-py2 create mode 100644 .ci/kitchen-opensuse15-py3 diff --git a/.ci/kitchen-opensuse15-py2 b/.ci/kitchen-opensuse15-py2 new file mode 100644 index 000000000000..88cef5f6b423 --- /dev/null +++ b/.ci/kitchen-opensuse15-py2 @@ -0,0 +1,159 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'opensuse' +def distro_version = '15' +def python_version = 'py2' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '--ssh-tests' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + cp -f ~/workspace/spot.yml .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy diff --git a/.ci/kitchen-opensuse15-py3 b/.ci/kitchen-opensuse15-py3 new file mode 100644 index 000000000000..84ff66f05c15 --- /dev/null +++ b/.ci/kitchen-opensuse15-py3 @@ -0,0 +1,159 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'opensuse' +def distro_version = '15' +def python_version = 'py3' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '--ssh-tests' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + cp -f ~/workspace/spot.yml .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy From aefee242f200fb0f4f64aaa34b2ed0c65aa6c7d1 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Mon, 30 Sep 2019 09:48:00 -0600 Subject: [PATCH 24/44] add amazon1 and arch --- .ci/kitchen-amazon1-py2 | 159 ++++++++++++++++++++++++++++++++++++++++ .ci/kitchen-archlts-py2 | 159 ++++++++++++++++++++++++++++++++++++++++ .ci/kitchen-archlts-py3 | 159 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 477 insertions(+) create mode 100644 .ci/kitchen-amazon1-py2 create mode 100644 .ci/kitchen-archlts-py2 create mode 100644 .ci/kitchen-archlts-py3 diff --git a/.ci/kitchen-amazon1-py2 b/.ci/kitchen-amazon1-py2 new file mode 100644 index 000000000000..143cf13db11f --- /dev/null +++ b/.ci/kitchen-amazon1-py2 @@ -0,0 +1,159 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'amazon' +def distro_version = '1' +def python_version = 'py2' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '--ssh-tests' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + cp -f ~/workspace/spot.yml .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy diff --git a/.ci/kitchen-archlts-py2 b/.ci/kitchen-archlts-py2 new file mode 100644 index 000000000000..7aa8f99518fd --- /dev/null +++ b/.ci/kitchen-archlts-py2 @@ -0,0 +1,159 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'arch' +def distro_version = 'lts' +def python_version = 'py2' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '-n integration.modules.test_pkg' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + cp -f ~/workspace/spot.yml .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy diff --git a/.ci/kitchen-archlts-py3 b/.ci/kitchen-archlts-py3 new file mode 100644 index 000000000000..551dfc271430 --- /dev/null +++ b/.ci/kitchen-archlts-py3 @@ -0,0 +1,159 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'arch' +def distro_version = 'lts' +def python_version = 'py3' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '-n integration.modules.test_pkg' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + + +wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { + withEnv([ + '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', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + // Checkout the repo + stage('Clone') { + 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' + } + + stage('Create VM') { + retry(3) { + sh ''' + t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t + cp -f ~/workspace/spot.yml .kitchen.local.yml + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + sh ''' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' + bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 + ''' + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + stage('Download Artefacts') { + withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ + sh ''' + bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 + ''' + } + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" + fi + """ + } + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy From 94cdcfde020eeb89c49e67f1ef006b082a464c30 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Tue, 1 Oct 2019 09:56:37 -0600 Subject: [PATCH 25/44] Changed the default installed package for zypper --- tests/integration/states/test_pkg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/states/test_pkg.py b/tests/integration/states/test_pkg.py index a0923235b208..499c8eb8355e 100644 --- a/tests/integration/states/test_pkg.py +++ b/tests/integration/states/test_pkg.py @@ -69,6 +69,7 @@ _PKG_DOT_TARGETS.append('tomcat-el-2.2-api') _PKG_EPOCH_TARGETS.append('comps-extras') elif 'sles' in pre_grains.like(): + _PKG_TARGETS = ['figlet', 'htop'] _PKG_CAP_TARGETS.append(('perl(ZNC)', 'znc-perl')) From 012c639713776fae82bad8781989541ba5f869e7 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Tue, 1 Oct 2019 13:09:13 -0600 Subject: [PATCH 26/44] fixed suse and arch detection for pkg tests --- tests/integration/states/test_pkg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/states/test_pkg.py b/tests/integration/states/test_pkg.py index 499c8eb8355e..3b66d807cb52 100644 --- a/tests/integration/states/test_pkg.py +++ b/tests/integration/states/test_pkg.py @@ -47,7 +47,7 @@ if salt.utils.platform.is_windows(): _PKG_TARGETS = ['7zip', 'putty'] if pre_grains: - if 'arch' in pre_grains.like(): + if any(arch in pre_grains.like() for arch in ('arch', 'archlinux')): _WILDCARDS_SUPPORTED = True elif 'debian' in pre_grains.like(): _WILDCARDS_SUPPORTED = True @@ -68,7 +68,7 @@ elif pre_grains.major_version() == 7: _PKG_DOT_TARGETS.append('tomcat-el-2.2-api') _PKG_EPOCH_TARGETS.append('comps-extras') - elif 'sles' in pre_grains.like(): + elif any(suse in pre_grains.like() for suse in ('sles', 'opensuse')): _PKG_TARGETS = ['figlet', 'htop'] _PKG_CAP_TARGETS.append(('perl(ZNC)', 'znc-perl')) From d103893dfd1d2b45b4b5b927e415a5dffcd9f99d Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Tue, 1 Oct 2019 14:10:38 -0600 Subject: [PATCH 27/44] add mac jobs to prs --- .ci/kitchen-macosxmojave-py3 | 146 +++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 .ci/kitchen-macosxmojave-py3 diff --git a/.ci/kitchen-macosxmojave-py3 b/.ci/kitchen-macosxmojave-py3 new file mode 100644 index 000000000000..a46d63ab19b6 --- /dev/null +++ b/.ci/kitchen-macosxmojave-py3 @@ -0,0 +1,146 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'macosx' +def distro_version = 'mojave' +def python_version = 'py3' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + +wrappedNode('kitchen-slave-mac', global_timeout, '#jenkins-prod-pr') { + withEnv([ + 'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/platforms.yml', + 'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/verifier.yml', + 'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + "PATH=/Users/parallels/.rbenv/shims:/Users/parallels/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/salt/bin:/usr/local/sbin", + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + stage('VM Cleanup') { + sh ''' + for i in `prlctl list -aij|jq -r '.[]|select((.Uptime|tonumber > 86400) and (.State == "running"))|.ID'` + do + prlctl stop $i --kill + done + # don't delete vm's that haven't started yet ((.State == "stopped") and (.Uptime == "0")) + for i in `prlctl list -aij|jq -r '.[]|select((.Uptime|tonumber > 0) and (.State != "running"))|.ID'` + do + prlctl delete $i + done + ''' + } + // Checkout the repo + stage('Clone') { + 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 'bundle install --with vagrant macos --without ec2 windows opennebula docker' + } + + stage('Create VM') { + sh ''' + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.vagrant.d/insecure_private_key; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy From b2987d0b568df23427db80bad94168a387a98444 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Tue, 1 Oct 2019 14:11:01 -0600 Subject: [PATCH 28/44] remove debian8-py3 since we don't support it --- .ci/kitchen-debian8-py3 | 159 ---------------------------------------- 1 file changed, 159 deletions(-) delete mode 100644 .ci/kitchen-debian8-py3 diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 deleted file mode 100644 index e854de837f58..000000000000 --- a/.ci/kitchen-debian8-py3 +++ /dev/null @@ -1,159 +0,0 @@ -@Library('salt@1.1') _ - -// 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. -def global_timeout = testrun_timeout + 1; - -def distro_name = 'debian' -def distro_version = '8' -def python_version = 'py3' -def test_transport = 'ZeroMQ' -def salt_target_branch = 'master' -def golden_images_branch = '2019.2' -def nox_passthrough_opts = '--ssh-tests' - -properties([ - buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), - parameters([ - booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') - ]) -]) - -// Be sure to cancel any previously running builds -def buildNumber = env.BUILD_NUMBER as int -if (buildNumber > 1) { - // This will cancel the previous build which also defined a matching milestone - milestone(buildNumber - 1) -} -// Define a milestone for this build so that, if another build starts, this one will be aborted -milestone(buildNumber) - - -wrappedNode('kitchen-slave', global_timeout, '#jenkins-prod-pr') { - withEnv([ - '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', - "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", - 'NOX_ENABLE_FROM_FILENAMES=true', - "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", - "SALT_TARGET_BRANCH=${salt_target_branch}", - "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", - "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", - 'PATH=~/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', - 'RBENV_VERSION=2.6.3', - "TEST_SUITE=${python_version}", - "TEST_PLATFORM=${distro_name}-${distro_version}", - "TEST_TRANSPORT=${test_transport}", - "FORCE_FULL=${params.runFull}", - ]) { - // Checkout the repo - stage('Clone') { - 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 'bundle install --with ec2 windows --without docker macos opennebula vagrant' - } - - stage('Create VM') { - retry(3) { - sh ''' - t=$(shuf -i 30-120 -n 1); echo "Sleeping $t seconds"; sleep $t - cp -f ~/workspace/spot.yml .kitchen.local.yml - bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM || (bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; rm .kitchen.local.yml; bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM); echo "ExitCode: $?"; - ''' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" - fi - """ - } - sh ''' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'image_id:' - bundle exec kitchen diagnose $TEST_SUITE-$TEST_PLATFORM | grep 'instance_type:' -A5 - ''' - } - - try { - timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { - stage('Converge VM') { - sh ''' - ssh-agent /bin/bash -c 'ssh-add ~/.ssh/kitchen.pem; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' - ''' - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" - fi - """ - } - stage('Run Tests') { - withEnv(["DONT_DOWNLOAD_ARTEFACTS=1"]) { - sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' - } - } - } - } finally { - try { - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" - fi - """ - stage('Download Artefacts') { - withEnv(["ONLY_DOWNLOAD_ARTEFACTS=1"]){ - sh ''' - bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM || exit 0 - ''' - } - sh """ - if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then - mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-download.log" - fi - if [ -s ".kitchen/logs/kitchen.log" ]; then - mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-download.log" - fi - """ - } - archiveArtifacts( - artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", - allowEmptyArchive: true - ) - junit 'artifacts/xml-unittests-output/*.xml' - } finally { - stage('Cleanup') { - sh ''' - bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; - ''' - } - stage('Upload Coverage') { - script { - withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { - sh ''' - if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then - (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true - fi - ''' - } - } - } - } - } - } -} - -// vim: ft=groovy From 83c4ee1730ccb8ef17710d4cec7dfaf6f7a32f04 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Wed, 2 Oct 2019 16:42:33 -0600 Subject: [PATCH 29/44] Updated paramiko version for python3.7 compatibility on debian10 --- requirements/static/debian-10.in | 2 +- requirements/static/py2.7/raet-debian-10.log | 0 requirements/static/py2.7/zeromq-debian-10.log | 0 requirements/static/py3.4/raet-debian-10.log | 0 requirements/static/py3.4/zeromq-debian-10.txt | 16 +++++++++------- requirements/static/py3.5/raet-debian-10.log | 0 requirements/static/py3.5/zeromq-debian-10.txt | 15 ++++++++------- requirements/static/py3.6/raet-debian-10.log | 0 requirements/static/py3.6/zeromq-debian-10.txt | 15 ++++++++------- requirements/static/py3.7/raet-debian-10.log | 0 requirements/static/py3.7/zeromq-debian-10.txt | 15 ++++++++------- 11 files changed, 34 insertions(+), 29 deletions(-) create mode 100644 requirements/static/py2.7/raet-debian-10.log create mode 100644 requirements/static/py2.7/zeromq-debian-10.log create mode 100644 requirements/static/py3.4/raet-debian-10.log create mode 100644 requirements/static/py3.5/raet-debian-10.log create mode 100644 requirements/static/py3.6/raet-debian-10.log create mode 100644 requirements/static/py3.7/raet-debian-10.log diff --git a/requirements/static/debian-10.in b/requirements/static/debian-10.in index e56336bb3ee0..4ee2f3c697b3 100644 --- a/requirements/static/debian-10.in +++ b/requirements/static/debian-10.in @@ -20,7 +20,7 @@ mock>=2.0.0; python_version < '3.6' more-itertools==5.0.0 moto msgpack-python >= 0.4.2, != 0.5.5 -paramiko==2.1.2 +paramiko==2.2.3 psutil # Let's install cryptodome instead of pycrypto because of pycrypto's outstanding security issues # PyCrypto, if pulled, will be removed from the generated static requirements diff --git a/requirements/static/py2.7/raet-debian-10.log b/requirements/static/py2.7/raet-debian-10.log new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/requirements/static/py2.7/zeromq-debian-10.log b/requirements/static/py2.7/zeromq-debian-10.log new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/requirements/static/py3.4/raet-debian-10.log b/requirements/static/py3.4/raet-debian-10.log new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/requirements/static/py3.4/zeromq-debian-10.txt b/requirements/static/py3.4/zeromq-debian-10.txt index c3de9078e60f..bbdd6e51bfe6 100644 --- a/requirements/static/py3.4/zeromq-debian-10.txt +++ b/requirements/static/py3.4/zeromq-debian-10.txt @@ -9,20 +9,21 @@ asn1crypto==0.24.0 # via cryptography atomicwrites==1.3.0 # via pytest attrs==19.1.0 # via pytest aws-xray-sdk==0.95 # via moto -backports-abc==0.5 # via tornado backports.functools-lru-cache==1.5 # via cheroot -backports.ssl-match-hostname==3.7.0.1 # via docker, websocket-client +backports.ssl-match-hostname==3.7.0.1 # via docker +bcrypt==3.1.7 # via paramiko boto3==1.9.132 boto==2.49.0 botocore==1.12.132 # via boto3, moto, s3transfer cachetools==3.1.0 # via google-auth -certifi==2019.3.9 # via kubernetes, requests, tornado +certifi==2019.3.9 # via kubernetes, requests cffi==1.12.2 chardet==3.0.4 # via requests cheroot==6.5.4 # via cherrypy cherrypy==17.3.0 clustershell==1.8.1 contextlib2==0.5.5 # via cherrypy +coverage==4.5.4 # via pytest-cov croniter==0.3.29 cryptography==2.6.1 # via moto, paramiko, pylxd, pyopenssl dnspython==1.16.0 @@ -55,7 +56,7 @@ msgpack-python==0.5.6 msgpack==0.6.1 ncclient==0.6.4 # via junos-eznc netaddr==0.7.19 # via junos-eznc -paramiko==2.1.2 +paramiko==2.2.3 pathlib2==2.3.3 # via pytest pbr==5.1.3 # via mock, pylxd pluggy==0.11.0 # via pytest @@ -72,11 +73,13 @@ pycryptodome==3.8.1 pygit2==0.28.1 pyinotify==0.9.6 pylxd==2.2.9 +pynacl==1.3.0 # via paramiko pyopenssl==19.0.0 pyserial==3.4 # via junos-eznc +pytest-cov==2.7.1 pytest-helpers-namespace==2019.1.8 pytest-salt-runtests-bridge==2019.1.30 -pytest-salt==2019.5.10.post1 +pytest-salt==2018.12.8 pytest-tempdir==2018.8.11 pytest-timeout==1.3.3 pytest==4.4.2 @@ -100,8 +103,7 @@ scandir==1.10.0 # via pathlib2 scp==0.13.2 # via junos-eznc selectors2==2.0.1 # via ncclient setproctitle==1.1.10 -singledispatch==3.4.0.3 # via tornado -six==1.12.0 # via cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pathlib2, pygit2, pylxd, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, websocket-client +six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pathlib2, pygit2, pylxd, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, tempora, websocket-client smmap2==2.0.5 # via gitdb2 strict-rfc3339==0.7 tempora==1.14.1 # via portend diff --git a/requirements/static/py3.5/raet-debian-10.log b/requirements/static/py3.5/raet-debian-10.log new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/requirements/static/py3.5/zeromq-debian-10.txt b/requirements/static/py3.5/zeromq-debian-10.txt index 9bd6d7ad6f71..73f64e481fa4 100644 --- a/requirements/static/py3.5/zeromq-debian-10.txt +++ b/requirements/static/py3.5/zeromq-debian-10.txt @@ -9,20 +9,20 @@ asn1crypto==0.24.0 # via cryptography atomicwrites==1.3.0 # via pytest attrs==19.1.0 # via pytest aws-xray-sdk==0.95 # via moto -backports-abc==0.5 # via tornado backports.functools-lru-cache==1.5 # via cheroot -backports.ssl-match-hostname==3.7.0.1 # via websocket-client +bcrypt==3.1.7 # via paramiko boto3==1.9.132 boto==2.49.0 botocore==1.12.132 # via boto3, moto, s3transfer cachetools==3.1.0 # via google-auth -certifi==2019.3.9 # via kubernetes, requests, tornado +certifi==2019.3.9 # via kubernetes, requests cffi==1.12.2 chardet==3.0.4 # via requests cheroot==6.5.4 # via cherrypy cherrypy==17.3.0 clustershell==1.8.1 contextlib2==0.5.5 # via cherrypy +coverage==4.5.4 # via pytest-cov croniter==0.3.29 cryptography==2.6.1 # via moto, paramiko, pylxd, pyopenssl dnspython==1.16.0 @@ -55,7 +55,7 @@ msgpack-python==0.5.6 msgpack==0.6.1 ncclient==0.6.4 # via junos-eznc netaddr==0.7.19 # via junos-eznc -paramiko==2.1.2 +paramiko==2.2.3 pathlib2==2.3.3 # via pytest pbr==5.1.3 # via mock, pylxd pluggy==0.11.0 # via pytest @@ -72,11 +72,13 @@ pycryptodome==3.8.1 pygit2==0.28.1 pyinotify==0.9.6 pylxd==2.2.9 +pynacl==1.3.0 # via paramiko pyopenssl==19.0.0 pyserial==3.4 # via junos-eznc +pytest-cov==2.7.1 pytest-helpers-namespace==2019.1.8 pytest-salt-runtests-bridge==2019.1.30 -pytest-salt==2019.5.10.post1 +pytest-salt==2018.12.8 pytest-tempdir==2018.8.11 pytest-timeout==1.3.3 pytest==4.4.2 @@ -98,8 +100,7 @@ s3transfer==0.2.0 # via boto3 salttesting==2017.6.1 scp==0.13.2 # via junos-eznc setproctitle==1.1.10 -singledispatch==3.4.0.3 # via tornado -six==1.12.0 # via cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pathlib2, pygit2, pylxd, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, websocket-client +six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pathlib2, pygit2, pylxd, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, tempora, websocket-client smmap2==2.0.5 # via gitdb2 strict-rfc3339==0.7 tempora==1.14.1 # via portend diff --git a/requirements/static/py3.6/raet-debian-10.log b/requirements/static/py3.6/raet-debian-10.log new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/requirements/static/py3.6/zeromq-debian-10.txt b/requirements/static/py3.6/zeromq-debian-10.txt index 96f71ae1353b..cb09cec51d3d 100644 --- a/requirements/static/py3.6/zeromq-debian-10.txt +++ b/requirements/static/py3.6/zeromq-debian-10.txt @@ -9,20 +9,20 @@ asn1crypto==0.24.0 # via cryptography atomicwrites==1.3.0 # via pytest attrs==19.1.0 # via pytest aws-xray-sdk==0.95 # via moto -backports-abc==0.5 # via tornado backports.functools-lru-cache==1.5 # via cheroot -backports.ssl-match-hostname==3.7.0.1 # via websocket-client +bcrypt==3.1.7 # via paramiko boto3==1.9.132 boto==2.49.0 botocore==1.12.132 # via boto3, moto, s3transfer cachetools==3.1.0 # via google-auth -certifi==2019.3.9 # via kubernetes, requests, tornado +certifi==2019.3.9 # via kubernetes, requests cffi==1.12.2 chardet==3.0.4 # via requests cheroot==6.5.4 # via cherrypy cherrypy==17.3.0 clustershell==1.8.1 contextlib2==0.5.5 # via cherrypy +coverage==4.5.4 # via pytest-cov croniter==0.3.29 cryptography==2.6.1 # via moto, paramiko, pylxd, pyopenssl dnspython==1.16.0 @@ -55,7 +55,7 @@ msgpack-python==0.5.6 msgpack==0.6.1 ncclient==0.6.4 # via junos-eznc netaddr==0.7.19 # via junos-eznc -paramiko==2.1.2 +paramiko==2.2.3 pbr==5.1.3 # via mock, pylxd pluggy==0.11.0 # via pytest portend==2.4 # via cherrypy @@ -71,11 +71,13 @@ pycryptodome==3.8.1 pygit2==0.28.1 pyinotify==0.9.6 pylxd==2.2.9 +pynacl==1.3.0 # via paramiko pyopenssl==19.0.0 pyserial==3.4 # via junos-eznc +pytest-cov==2.7.1 pytest-helpers-namespace==2019.1.8 pytest-salt-runtests-bridge==2019.1.30 -pytest-salt==2019.5.10.post1 +pytest-salt==2018.12.8 pytest-tempdir==2018.8.11 pytest-timeout==1.3.3 pytest==4.4.2 @@ -97,8 +99,7 @@ s3transfer==0.2.0 # via boto3 salttesting==2017.6.1 scp==0.13.2 # via junos-eznc setproctitle==1.1.10 -singledispatch==3.4.0.3 # via tornado -six==1.12.0 # via cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pygit2, pylxd, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, websocket-client +six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pygit2, pylxd, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, tempora, websocket-client smmap2==2.0.5 # via gitdb2 strict-rfc3339==0.7 tempora==1.14.1 # via portend diff --git a/requirements/static/py3.7/raet-debian-10.log b/requirements/static/py3.7/raet-debian-10.log new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/requirements/static/py3.7/zeromq-debian-10.txt b/requirements/static/py3.7/zeromq-debian-10.txt index 2fcc3772a354..9a322593f24a 100644 --- a/requirements/static/py3.7/zeromq-debian-10.txt +++ b/requirements/static/py3.7/zeromq-debian-10.txt @@ -9,20 +9,20 @@ asn1crypto==0.24.0 # via cryptography atomicwrites==1.3.0 # via pytest attrs==19.1.0 # via pytest aws-xray-sdk==0.95 # via moto -backports-abc==0.5 # via tornado backports.functools-lru-cache==1.5 # via cheroot -backports.ssl-match-hostname==3.7.0.1 # via websocket-client +bcrypt==3.1.7 # via paramiko boto3==1.9.132 boto==2.49.0 botocore==1.12.132 # via boto3, moto, s3transfer cachetools==3.1.0 # via google-auth -certifi==2019.3.9 # via kubernetes, requests, tornado +certifi==2019.3.9 # via kubernetes, requests cffi==1.12.2 chardet==3.0.4 # via requests cheroot==6.5.4 # via cherrypy cherrypy==17.3.0 clustershell==1.8.1 contextlib2==0.5.5 # via cherrypy +coverage==4.5.4 # via pytest-cov croniter==0.3.29 cryptography==2.6.1 # via moto, paramiko, pylxd, pyopenssl dnspython==1.16.0 @@ -55,7 +55,7 @@ msgpack-python==0.5.6 msgpack==0.6.1 ncclient==0.6.4 # via junos-eznc netaddr==0.7.19 # via junos-eznc -paramiko==2.1.2 +paramiko==2.2.3 pbr==5.1.3 # via mock, pylxd pluggy==0.11.0 # via pytest portend==2.4 # via cherrypy @@ -71,11 +71,13 @@ pycryptodome==3.8.1 pygit2==0.28.1 pyinotify==0.9.6 pylxd==2.2.9 +pynacl==1.3.0 # via paramiko pyopenssl==19.0.0 pyserial==3.4 # via junos-eznc +pytest-cov==2.7.1 pytest-helpers-namespace==2019.1.8 pytest-salt-runtests-bridge==2019.1.30 -pytest-salt==2019.5.10.post1 +pytest-salt==2018.12.8 pytest-tempdir==2018.8.11 pytest-timeout==1.3.3 pytest==4.4.2 @@ -97,8 +99,7 @@ s3transfer==0.2.0 # via boto3 salttesting==2017.6.1 scp==0.13.2 # via junos-eznc setproctitle==1.1.10 -singledispatch==3.4.0.3 # via tornado -six==1.12.0 # via cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pygit2, pylxd, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, singledispatch, tempora, websocket-client +six==1.12.0 # via bcrypt, cheroot, cherrypy, cryptography, docker, docker-pycreds, google-auth, junos-eznc, kubernetes, mock, more-itertools, moto, ncclient, pygit2, pylxd, pynacl, pyopenssl, pytest, python-dateutil, python-jose, pyvmomi, responses, salttesting, tempora, websocket-client smmap2==2.0.5 # via gitdb2 strict-rfc3339==0.7 tempora==1.14.1 # via portend From 05c6ffb5cc03f952fd7e0d5616cea416b2d00536 Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Wed, 2 Oct 2019 16:33:46 -0600 Subject: [PATCH 30/44] add mojave py2 --- .ci/kitchen-macosxmojave-py2 | 146 +++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 .ci/kitchen-macosxmojave-py2 diff --git a/.ci/kitchen-macosxmojave-py2 b/.ci/kitchen-macosxmojave-py2 new file mode 100644 index 000000000000..7ef399f805e4 --- /dev/null +++ b/.ci/kitchen-macosxmojave-py2 @@ -0,0 +1,146 @@ +@Library('salt@1.1') _ + +// 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. +def global_timeout = testrun_timeout + 1; + +def distro_name = 'macosx' +def distro_version = 'mojave' +def python_version = 'py2' +def test_transport = 'ZeroMQ' +def salt_target_branch = 'master' +def golden_images_branch = '2019.2' +def nox_passthrough_opts = '' + +properties([ + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), + parameters([ + booleanParam(defaultValue: true, description: 'Run full test suite', name: 'runFull') + ]) +]) + +// Be sure to cancel any previously running builds +def buildNumber = env.BUILD_NUMBER as int +if (buildNumber > 1) { + // This will cancel the previous build which also defined a matching milestone + milestone(buildNumber - 1) +} +// Define a milestone for this build so that, if another build starts, this one will be aborted +milestone(buildNumber) + +wrappedNode('kitchen-slave-mac', global_timeout, '#jenkins-prod-pr') { + withEnv([ + 'SALT_KITCHEN_PLATFORMS=/var/jenkins/workspace/platforms.yml', + 'SALT_KITCHEN_VERIFIER=/var/jenkins/workspace/verifier.yml', + 'SALT_KITCHEN_DRIVER=/var/jenkins/workspace/driver.yml', + "NOX_ENV_NAME=runtests-${test_transport.toLowerCase()}", + 'NOX_ENABLE_FROM_FILENAMES=true', + "NOX_PASSTHROUGH_OPTS=${nox_passthrough_opts}", + "SALT_TARGET_BRANCH=${salt_target_branch}", + "GOLDEN_IMAGES_CI_BRANCH=${golden_images_branch}", + "CODECOV_FLAGS=${distro_name}${distro_version},${python_version},${test_transport.toLowerCase()}", + "PATH=/Users/parallels/.rbenv/shims:/Users/parallels/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/salt/bin:/usr/local/sbin", + 'RBENV_VERSION=2.6.3', + "TEST_SUITE=${python_version}", + "TEST_PLATFORM=${distro_name}-${distro_version}", + "TEST_TRANSPORT=${test_transport}", + "FORCE_FULL=${params.runFull}", + ]) { + stage('VM Cleanup') { + sh ''' + for i in `prlctl list -aij|jq -r '.[]|select((.Uptime|tonumber > 86400) and (.State == "running"))|.ID'` + do + prlctl stop $i --kill + done + # don't delete vm's that haven't started yet ((.State == "stopped") and (.Uptime == "0")) + for i in `prlctl list -aij|jq -r '.[]|select((.Uptime|tonumber > 0) and (.State != "running"))|.ID'` + do + prlctl delete $i + done + ''' + } + // Checkout the repo + stage('Clone') { + 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 'bundle install --with vagrant macos --without ec2 windows opennebula docker' + } + + stage('Create VM') { + sh ''' + bundle exec kitchen create $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-create.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-create.log" + fi + """ + } + + try { + timeout(time: testrun_timeout * 60 - 15, unit: 'MINUTES') { + stage('Converge VM') { + sh ''' + ssh-agent /bin/bash -c 'ssh-add ~/.vagrant.d/insecure_private_key; bundle exec kitchen converge $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"' + ''' + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-converge.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-converge.log" + fi + """ + } + stage('Run Tests') { + sh 'bundle exec kitchen verify $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?";' + } + } + } finally { + try { + sh """ + if [ -s ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ]; then + mv ".kitchen/logs/${python_version}-${distro_name}-${distro_version}.log" ".kitchen/logs/${python_version}-${distro_name}-${distro_version}-verify.log" + fi + if [ -s ".kitchen/logs/kitchen.log" ]; then + mv ".kitchen/logs/kitchen.log" ".kitchen/logs/kitchen-verify.log" + fi + """ + archiveArtifacts( + artifacts: "artifacts/*,artifacts/**/*,.kitchen/logs/*-create.log,.kitchen/logs/*-converge.log,.kitchen/logs/*-verify.log,.kitchen/logs/*-download.log,artifacts/xml-unittests-output/*.xml", + allowEmptyArchive: true + ) + junit 'artifacts/xml-unittests-output/*.xml' + } finally { + stage('Cleanup') { + sh ''' + bundle exec kitchen destroy $TEST_SUITE-$TEST_PLATFORM; echo "ExitCode: $?"; + ''' + } + stage('Upload Coverage') { + script { + withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) { + sh ''' + if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then + (curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}") || true + fi + ''' + } + } + } + } + } + } +} + +// vim: ft=groovy From 2a9202eff098c15e3e2ee48977937f475b02be33 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Wed, 2 Oct 2019 19:59:50 -0600 Subject: [PATCH 31/44] Made tests more compatible with debian10 and opensuse --- tests/integration/states/test_pkg.py | 81 +++++++++++++++++------- tests/integration/states/test_pkgrepo.py | 24 ++++--- 2 files changed, 68 insertions(+), 37 deletions(-) diff --git a/tests/integration/states/test_pkg.py b/tests/integration/states/test_pkg.py index 3b66d807cb52..3225c6237142 100644 --- a/tests/integration/states/test_pkg.py +++ b/tests/integration/states/test_pkg.py @@ -5,6 +5,7 @@ ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals +import functools import logging import os import time @@ -46,31 +47,46 @@ if salt.utils.platform.is_windows(): _PKG_TARGETS = ['7zip', 'putty'] -if pre_grains: +elif salt.utils.platform.is_freebsd: + _VERSION_SPEC_SUPPORTED = False +elif pre_grains: if any(arch in pre_grains.like() for arch in ('arch', 'archlinux')): _WILDCARDS_SUPPORTED = True elif 'debian' in pre_grains.like(): _WILDCARDS_SUPPORTED = True - elif 'freebsd' in pre_grains.like(): - _VERSION_SPEC_SUPPORTED = False elif 'rhel' in pre_grains.like(): _PKG_TARGETS = ['units', 'zsh-html'] _WILDCARDS_SUPPORTED = True if pre_grains.id() == 'centos': if pre_grains.major_version() == 5: - _PKG_32_TARGETS.append('xz-devel.i386') + _PKG_32_TARGETS = ['xz-devel.i386'] else: _PKG_32_TARGETS.append('xz-devel.i686') if pre_grains.major_version() == 5: - _PKG_DOT_TARGETS.append('python-migrate0.5') + _PKG_DOT_TARGETS = ['python-migrate0.5'] elif pre_grains.major_version() == 6: - _PKG_DOT_TARGETS.append('tomcat6-el-2.1-api') + _PKG_DOT_TARGETS = ['tomcat6-el-2.1-api'] elif pre_grains.major_version() == 7: - _PKG_DOT_TARGETS.append('tomcat-el-2.2-api') - _PKG_EPOCH_TARGETS.append('comps-extras') - elif any(suse in pre_grains.like() for suse in ('sles', 'opensuse')): + _PKG_DOT_TARGETS = ['tomcat-el-2.2-api'] + _PKG_EPOCH_TARGETS = [ 'comps-extras'] + elif pre_grains.id() in ('sles', 'opensuse'): _PKG_TARGETS = ['figlet', 'htop'] - _PKG_CAP_TARGETS.append(('perl(ZNC)', 'znc-perl')) + _PKG_CAP_TARGETS = [('perl(ZNC)', 'znc-perl')] + + +def runs_on(platforms=None, os_like=None, reason=''): + def decorator(caller): + @functools.wraps(caller) + def wrapper(cls): + if platforms: + if not any(getattr(salt.utils.platform, 'is_' + platform)() for platform in platforms): + cls.skipTest(reason if reason else 'OS not in [{}]'.format(', '.join(platforms))) + if pre_grains and os_like: + if not any(x in pre_grains.like() for x in os_like): + cls.skipTest(reason if reason else 'OS not similar to [{}]'.format(', '.join(os_like))) + return caller(cls) + return wrapper + return decorator @destructiveTest @@ -114,6 +130,7 @@ def setUp(self): self.run_function('pkg.refresh_db') self.ctx['refresh'] = True + @requires_salt_modules('pkg.version', 'pkg.installed', 'pkg.removed') def test_pkg_001_installed(self): ''' This is a destructive test as it installs and then removes a package @@ -132,6 +149,7 @@ def test_pkg_001_installed(self): self.assertSaltTrueReturn(ret) @skipIf(not _VERSION_SPEC_SUPPORTED, 'Version specification not supported') + @requires_salt_modules('pkg.installed', 'pkg.removed') def test_pkg_002_installed_with_version(self): ''' This is a destructive test as it installs and then removes a package @@ -161,6 +179,7 @@ def test_pkg_002_installed_with_version(self): ret = self.run_state('pkg.removed', name=target) self.assertSaltTrueReturn(ret) + @requires_salt_modules('pkg.installed', 'pkg.removed') def test_pkg_003_installed_multipkg(self): ''' This is a destructive test as it installs and then removes two packages @@ -184,6 +203,7 @@ def test_pkg_003_installed_multipkg(self): self.assertSaltTrueReturn(ret) @skipIf(not _VERSION_SPEC_SUPPORTED, 'Version specification not supported') + @requires_salt_modules('pkg.installed', 'pkg.removed') def test_pkg_004_installed_multipkg_with_version(self): ''' This is a destructive test as it installs and then removes two packages @@ -217,6 +237,7 @@ def test_pkg_004_installed_multipkg_with_version(self): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_32_TARGETS, 'No 32 bit packages have been specified for testing') + @requires_salt_modules('pkg.version', 'pkg.installed', 'pkg.removed') def test_pkg_005_installed_32bit(self): ''' This is a destructive test as it installs and then removes a package @@ -242,6 +263,7 @@ def test_pkg_005_installed_32bit(self): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_32_TARGETS, 'No 32 bit packages have been specified for testing') + @requires_salt_modules('pkg.installed', 'pkg.removed') def test_pkg_006_installed_32bit_with_version(self): ''' This is a destructive test as it installs and then removes a package @@ -277,6 +299,7 @@ def test_pkg_006_installed_32bit_with_version(self): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_DOT_TARGETS, 'No packages with "." in their name have been configured for') + @requires_salt_modules('pkg.installed', 'pkg.removed') def test_pkg_007_with_dot_in_pkgname(self=None): ''' This tests for the regression found in the following issue: @@ -298,6 +321,7 @@ def test_pkg_007_with_dot_in_pkgname(self=None): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_EPOCH_TARGETS, 'No targets have been configured with "epoch" in the version') + @requires_salt_modules('pkg.installed', 'pkg.removed') def test_pkg_008_epoch_in_version(self): ''' This tests for the regression found in the following issue: @@ -321,8 +345,8 @@ def test_pkg_008_epoch_in_version(self): ret = self.run_state('pkg.removed', name=target) self.assertSaltTrueReturn(ret) - @skipIf(salt.utils.platform.is_windows(), 'minion is windows') - @requires_salt_modules('pkg.info_installed') + @requires_salt_modules('pkg.version', 'pkg.info_installed', 'pkg.installed', 'pkg.removed') + @runs_on(platforms=['linux'], reason='This test only runs on linux') def test_pkg_009_latest_with_epoch(self): ''' This tests for the following issue: @@ -341,6 +365,7 @@ def test_pkg_009_latest_with_epoch(self): ret = self.run_function('pkg.info_installed', [package]) self.assertTrue(pkgquery in six.text_type(ret)) + @requires_salt_modules('pkg.latest', 'pkg.removed') def test_pkg_010_latest(self): ''' This tests pkg.latest with a package that has no epoch (or a zero @@ -359,7 +384,8 @@ def test_pkg_010_latest(self): ret = self.run_state('pkg.removed', name=target) self.assertSaltTrueReturn(ret) - @skipIf(not pre_grains or ('debian' not in pre_grains.like()), 'This test only runs on debian based distributions') + @requires_salt_modules('pkg.latest', 'pkg.list_pkgs', 'pkg.list_upgrades', 'pkg.version') + @runs_on(platforms=['linux'], os_like=['debian'], reason='This test only runs on Debian based linux distributions') def test_pkg_011_latest_only_upgrade(self): ''' WARNING: This test will pick a package with an available upgrade (if @@ -409,6 +435,7 @@ def test_pkg_011_latest_only_upgrade(self): ) @skipIf(not _WILDCARDS_SUPPORTED, 'Wildcards in pkg.install are not supported') + @requires_salt_modules('pkg.version', 'pkg.installed', 'pkg.removed') def test_pkg_012_installed_with_wildcard_version(self): ''' This is a destructive test as it installs and then removes a package @@ -457,8 +484,8 @@ def test_pkg_012_installed_with_wildcard_version(self): ret = self.run_state('pkg.removed', name=target) self.assertSaltTrueReturn(ret) - @skipIf(not pre_grains or not any(x in pre_grains.like() for x in ('debian', 'redhat')), - 'Comparison operator not specially implemented') + @requires_salt_modules('pkg.version', 'pkg.latest_version', 'pkg.installed', 'pkg.removed') + @runs_on(platforms=['linux'], os_like=['debian', 'redhat'], reason='Comparison operator not specially implemented') def test_pkg_013_installed_with_comparison_operator(self): ''' This is a destructive test as it installs and then removes a package @@ -493,7 +520,8 @@ def test_pkg_013_installed_with_comparison_operator(self): ret = self.run_state('pkg.removed', name=target) self.assertSaltTrueReturn(ret) - @skipIf(not pre_grains or 'redhat' not in pre_grains.like(), 'Comparison operator not specially implemented') + @requires_salt_modules('pkg.version', 'pkg.installed', 'pkg.removed') + @runs_on(platforms=['linux'], os_like=['redhat'], reason='Comparison operator not specially implemented') def test_pkg_014_installed_missing_release(self): ''' Tests that a version number missing the release portion still resolves @@ -519,8 +547,7 @@ def test_pkg_014_installed_missing_release(self): ret = self.run_state('pkg.removed', name=target) self.assertSaltTrueReturn(ret) - @skipIf(not pre_grains or not any(x in pre_grains.like() for x in ('debian', 'redhat')), 'Test is for debian/redhat') - @requires_salt_modules('pkg.hold', 'pkg.unhold') + @requires_salt_modules('pkg.hold', 'pkg.unhold', 'pkg.installed', 'pkg.removed') def test_pkg_015_installed_held(self): ''' Tests that a package can be held even when the package is already installed. @@ -579,6 +606,7 @@ def test_pkg_015_installed_held(self): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_CAP_TARGETS, 'Capability not provided') + @requires_salt_modules('pkg.version', 'pkg.installed', 'pkg.removed') def test_pkg_cap_001_installed(self): ''' This is a destructive test as it installs and then removes a package @@ -604,6 +632,7 @@ def test_pkg_cap_001_installed(self): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_CAP_TARGETS, 'Capability not available') + @requires_salt_modules('pkg.installed', 'pkg.removed') def test_pkg_cap_002_already_installed(self): ''' This is a destructive test as it installs and then removes a package @@ -637,11 +666,12 @@ def test_pkg_cap_002_already_installed(self): @skipIf(not _PKG_CAP_TARGETS, 'Capability not available') @skipIf(not _VERSION_SPEC_SUPPORTED, 'Version specification not supported') + @requires_salt_modules('pkg.installed', 'pkg.removed') def test_pkg_cap_003_installed_multipkg_with_version(self): ''' This is a destructive test as it installs and then removes two packages ''' - if pre_grains and 'arch' in pre_grains.like(): + if pre_grains and ('arch' in pre_grains.like() or 'archlinux' in pre_grains.like()): for idx in range(13): if idx == 12: raise Exception('Package database locked after 60 seconds, ' @@ -650,18 +680,18 @@ def test_pkg_cap_003_installed_multipkg_with_version(self): break time.sleep(5) - capability, realpkg = _PKG_CAP_TARGETS[0] - version = self.latest_version(capability) + target, realpkg = _PKG_CAP_TARGETS[0] + version = self.latest_version(target) realver = self.latest_version(realpkg) # If this assert fails, we need to find new targets, this test needs to # be able to test successful installation of packages, so these # packages need to not be installed before we run the states below - self.assertTrue(version) - self.assertTrue(realver) + self.assertTrue(version, 'new pkg cap targets required') + self.assertTrue(realver, 'new pkg cap targets required') try: - pkgs = [{_PKG_TARGETS[0]: version}, _PKG_TARGETS[1], {capability: realver}] + pkgs = [{_PKG_TARGETS[0]: version}, _PKG_TARGETS[1], {target: realver}] ret = self.run_state('pkg.installed', name='test_pkg_cap_003_installed_multipkg_with_version-install', pkgs=pkgs, @@ -689,6 +719,7 @@ def test_pkg_cap_003_installed_multipkg_with_version(self): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_CAP_TARGETS, 'Capability not available') + @requires_salt_modules('pkg.version', 'pkg.latest', 'pkg.removed') def test_pkg_cap_004_latest(self): ''' This tests pkg.latest with a package that has no epoch (or a zero @@ -718,6 +749,7 @@ def test_pkg_cap_004_latest(self): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_CAP_TARGETS, 'Capability not available') + @requires_salt_modules('pkg.version', 'pkg.installed', 'pkg.removed', 'pkg.downloaded') def test_pkg_cap_005_downloaded(self): ''' This is a destructive test as it installs and then removes a package @@ -742,6 +774,7 @@ def test_pkg_cap_005_downloaded(self): self.assertSaltTrueReturn(ret) @skipIf(not _PKG_CAP_TARGETS, 'Capability not available') + @requires_salt_modules('pkg.version', 'pkg.installed', 'pkg.removed', 'pkg.uptodate') def test_pkg_cap_006_uptodate(self): ''' This is a destructive test as it installs and then removes a package diff --git a/tests/integration/states/test_pkgrepo.py b/tests/integration/states/test_pkgrepo.py index 5eba0669e5c6..0101fb138c72 100644 --- a/tests/integration/states/test_pkgrepo.py +++ b/tests/integration/states/test_pkgrepo.py @@ -13,6 +13,7 @@ from tests.support.unit import skipIf from tests.support.helpers import ( destructiveTest, + requires_salt_modules, requires_system_grains, ) @@ -29,14 +30,13 @@ class PkgrepoTest(ModuleCase, SaltReturnAssertsMixin): ''' pkgrepo state tests ''' + @requires_salt_modules('pkgrepo.managed') @requires_system_grains def test_pkgrepo_01_managed(self, grains): ''' Test adding a repo ''' - os_grain = self.run_function('grains.item', ['os'])['os'] - os_release_info = tuple(self.run_function('grains.item', ['osrelease_info'])['osrelease_info']) - if os_grain == 'Ubuntu' and os_release_info >= (15, 10): + if grains['os'] == 'Ubuntu' and grains['osrelease_info'] >= (15, 10): self.skipTest( 'The PPA used for this test does not exist for Ubuntu Wily' ' (15.10) and later.' @@ -57,13 +57,13 @@ def test_pkgrepo_01_managed(self, grains): for state_id, state_result in six.iteritems(ret): self.assertSaltTrueReturn(dict([(state_id, state_result)])) - def test_pkgrepo_02_absent(self): + @requires_salt_modules('pkgrepo.absent') + @requires_system_grains + def test_pkgrepo_02_absent(self, grains): ''' Test removing the repo from the above test ''' - os_grain = self.run_function('grains.item', ['os'])['os'] - os_release_info = tuple(self.run_function('grains.item', ['osrelease_info'])['osrelease_info']) - if os_grain == 'Ubuntu' and os_release_info >= (15, 10): + if grains['os'] == 'Ubuntu' and grains['osrelease_info'] >= (15, 10): self.skipTest( 'The PPA used for this test does not exist for Ubuntu Wily' ' (15.10) and later.' @@ -77,24 +77,21 @@ def test_pkgrepo_02_absent(self): for state_id, state_result in six.iteritems(ret): self.assertSaltTrueReturn(dict([(state_id, state_result)])) + @requires_salt_modules('pkgrepo.absent', 'pkgrepo.managed') @requires_system_grains def test_pkgrepo_03_with_comments(self, grains): ''' Test adding a repo with comments ''' - os_family = grains['os_family'].lower() - - if os_family in ('redhat',): + if grains['os_family'] in ('redhat',): kwargs = { 'name': 'examplerepo', 'baseurl': 'http://example.com/repo', 'enabled': False, 'comments': ['This is a comment'] } - elif os_family in ('debian',): + elif grains['os_family'] in ('debian',): self.skipTest('Debian/Ubuntu test case needed') - else: - self.skipTest("No test case for os_family '{0}'".format(os_family)) try: # Run the state to add the repo @@ -130,6 +127,7 @@ def test_pkgrepo_03_with_comments(self, grains): # Clean up self.run_state('pkgrepo.absent', name=kwargs['name']) + @requires_salt_modules('pkgrepo.managed') @requires_system_grains def test_pkgrepo_04_apt_with_architectures(self, grains): ''' From a6816addd52f7dd80b02a6c3bc0a25694176dfea Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Wed, 2 Oct 2019 20:27:39 -0600 Subject: [PATCH 32/44] fixed linter errors --- tests/integration/states/test_pkg.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/states/test_pkg.py b/tests/integration/states/test_pkg.py index 3225c6237142..c990c518dd72 100644 --- a/tests/integration/states/test_pkg.py +++ b/tests/integration/states/test_pkg.py @@ -28,13 +28,14 @@ # Import 3rd-party libs from salt.ext import six from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin + try: from distro import LinuxDistribution + pre_grains = LinuxDistribution() except ImportError: pre_grains = None - log = logging.getLogger(__name__) _PKG_EPOCH_TARGETS = [] @@ -68,7 +69,7 @@ _PKG_DOT_TARGETS = ['tomcat6-el-2.1-api'] elif pre_grains.major_version() == 7: _PKG_DOT_TARGETS = ['tomcat-el-2.2-api'] - _PKG_EPOCH_TARGETS = [ 'comps-extras'] + _PKG_EPOCH_TARGETS = ['comps-extras'] elif pre_grains.id() in ('sles', 'opensuse'): _PKG_TARGETS = ['figlet', 'htop'] _PKG_CAP_TARGETS = [('perl(ZNC)', 'znc-perl')] @@ -85,7 +86,9 @@ def wrapper(cls): if not any(x in pre_grains.like() for x in os_like): cls.skipTest(reason if reason else 'OS not similar to [{}]'.format(', '.join(os_like))) return caller(cls) + return wrapper + return decorator From 3ea42dd7a78f875bf13e5e922a6fef60c437816d Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Wed, 2 Oct 2019 22:33:15 -0600 Subject: [PATCH 33/44] remove empty log files --- requirements/static/py2.7/raet-debian-10.log | 0 requirements/static/py2.7/zeromq-debian-10.log | 0 requirements/static/py3.4/raet-debian-10.log | 0 requirements/static/py3.5/raet-debian-10.log | 0 requirements/static/py3.6/raet-debian-10.log | 0 requirements/static/py3.7/raet-debian-10.log | 0 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 requirements/static/py2.7/raet-debian-10.log delete mode 100644 requirements/static/py2.7/zeromq-debian-10.log delete mode 100644 requirements/static/py3.4/raet-debian-10.log delete mode 100644 requirements/static/py3.5/raet-debian-10.log delete mode 100644 requirements/static/py3.6/raet-debian-10.log delete mode 100644 requirements/static/py3.7/raet-debian-10.log diff --git a/requirements/static/py2.7/raet-debian-10.log b/requirements/static/py2.7/raet-debian-10.log deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/requirements/static/py2.7/zeromq-debian-10.log b/requirements/static/py2.7/zeromq-debian-10.log deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/requirements/static/py3.4/raet-debian-10.log b/requirements/static/py3.4/raet-debian-10.log deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/requirements/static/py3.5/raet-debian-10.log b/requirements/static/py3.5/raet-debian-10.log deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/requirements/static/py3.6/raet-debian-10.log b/requirements/static/py3.6/raet-debian-10.log deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/requirements/static/py3.7/raet-debian-10.log b/requirements/static/py3.7/raet-debian-10.log deleted file mode 100644 index e69de29bb2d1..000000000000 From 13de6b15f803af92e777f03825e52ddfe780752b Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Thu, 3 Oct 2019 10:42:16 -0600 Subject: [PATCH 34/44] fixed fedora and macos pkg test --- tests/integration/modules/test_pkg.py | 51 +++++++++++++++------------ 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index f09b457dc434..8d191f553aac 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -25,14 +25,14 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin): ''' @classmethod - def setUpClass(cls): + @requires_system_grains + def setUpClass(cls, grains): cls.ctx = {} cls.pkg = 'htop' if salt.utils.platform.is_windows(): cls.pkg = 'putty' elif salt.utils.platform.is_darwin(): - os_release = cls.run_function('grains.get', ['osrelease']) - if int(os_release.split('.')[1]) >= 13: + if int(grains['osmajorrelease']) >= 13: cls.pkg = 'wget' def setUp(self): @@ -174,27 +174,34 @@ def test_hold_unhold(self, grains): ''' test holding and unholding a package ''' - version_lock = None - lock_pkg = 'yum-plugin-versionlock' - - self.run_function('pkg.install', [self.pkg]) - if grains['os_family'] == 'RedHat': - version_lock = self.run_function('pkg.version', [lock_pkg]) - if not version_lock: - self.run_function('pkg.install', [lock_pkg]) - - hold_ret = self.run_function('pkg.hold', [self.pkg]) - self.assertIn(self.pkg, hold_ret) - self.assertTrue(hold_ret[self.pkg]['result']) - - unhold_ret = self.run_function('pkg.unhold', [self.pkg]) - self.assertIn(self.pkg, unhold_ret) - self.assertTrue(unhold_ret[self.pkg]['result']) + def hold_package(): + hold_ret = self.run_function('pkg.hold', [self.pkg]) + self.assertIn(self.pkg, hold_ret) + self.assertTrue(hold_ret[self.pkg]['result']) + + unhold_ret = self.run_function('pkg.unhold', [self.pkg]) + self.assertIn(self.pkg, unhold_ret) + self.assertTrue(unhold_ret[self.pkg]['result']) + self.run_function('pkg.remove', [self.pkg]) if grains['os_family'] == 'RedHat': - if not version_lock: - self.run_function('pkg.remove', [lock_pkg]) - self.run_function('pkg.remove', [self.pkg]) + lock_pkgs = ('yum-plugin-versionlock', 'dnf-plugin-versionlock') + version_lock = {} + try: + self.run_function('pkg.install', [self.pkg]) + for lock_pkg in lock_pkgs: + version_lock[lock_pkg] = self.run_function('pkg.version', [lock_pkg]) + if not version_lock[lock_pkg]: + self.run_function('pkg.install', [lock_pkg]) + if not any(version_lock.values()): + self.skipTest('versionlock is not installed: {}'.format(version_lock)) + hold_package() + finally: + for lock_pkg in lock_pkgs: + if not version_lock[lock_pkg]: + self.run_function('pkg.remove', [lock_pkg]) + else: + hold_package() @destructiveTest @requires_salt_modules('pkg.refresh_db') From 2e0092d1b3d8abfbbed2c6c73dc043fb7a60c8a6 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Thu, 3 Oct 2019 13:01:54 -0600 Subject: [PATCH 35/44] install package before holding --- tests/integration/modules/test_pkg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index 8d191f553aac..96be5b939f74 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -175,6 +175,8 @@ def test_hold_unhold(self, grains): test holding and unholding a package ''' def hold_package(): + self.run_function('pkg.install', [self.pkg]) + hold_ret = self.run_function('pkg.hold', [self.pkg]) self.assertIn(self.pkg, hold_ret) self.assertTrue(hold_ret[self.pkg]['result']) @@ -188,7 +190,6 @@ def hold_package(): lock_pkgs = ('yum-plugin-versionlock', 'dnf-plugin-versionlock') version_lock = {} try: - self.run_function('pkg.install', [self.pkg]) for lock_pkg in lock_pkgs: version_lock[lock_pkg] = self.run_function('pkg.version', [lock_pkg]) if not version_lock[lock_pkg]: From 94f7ef29a5607fb992fc2d0ca44d95f4f265627b Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Thu, 3 Oct 2019 15:14:44 -0600 Subject: [PATCH 36/44] Install versionlock for yum or dnf --- tests/integration/modules/test_pkg.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index 96be5b939f74..93919543d98d 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -15,6 +15,8 @@ requires_system_grains) # Import Salt libs +from salt.ext import six +from salt.modules.yumpkg import _yum import salt.utils.pkg import salt.utils.platform @@ -187,20 +189,20 @@ def hold_package(): self.run_function('pkg.remove', [self.pkg]) if grains['os_family'] == 'RedHat': - lock_pkgs = ('yum-plugin-versionlock', 'dnf-plugin-versionlock') - version_lock = {} + lock_pkg = 'yum-plugin-versionlock' if _yum() == 'yum' else \ + 'python{py}-dnf-plugin-versionlock'.format(py=3 if six.PY3 else 2) + + version_lock = None try: - for lock_pkg in lock_pkgs: - version_lock[lock_pkg] = self.run_function('pkg.version', [lock_pkg]) - if not version_lock[lock_pkg]: - self.run_function('pkg.install', [lock_pkg]) - if not any(version_lock.values()): + version_lock = self.run_function('pkg.version', [lock_pkg]) + if not version_lock: + self.run_function('pkg.install', [lock_pkg]) + if not version_lock: self.skipTest('versionlock is not installed: {}'.format(version_lock)) hold_package() finally: - for lock_pkg in lock_pkgs: - if not version_lock[lock_pkg]: - self.run_function('pkg.remove', [lock_pkg]) + if not version_lock: + self.run_function('pkg.remove', [lock_pkg]) else: hold_package() From 6211e5b4142a1131b5d8f1adfce03fae85c7437e Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Fri, 4 Oct 2019 00:18:48 -0600 Subject: [PATCH 37/44] get dnf distro in more portable way --- tests/integration/modules/test_pkg.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index 93919543d98d..9ddf45a0fbec 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -16,7 +16,6 @@ # Import Salt libs from salt.ext import six -from salt.modules.yumpkg import _yum import salt.utils.pkg import salt.utils.platform @@ -176,6 +175,7 @@ def test_hold_unhold(self, grains): ''' test holding and unholding a package ''' + def hold_package(): self.run_function('pkg.install', [self.pkg]) @@ -189,8 +189,10 @@ def hold_package(): self.run_function('pkg.remove', [self.pkg]) if grains['os_family'] == 'RedHat': - lock_pkg = 'yum-plugin-versionlock' if _yum() == 'yum' else \ - 'python{py}-dnf-plugin-versionlock'.format(py=3 if six.PY3 else 2) + lock_pkg = 'yum-plugin-versionlock' + # get correct plugin for dnf packages following the logic in `salt.modules.yumpkg._yum` + if 'fedora' in grains['os'].lower() and int(grains['osrelease']) >= 22: + 'python{py}-dnf-plugin-versionlock'.format(py=3 if six.PY3 else 2) version_lock = None try: From fc553176fe11d0cb316f1d3b8f1cce58f13d1afd Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Fri, 4 Oct 2019 09:01:36 -0600 Subject: [PATCH 38/44] skip test not configured for mac --- tests/integration/modules/test_pkg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index 9ddf45a0fbec..c7830c7118de 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -348,7 +348,7 @@ def test_pkg_latest_version(self, grains): cmd_info = self.run_function('pkg.info_installed', [self.pkg]) remove = cmd_info != 'ERROR: package {0} is not installed'.format(self.pkg) - # remove package if its installed + # remove package if it's installed if remove: self.run_function('pkg.remove', [self.pkg]) @@ -363,5 +363,7 @@ def test_pkg_latest_version(self, grains): cmd_pkg = self.run_function('cmd.run', ['pacman -Si {0}'.format(self.pkg)]) elif grains['os_family'] == 'Suse': cmd_pkg = self.run_function('cmd.run', ['zypper info {0}'.format(self.pkg)]) + else: + self.skipTest('test not configured for {}'.format(grains['os_family'])) pkg_latest = self.run_function('pkg.latest_version', [self.pkg]) self.assertIn(pkg_latest, cmd_pkg) From 70e6c076f7e878bff6aa90cb5633744929d2b3af Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Fri, 4 Oct 2019 13:10:20 -0600 Subject: [PATCH 39/44] assign versionlock package to correct variable --- tests/integration/modules/test_pkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index c7830c7118de..c95f46163ece 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -192,7 +192,7 @@ def hold_package(): lock_pkg = 'yum-plugin-versionlock' # get correct plugin for dnf packages following the logic in `salt.modules.yumpkg._yum` if 'fedora' in grains['os'].lower() and int(grains['osrelease']) >= 22: - 'python{py}-dnf-plugin-versionlock'.format(py=3 if six.PY3 else 2) + lock_pkg = 'python{py}-dnf-plugin-versionlock'.format(py=3 if six.PY3 else 2) version_lock = None try: From aaadc9beae4d5f736c1d1d9302dfc28831261f62 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Fri, 4 Oct 2019 14:37:14 -0600 Subject: [PATCH 40/44] refactored test_version --- tests/integration/modules/test_pkg.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index c95f46163ece..db4b9bcdd2e7 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -29,12 +29,14 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin): @requires_system_grains def setUpClass(cls, grains): cls.ctx = {} - cls.pkg = 'htop' + cls.pkg = 'figlet' if salt.utils.platform.is_windows(): cls.pkg = 'putty' elif salt.utils.platform.is_darwin(): if int(grains['osmajorrelease']) >= 13: cls.pkg = 'wget' + elif grains['os_family'] == 'RedHat': + cls.pkg = 'units' def setUp(self): if 'refresh' not in self.ctx: @@ -340,17 +342,7 @@ def test_pkg_latest_version(self, grains): Check that pkg.latest_version returns the latest version of the uninstalled package. The package is not installed. Only the package version is checked. ''' - remove = False - if salt.utils.platform.is_windows(): - cmd_info = self.run_function('pkg.version', [self.pkg]) - remove = cmd_info != '' - else: - cmd_info = self.run_function('pkg.info_installed', [self.pkg]) - remove = cmd_info != 'ERROR: package {0} is not installed'.format(self.pkg) - - # remove package if it's installed - if remove: - self.run_function('pkg.remove', [self.pkg]) + self.run_state('pkg.removed', name=self.pkg) cmd_pkg = [] if grains['os_family'] == 'RedHat': @@ -363,7 +355,9 @@ def test_pkg_latest_version(self, grains): cmd_pkg = self.run_function('cmd.run', ['pacman -Si {0}'.format(self.pkg)]) elif grains['os_family'] == 'Suse': cmd_pkg = self.run_function('cmd.run', ['zypper info {0}'.format(self.pkg)]) + elif grains['os_family'] == 'MacOS': + cmd_pkg = self.run_function('cmd.run', ['brew info {0}'.format(self.pkg)]) else: - self.skipTest('test not configured for {}'.format(grains['os_family'])) + self.skipTest('TODO: test not configured for {}'.format(grains['os_family'])) pkg_latest = self.run_function('pkg.latest_version', [self.pkg]) self.assertIn(pkg_latest, cmd_pkg) From 5377e35c7aa99cfbb1b4017e272da3f00bcac061 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Fri, 4 Oct 2019 17:10:09 -0600 Subject: [PATCH 41/44] fixed fedora and mac tests --- tests/integration/modules/test_pkg.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index db4b9bcdd2e7..8baca3a89f51 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -15,7 +15,7 @@ requires_system_grains) # Import Salt libs -from salt.ext import six +from salt.exceptions import CommandExecutionError import salt.utils.pkg import salt.utils.platform @@ -33,8 +33,7 @@ def setUpClass(cls, grains): if salt.utils.platform.is_windows(): cls.pkg = 'putty' elif salt.utils.platform.is_darwin(): - if int(grains['osmajorrelease']) >= 13: - cls.pkg = 'wget' + cls.pkg = 'wget' if int(grains['osmajorrelease']) >= 13 else 'htop' elif grains['os_family'] == 'RedHat': cls.pkg = 'units' @@ -194,16 +193,16 @@ def hold_package(): lock_pkg = 'yum-plugin-versionlock' # get correct plugin for dnf packages following the logic in `salt.modules.yumpkg._yum` if 'fedora' in grains['os'].lower() and int(grains['osrelease']) >= 22: - lock_pkg = 'python{py}-dnf-plugin-versionlock'.format(py=3 if six.PY3 else 2) + lock_pkg = 'python3-dnf-plugin-versionlock' version_lock = None try: version_lock = self.run_function('pkg.version', [lock_pkg]) if not version_lock: self.run_function('pkg.install', [lock_pkg]) - if not version_lock: - self.skipTest('versionlock is not installed: {}'.format(version_lock)) hold_package() + except CommandExecutionError as e: + self.skipTest('versionlock plugin "{}" could not be installed: {}'.format(lock_pkg, e)) finally: if not version_lock: self.run_function('pkg.remove', [lock_pkg]) From 3e69da39ae6df9945a9c125a9be5d7c2823f3949 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Sat, 5 Oct 2019 01:58:49 -0600 Subject: [PATCH 42/44] skip until test can use default user --- tests/integration/modules/test_pkg.py | 50 +++++++++++---------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index 8baca3a89f51..de84e696c154 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -15,6 +15,7 @@ requires_system_grains) # Import Salt libs +from salt.utils import six from salt.exceptions import CommandExecutionError import salt.utils.pkg import salt.utils.platform @@ -176,38 +177,26 @@ def test_hold_unhold(self, grains): ''' test holding and unholding a package ''' - - def hold_package(): - self.run_function('pkg.install', [self.pkg]) - - hold_ret = self.run_function('pkg.hold', [self.pkg]) - self.assertIn(self.pkg, hold_ret) - self.assertTrue(hold_ret[self.pkg]['result']) - - unhold_ret = self.run_function('pkg.unhold', [self.pkg]) - self.assertIn(self.pkg, unhold_ret) - self.assertTrue(unhold_ret[self.pkg]['result']) - self.run_function('pkg.remove', [self.pkg]) - if grains['os_family'] == 'RedHat': - lock_pkg = 'yum-plugin-versionlock' # get correct plugin for dnf packages following the logic in `salt.modules.yumpkg._yum` + lock_pkg = 'yum-versionlock' if grains['osmajorrelease'] == '5' else 'yum-plugin-versionlock' if 'fedora' in grains['os'].lower() and int(grains['osrelease']) >= 22: - lock_pkg = 'python3-dnf-plugin-versionlock' - - version_lock = None - try: - version_lock = self.run_function('pkg.version', [lock_pkg]) - if not version_lock: - self.run_function('pkg.install', [lock_pkg]) - hold_package() - except CommandExecutionError as e: - self.skipTest('versionlock plugin "{}" could not be installed: {}'.format(lock_pkg, e)) - finally: - if not version_lock: - self.run_function('pkg.remove', [lock_pkg]) - else: - hold_package() + if int(grains['osmajorrelease']) >= 26: + lock_pkg = 'python{py}-dnf-plugin-versionlock'.format(py=3 if six.PY3 else 2) + else: + lock_pkg = 'python{py}-dnf-plugins-extras-versionlock'.format(py=3 if six.PY3 else '') + self.run_state('pkg.installed', name=lock_pkg) + + self.run_function('pkg.install', [self.pkg]) + + hold_ret = self.run_function('pkg.hold', [self.pkg]) + self.assertIn(self.pkg, hold_ret) + self.assertTrue(hold_ret[self.pkg]['result']) + + unhold_ret = self.run_function('pkg.unhold', [self.pkg]) + self.assertIn(self.pkg, unhold_ret) + self.assertTrue(unhold_ret[self.pkg]['result']) + self.run_function('pkg.remove', [self.pkg]) @destructiveTest @requires_salt_modules('pkg.refresh_db') @@ -355,7 +344,8 @@ def test_pkg_latest_version(self, grains): elif grains['os_family'] == 'Suse': cmd_pkg = self.run_function('cmd.run', ['zypper info {0}'.format(self.pkg)]) elif grains['os_family'] == 'MacOS': - cmd_pkg = self.run_function('cmd.run', ['brew info {0}'.format(self.pkg)]) + self.skipTest('TODO the following command needs to be run as a non-root user') + #cmd_pkg = self.run_function('cmd.run', ['brew info {0}'.format(self.pkg)]) else: self.skipTest('TODO: test not configured for {}'.format(grains['os_family'])) pkg_latest = self.run_function('pkg.latest_version', [self.pkg]) From d1d006280e63a3a5fa30f8541e2cbfad19d384c3 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Sat, 5 Oct 2019 13:29:25 -0600 Subject: [PATCH 43/44] skip test if versionlock not installed --- tests/integration/modules/test_pkg.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index de84e696c154..8dc414679410 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -16,7 +16,6 @@ # Import Salt libs from salt.utils import six -from salt.exceptions import CommandExecutionError import salt.utils.pkg import salt.utils.platform @@ -177,6 +176,7 @@ def test_hold_unhold(self, grains): ''' test holding and unholding a package ''' + ret = None if grains['os_family'] == 'RedHat': # get correct plugin for dnf packages following the logic in `salt.modules.yumpkg._yum` lock_pkg = 'yum-versionlock' if grains['osmajorrelease'] == '5' else 'yum-plugin-versionlock' @@ -185,11 +185,14 @@ def test_hold_unhold(self, grains): lock_pkg = 'python{py}-dnf-plugin-versionlock'.format(py=3 if six.PY3 else 2) else: lock_pkg = 'python{py}-dnf-plugins-extras-versionlock'.format(py=3 if six.PY3 else '') - self.run_state('pkg.installed', name=lock_pkg) + ret = self.run_state('pkg.installed', name=lock_pkg) self.run_function('pkg.install', [self.pkg]) hold_ret = self.run_function('pkg.hold', [self.pkg]) + if 'versionlock is not installed' in 'hold_ret': + self.run_function('pkg.remove', [self.pkg]) + self.skipTest('Versionlock could not be installed on this system: {}'.format(ret)) self.assertIn(self.pkg, hold_ret) self.assertTrue(hold_ret[self.pkg]['result']) From 22fe057ab9a7b29b29253c008f233199cb770974 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Sat, 5 Oct 2019 19:59:54 -0600 Subject: [PATCH 44/44] read from variable correctly --- tests/integration/modules/test_pkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py index 8dc414679410..20099215362f 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py @@ -190,7 +190,7 @@ def test_hold_unhold(self, grains): self.run_function('pkg.install', [self.pkg]) hold_ret = self.run_function('pkg.hold', [self.pkg]) - if 'versionlock is not installed' in 'hold_ret': + if 'versionlock is not installed' in hold_ret: self.run_function('pkg.remove', [self.pkg]) self.skipTest('Versionlock could not be installed on this system: {}'.format(ret)) self.assertIn(self.pkg, hold_ret)