From 704acb797eb1981217448714d85e3eb2f9c9f9f8 Mon Sep 17 00:00:00 2001 From: Ondrej Mular Date: Fri, 3 Apr 2020 15:14:10 +0200 Subject: [PATCH] Enable gating --- gating.yaml | 14 +++++++++++++ pcs.spec | 5 ++++- tests/tests.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 gating.yaml create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..9dc1f4c --- /dev/null +++ b/gating.yaml @@ -0,0 +1,14 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/pcs.spec b/pcs.spec index 3134566..b314035 100644 --- a/pcs.spec +++ b/pcs.spec @@ -1,6 +1,6 @@ Name: pcs Version: 0.10.5 -Release: 2%{?dist} +Release: 3%{?dist} # https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses # GPLv2: pcs # ASL 2.0: tornado @@ -449,6 +449,9 @@ remove_all_tests %license pyagentx_LICENSE.txt %changelog +* Fri Apr 03 2020 Ondrej Mular - 0.10.5-3 +- Enable gating + * Fri Mar 27 2020 Ondrej Mular - 0.10.5-2 - Remove usage of deprecated module xml.etree.cElementTree - Resolves: rhbz#1817695 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..4987543 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,54 @@ +- hosts: localhost + tags: + - classic + vars: + # standard-test-basic directory for tests are relative to {{ tenv_workdir }} + tenv_workdir: /var/test + pre_tasks: + - import_role: + name: standard-test-source + vars: + fetch_only: True + - name: Copy files including source to test environment + synchronize: + src: "{{ playbook_dir }}/.." + dest: "{{ tenv_workdir }}" + mode: push + ssh_args: "-o UserKnownHostsFile=/dev/null" + + roles: + # roles documentation: + # https://pagure.io/standard-test-roles/blob/master/f/roles/standard-test-source + - role: standard-test-basic + required_packages: + - autoconf + - automake + - make + - rpm-build + - git + - booth-site + - fence-agents-apc + - fence-agents-ipmilan + - fence-agents-scsi + - fence-virt + - pcs + - pcs-snmp + required_services: + - pcsd + tests: + # dir: . -> dot means tests dir in distgit + - prepare-source: + dir: ./ + run: rpmbuild -bp {{tenv_workdir}}/*.spec --nodeps --define "_sourcedir {{tenv_workdir}}" --define "_builddir {{tenv_workdir}}/source" + - flatten-source: + dir: ./ + run: shopt -s dotglob; mv {{tenv_workdir}}/source/*/* {{tenv_workdir}}/source + - remove_sources: + dir: ./source + run: rm -rfv pcs + - run_upstream_tests: + dir: ./source + run: pcs_test/suite.py -v --vanilla --installed + - run_smoke_tests: + dir: ./source + run: pcs_test/smoke.sh