diff --git a/config/Dockerfiles/singlehost-test/verify-rpm.sh b/config/Dockerfiles/singlehost-test/verify-rpm.sh index e71250d8..2ed91b5c 100755 --- a/config/Dockerfiles/singlehost-test/verify-rpm.sh +++ b/config/Dockerfiles/singlehost-test/verify-rpm.sh @@ -11,6 +11,9 @@ if [ -z "${TEST_SUBJECTS}" ]; then exit 1 fi +export TEST_ARTIFACTS=$(pwd)/logs +mkdir -p ${TEST_ARTIFACTS} + yum update -y standard-test-roles rpm -q standard-test-roles @@ -24,5 +27,6 @@ set -u ansible-playbook -v --inventory=${ANSIBLE_INVENTORY} ${PYTHON_INTERPRETER} \ --extra-vars "subjects=${TEST_SUBJECTS}" \ + --extra-vars "artifacts=$TEST_ARTIFACTS" \ --extra-vars "rpm_repo=${rpm_repo}" \ - /tmp/rpm-verify.yml + /tmp/rpm-verify.yml | tee $(pwd)/logs/rpm-verify-out.txt diff --git a/upstream-fedora-pipeline/AllPackagePipelineStageTrigger b/upstream-fedora-pipeline/AllPackagePipelineStageTrigger index 8f959946..c0133f39 100644 --- a/upstream-fedora-pipeline/AllPackagePipelineStageTrigger +++ b/upstream-fedora-pipeline/AllPackagePipelineStageTrigger @@ -19,9 +19,7 @@ tagMap = [:] // Initialize tagMap['jenkins-continuous-infra-slave'] = STABLE_LABEL tagMap['rpmbuild'] = STABLE_LABEL -tagMap['inquirer'] = STABLE_LABEL tagMap['cloud-image-compose'] = STABLE_LABEL -tagMap['ostree-boot-image'] = STABLE_LABEL tagMap['singlehost-test'] = STABLE_LABEL // Fedora Fedmsg Message Provider for stage @@ -35,7 +33,7 @@ IRC_CHANNEL = "#contra-ci-cd" CANNED_CI_MESSAGES = [:] CANNED_CI_MESSAGES['f26'] = '{"commit":{"username":"zdohnal","stats":{"files":{"README.patches":{"deletions":0,"additions":30,"lines":30},"sources":{"deletions":1,"additions":1,"lines":2},"vim.spec":{"deletions":7,"additions":19,"lines":26},".gitignore":{"deletions":0,"additions":1,"lines":1},"vim-8.0-rhbz1365258.patch":{"deletions":0,"additions":12,"lines":12}},"total":{"deletions":8,"files":5,"additions":63,"lines":71}},"name":"Zdenek Dohnal","rev":"3ff427e02625f810a2cedb754342be44d6161b39","namespace":"rpms","agent":"zdohnal","summary":"Merge branch f25 into f26","repo":"vim","branch":"f26","seen":false,"path":"/srv/git/repositories/rpms/vim.git","message":"Merge branch \'f25\' into f26\n","email":"zdohnal@redhat.com"},"topic":"org.fedoraproject.prod.git.receive"}' CANNED_CI_MESSAGES['f27'] = '{"commit":{"username":"adrian","stats":{"files":{"criu.spec":{"deletions":0,"additions":5,"lines":5}},"total":{"deletions":0,"files":1,"additions":5,"lines":5}},"name":"Adrian Reber","rev":"386bedee49cb887626140f2c60522751ec620f1d","namespace":"rpms","agent":"adrian","summary":"Adapt ExcludeArch depending on Fedora release","repo":"criu","branch":"f27","seen":false,"path":"/srv/git/repositories/rpms/criu.git","message":"Adapt ExcludeArch depending on Fedora release\\n","email":"adrian@lisas.de"},"topic":"org.fedoraproject.prod.git.receive"}' -CANNED_CI_MESSAGES['rawhide-pr'] = '{"pullrequest":{"status":"Merged","last_updated":"1524659973","branch_from":"add-tests","uid":"b514cb3616f748e6a0be0d7f3b39ce92","commit_stop":"3b793699117e41a794904eeebf4face081300fe2","initial_comment":null,"title":"Add CI tests using the standard test interface","comments":[{"comment":"### Justification\\r\\nAdds tests according to the [CI wiki](https://fedoraproject.org/wiki/CI) specifically the standard test interface in the [spec](https://fedoraproject.org/wiki/Changes/InvokingTests).\\r\\n\\r\\nThe playbook includes Tier1 level test cases that have been tested in the following contexts and is passing reliably: **Classic** and **Container**. Test logs are stored in the artifacts directory.\\r\\n\\r\\nThe following steps are used to execute the tests using the standard test interface:\\r\\n

\\r\\n### Test environment\\r\\nMake sure you have installed packages from the [spec](https://fedoraproject.org/wiki/Changes/InvokingTests)\\r\\n```sh\\r\\n$ rpm -q ansible python2-dnf libselinux-python standard-test-roles\\r\\nansible-2.3.2.0-1.fc26.noarch\\r\\npython2-dnf-2.6.3-11.fc26.noarch\\r\\nlibselinux-python-2.6-7.fc26.x86_64\\r\\nstandard-test-roles-2.4-1.fc26.noarch\\r\\n```\\r\\n

\\r\\n#### Clone tests to your PC\\r\\n```sh\\r\\n$ git clone git://fedorapeople.org/~sturivny/chkconfig\\r\\n$ cd chkconfig/\\r\\n```\\r\\n

\\r\\n### Run tests for **Classic**\\r\\nAll test should be run under the __root__\\r\\n```sh\\r\\n# tests/\\r\\n# sudo ansible-playbook --tags=classic tests.yml\\r\\n```\\r\\n\\r\\nSnip of the example test run:\\r\\n```\\r\\nTASK [standard-test-beakerlib : Copy tests to test environment] ***********************************************************************************************************************\\r\\nchanged: [localhost]\\r\\n\\r\\nTASK [standard-test-beakerlib : Fix up beakerlib at tests environment] ****************************************************************************************************************\\r\\nchanged: [localhost]\\r\\n\\r\\nTASK [standard-test-beakerlib : Run beakerlib tests] **********************************************************************************************************************************\\r\\nchanged: [localhost] => (item=alternatives-doesn-t-update-slave-links-with)\\r\\nchanged: [localhost] => (item=backport-family-option-from-upstream)\\r\\nchanged: [localhost] => (item=chkconfig-prioritory-set-inconsistently)\\r\\n\\r\\nTASK [standard-test-beakerlib : Make the master tests summary log artifact] ***********************************************************************************************************\\r\\nchanged: [localhost] => (item=alternatives-doesn-t-update-slave-links-with)\\r\\nchanged: [localhost] => (item=backport-family-option-from-upstream)\\r\\nchanged: [localhost] => (item=chkconfig-prioritory-set-inconsistently)\\r\\n\\r\\nTASK [standard-test-beakerlib : include_role] *****************************************************************************************************************************************\\r\\n\\r\\nTASK [str-common : Pull out the logs from test environment to test runner] ************************************************************************************************************\\r\\nchanged: [localhost]\\r\\n\\r\\nTASK [standard-test-beakerlib : Check the results] ************************************************************************************************************************************\\r\\nchanged: [localhost]\\r\\n\\r\\nPLAY RECAP ****************************************************************************************************************************************************************************\\r\\nlocalhost : ok=27 changed=12 unreachable=0 failed=0 \\r\\n```\\r\\n

\\r\\n### Run tests for **Container**\\r\\nAll test should be run under the __root__\\r\\n```sh\\r\\n# export ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory)\\r\\n# export TEST_SUBJECTS=docker:docker.io/library/fedora:27\\r\\n# ansible-playbook --tags=container tests.yml\\r\\n\\r\\n```\\r\\n\\r\\nSnip of the example test run:\\r\\n```\\r\\nTASK [standard-test-beakerlib : Copy tests to test environment] ***********************************************************************************************************************\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57]\\r\\n\\r\\nTASK [standard-test-beakerlib : Fix up beakerlib at tests environment] ****************************************************************************************************************\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57]\\r\\n\\r\\nTASK [standard-test-beakerlib : Run beakerlib tests] **********************************************************************************************************************************\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57] => (item=alternatives-doesn-t-update-slave-links-with)\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57] => (item=backport-family-option-from-upstream)\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57] => (item=chkconfig-prioritory-set-inconsistently)\\r\\n\\r\\nTASK [standard-test-beakerlib : Make the master tests summary log artifact] ***********************************************************************************************************\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57] => (item=alternatives-doesn-t-update-slave-links-with)\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57] => (item=backport-family-option-from-upstream)\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57] => (item=chkconfig-prioritory-set-inconsistently)\\r\\n\\r\\nTASK [standard-test-beakerlib : include_role] *****************************************************************************************************************************************\\r\\n\\r\\nTASK [str-common : Pull out the logs from test environment to test runner] ************************************************************************************************************\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57]\\r\\n\\r\\nTASK [standard-test-beakerlib : Check the results] ************************************************************************************************************************************\\r\\nchanged: [aa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57]\\r\\n\\r\\nPLAY RECAP ****************************************************************************************************************************************************************************\\r\\naa5577642fd241220d14038efebd9f50efb912bbcd77e217dc65c69074db4f57 : ok=27 changed=16 unreachable=0 failed=0 \\r\\n```\\r\\n\\r\\n

\\r\\n### Notes\\r\\nTests will be enabled in CI, yet gating is currently disabled, so nothing will change. Tests will run on each dist-git commit, they are not triggered by koji builds and if you are using FMN, it should notify you of failures normally.\\r\\n\\r\\nThe RH QE maintainer contact in case you have questions: Martin Cermak \\r\\nThe idea is that these tests become yours just as you\'re maintaining the package, there will, of course, be people around if you have questions or troubles.","parent":null,"notification":false,"tree":null,"filename":null,"edited_on":null,"editor":null,"date_created":"1523014904","commit":null,"line":null,"id":8911,"user":{"fullname":"Serhii Turivnyi","name":"sturivny"}},{"comment":"Pull-Request has been merged by lnykryn","parent":null,"notification":true,"tree":null,"filename":null,"edited_on":null,"editor":null,"date_created":"1524659973","commit":null,"line":null,"id":9735,"user":{"fullname":"Lukáš Nykrýn","name":"lnykryn"}}],"id":2,"project":{"custom_keys":[],"description":"The chkconfig rpms","parent":null,"date_modified":"1507634625","access_users":{"admin":["jsynacek","msekleta"],"commit":[],"ticket":[],"owner":["lnykryn"]},"namespace":"rpms","url_path":"rpms/chkconfig","priorities":{},"id":1686,"access_groups":{"admin":[],"commit":[],"ticket":[]},"milestones":{},"user":{"fullname":"Lukáš Nykrýn","name":"lnykryn"},"date_created":"1501866676","fullname":"rpms/chkconfig","settings":{"issues_default_to_private":false,"Minimum_score_to_merge_pull-request":-1,"pull_request_access_only":false,"Web-hooks":null,"fedmsg_notifications":true,"always_merge":false,"project_documentation":false,"Enforce_signed-off_commits_in_pull-request":false,"pull_requests":true,"Only_assignee_can_merge_pull-request":false,"issue_tracker":true},"close_status":[],"tags":[],"name":"chkconfig"},"assignee":null,"repo_from":null,"updated_on":"1523014902","commit_start":"3b793699117e41a794904eeebf4face081300fe2","branch":"master","date_created":"1523014902","closed_at":"1524659973","remote_git":"git://fedorapeople.org/~sturivny/chkconfig","closed_by":{"fullname":"Lukáš Nykrýn","name":"lnykryn"},"user":{"fullname":"Serhii Turivnyi","name":"sturivny"}},"agent":"lnykryn","topic":"org.fedoraproject.prod.pagure.pull-request.comment.added"}' +CANNED_CI_MESSAGES['rawhide-pr'] = '{"pullrequest":{"status":"Open","last_updated":"1531213549","branch_from":"tests","uid":"9df5133a51e348ae9a7d5b0f3f371567","commit_stop":"d35a0b2b165ffe45657c3478523a6840bc9ac828","initial_comment":"justification\\r\\nAdds tests according to the CI wiki specifically the standard test interface in the spec.\\r\\nThe playbook includes Tier1 level test cases that have been tested in the following contexts and\\r\\nis passing reliably: Classic. Test logs are stored in the artifacts directory.\\r\\nThe following steps are used to execute the tests using the standard test interface:\\r\\n\\r\\nTest enveronment\\r\\nMake sure you have installed packages from the spec\\r\\n```\\r\\nansible-2.4.1.0-2.fc28.noarch\\r\\npython2-dnf-2.7.5-1.fc28.noarch\\r\\nlibselinux-python-2.7-2.fc28.x86_64\\r\\nstandard-test-roles-2.5-1.fc28.noarch\\r\\n```\\r\\nRun tests for Classic\\r\\nSnip of the example test run for Classic tests:\\r\\n\\r\\n```\\r\\nbridge-utils-1.6-1.fc28.x86_64\\r\\n:: [ 14:32:30 ] :: [ PASS ] :: Checking for the presence of bridge-utils rpm\\r\\n:: [ 14:32:30 ] :: [ PASS ] :: Checking for the presence of bridge-utils rpm\\r\\n:: [ 14:32:30 ] :: [ LOG ] :: Package versions:\\r\\n:: [ 14:32:30 ] :: [ LOG ] :: Package versions:\\r\\n:: [ 14:32:30 ] :: [ LOG ] :: bridge-utils-1.6-1.fc28.x86_64\\r\\n:: [ 14:32:30 ] :: [ LOG ] :: bridge-utils-1.6-1.fc28.x86_64\\r\\n:: [ 14:32:30 ] :: [ BEGIN ] :: Running \'cp bridge-utils-tests.py /usr/bin\'\\r\\n:: [ 14:32:30 ] :: [ PASS ] :: Command \'cp bridge-utils-tests.py /usr/bin\' (Expected 0, got 0)\\r\\n:: [ 14:32:30 ] :: [ PASS ] :: Command \'cp bridge-utils-tests.py /usr/bin\' (Expected 0, got 0)\\r\\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\r\\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\r\\n:: Duration: 1s\\r\\n:: Duration: 1s\\r\\n:: Assertions: 2 good, 0 bad\\r\\n:: Assertions: 2 good, 0 bad\\r\\n:: RESULT: PASS\\r\\n\\r\\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\r\\n\\r\\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\r\\n:: Test\\r\\n:: Test\\r\\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\r\\n\\r\\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\r\\n\\r\\n:: [ 14:32:30 ] :: [ LOG ] :: bridge-utils tests\\r\\n:: [ 14:32:30 ] :: [ LOG ] :: bridge-utils tests\\r\\n:: [ 14:32:30 ] :: [ BEGIN ] :: Running \'/usr/bin/python3 /usr/bin/bridge-utils-tests.py\'\\r\\ntest_add_bridge (__main__.IPLinkSetDevTests) ... ok\\r\\ntest_add_slave (__main__.IPLinkSetDevTests) ... ok\\r\\n\\r\\n----------------------------------------------------------------------\\r\\nRan 2 tests in 0.115s\\r\\n\\r\\nOK\\r\\n```","title":"Adds tests according to the CI","comments":[],"id":1,"project":{"custom_keys":[],"description":"The bridge-utils rpms","parent":null,"date_modified":"1501866498","access_users":{"admin":[],"commit":["twoerner"],"ticket":[],"owner":["dwmw2"]},"namespace":"rpms","url_path":"rpms/bridge-utils","priorities":{},"id":1407,"access_groups":{"admin":[],"commit":[],"ticket":[]},"milestones":{},"user":{"fullname":"dwmw2","name":"dwmw2"},"date_created":"1501866498","fullname":"rpms/bridge-utils","settings":{"issues_default_to_private":false,"Minimum_score_to_merge_pull-request":-1,"pull_request_access_only":false,"stomp_notifications":true,"Web-hooks":null,"fedmsg_notifications":true,"always_merge":false,"project_documentation":false,"Enforce_signed-off_commits_in_pull-request":false,"notify_on_commit_flag":false,"notify_on_pull-request_flag":false,"roadmap_on_issues_page":false,"pull_requests":true,"Only_assignee_can_merge_pull-request":false,"issue_tracker":true},"close_status":[],"tags":[],"name":"bridge-utils"},"assignee":null,"repo_from":{"custom_keys":[],"description":"The bridge-utils rpms","parent":{"custom_keys":[],"description":"The bridge-utils rpms","parent":null,"date_modified":"1501866498","access_users":{"admin":[],"commit":["twoerner"],"ticket":[],"owner":["dwmw2"]},"namespace":"rpms","url_path":"rpms/bridge-utils","priorities":{},"id":1407,"access_groups":{"admin":[],"commit":[],"ticket":[]},"milestones":{},"user":{"fullname":"dwmw2","name":"dwmw2"},"date_created":"1501866498","fullname":"rpms/bridge-utils","settings":{"issues_default_to_private":false,"Minimum_score_to_merge_pull-request":-1,"pull_request_access_only":false,"stomp_notifications":true,"Web-hooks":null,"fedmsg_notifications":true,"always_merge":false,"project_documentation":false,"Enforce_signed-off_commits_in_pull-request":false,"notify_on_commit_flag":false,"notify_on_pull-request_flag":false,"roadmap_on_issues_page":false,"pull_requests":true,"Only_assignee_can_merge_pull-request":false,"issue_tracker":true},"close_status":[],"tags":[],"name":"bridge-utils"},"date_modified":"1531141462","access_users":{"admin":[],"commit":[],"ticket":[],"owner":["ssahani"]},"namespace":"rpms","url_path":"fork/ssahani/rpms/bridge-utils","priorities":{},"id":31342,"access_groups":{"admin":[],"commit":[],"ticket":[]},"milestones":{},"user":{"fullname":"Susant Sahani","name":"ssahani"},"date_created":"1531141462","fullname":"forks/ssahani/rpms/bridge-utils","settings":{"issues_default_to_private":false,"Minimum_score_to_merge_pull-request":-1,"pull_request_access_only":false,"stomp_notifications":true,"Web-hooks":null,"fedmsg_notifications":true,"always_merge":false,"project_documentation":false,"Enforce_signed-off_commits_in_pull-request":false,"notify_on_commit_flag":false,"notify_on_pull-request_flag":false,"roadmap_on_issues_page":false,"pull_requests":false,"Only_assignee_can_merge_pull-request":false,"issue_tracker":false},"close_status":[],"tags":[],"name":"bridge-utils"},"cached_merge_status":"unknown","updated_on":"1531213549","commit_start":"d35a0b2b165ffe45657c3478523a6840bc9ac828","branch":"master","date_created":"1531213549","closed_at":null,"remote_git":null,"closed_by":null,"user":{"fullname":"Susant Sahani","name":"ssahani"}},"agent":"ssahani","topic":"org.fedoraproject.prod.pagure.pull-request.new"}' library identifier: "ci-pipeline@master", retriever: modernSCM([$class: 'GitSCMSource', @@ -208,12 +206,8 @@ pipeline { value: tagMap['jenkins-continuous-infra-slave']), string(name: 'RPMBUILD_TAG', value: tagMap['rpmbuild']), - string(name: 'INQUIRER_TAG', - value: tagMap['inquirer']), string(name: 'CLOUD_IMAGE_COMPOSE_TAG', value: tagMap['cloud-image-compose']), - string(name: 'OSTREE_BOOT_IMAGE_TAG', - value: tagMap['ostree-boot-image']), string(name: 'SINGLEHOST_TEST_TAG', value: tagMap['singlehost-test']) ],