From a77b3d590519d951c724e2dec03b4c523a057cd8 Mon Sep 17 00:00:00 2001 From: Rodolfo Olivieri Date: Mon, 14 Nov 2022 14:02:19 -0300 Subject: [PATCH] Upgrade packit.yaml config to have integration tests This pull request introduces the execution of leapp integration tests as a packit job instead of the current behavior of using a GitHub Actions to trigger the tests by a comment. Signed-off-by: Rodolfo Olivieri --- .packit.yaml | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/.packit.yaml b/.packit.yaml index e84944ace..836367ca7 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -43,3 +43,113 @@ jobs: get-current-version: # get version from spec file instead from git tag - bash -c "grep -m1 '^Version:' packaging/leapp.spec | grep -om1 '[0-9].[0-9.]**'" + + +# Base test jobs settings across PR and main. +- &tests + fmf_url: "https://gitlab.cee.redhat.com/oamg/tmt-plans" + fmf_ref: "main" + use_internal_tf: True + trigger: pull_request + +- &tests-79to84 + <<: *tests + job: tests + targets: + epel-7-x86_64: + distros: [RHEL-7.9-ZStream] + identifier: tests-79to84 + tmt_plan: "^(?!.*upgrade_plugin)(?!.*c2r)(?!.*sap)(?!.*8to9)(?!.*morf)" + tf_post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys;curl https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/repo/epel-7/group_oamg-leapp-epel-7.repo --output /etc/yum.repos.d/copr_build.repo; yum install -y leapp*master*" + +- &tests-79to84-sst + <<: *tests + job: tests + targets: + epel-7-x86_64: + distros: [RHEL-7.9-ZStream] + identifier: tests-79to84-sst + tmt_plan: "^(/plans/morf)(?!.*sap)" + tf_post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys;curl https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/repo/epel-7/group_oamg-leapp-epel-7.repo --output /etc/yum.repos.d/copr_build.repo; yum install -y leapp*master*" + env: + TARGET_RELEASE: 8.6 + +- &tests-7to8-aws + <<: *tests + job: tests + targets: + epel-7-x86_64: + distros: [RHEL-7.9-rhui] + identifier: tests-7to8-aws + tmt_plan: "^(?!.*upgrade_plugin)(?!.*c2r)(?!.*sap)(?!.*8to9)(.*e2e)" + tf_post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; echo 42; yum-config-manager --enable rhel-7-server-rhui-optional-rpms; curl https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/repo/epel-7/group_oamg-leapp-epel-7.repo --output /etc/yum.repos.d/copr_build.repo; yum install -y leapp*master*" + env: + RHUI: "aws" + +- &tests-79to86 + <<: *tests + job: tests + targets: + epel-7-x86_64: + distros: [RHEL-7.9-ZStream] + identifier: tests-79to86 + tmt_plan: "^(?!.*upgrade_plugin)(?!.*c2r)(?!.*sap)(?!.*8to9)(?!.*morf)" + tf_post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys;curl https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/repo/epel-7/group_oamg-leapp-epel-7.repo --output /etc/yum.repos.d/copr_build.repo; yum install -y leapp*master*" + env: + TARGET_RELEASE: 8.6 + +- &tests-8to9-aws + <<: *tests + job: tests + targets: + epel-8-x86_64: + distros: [RHEL-8.6-rhui] + identifier: tests-8to9-aws + tmt_plan: "^(?!.*upgrade_plugin)(?!.*c2r)(?!.*sap)(?!.*7to8)(.*e2e)" + tf_post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; curl https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/repo/epel-8/group_oamg-leapp-epel-8.repo --output /etc/yum.repos.d/copr_build.repo; yum install -y leapp*master*" + env: + RHUI: aws + +- &tests-86to90 + <<: *tests + job: tests + targets: + epel-8-x86_64: + distros: [RHEL-8.6.0-Nightly] + identifier: tests-86to90 + tmt_plan: "^(?!.*upgrade_plugin)(?!.*c2r)(?!.*sap)(?!.*7to8)(?!.*morf)" + tf_post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; curl https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/repo/epel-8/group_oamg-leapp-epel-8.repo --output /etc/yum.repos.d/copr_build.repo; yum install -y leapp*master*" + env: + TARGET_RELEASE: "9.0" + TARGET_KERNEL: el9 + RHSM_REPOS: rhel-8-for-x86_64-appstream-rpms,rhel-8-for-x86_64-baseos-rpms + +- &tests-86to90-sst + <<: *tests + job: tests + targets: + epel-8-x86_64: + distros: [RHEL-8.6.0-Nightly] + identifier: tests-86to90-sst + tmt_plan: "^(/plans/morf)(?!.*sap)" + tf_post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; curl https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/repo/epel-8/group_oamg-leapp-epel-8.repo --output /etc/yum.repos.d/copr_build.repo; yum install -y leapp*master*" + env: + TARGET_RELEASE: "9.0" + TARGET_KERNEL: el9 + RHSM_REPOS: rhel-8-for-x86_64-appstream-rpms,rhel-8-for-x86_64-baseos-rpms + +- &tests-87to91 + <<: *tests + job: tests + targets: + epel-8-x86_64: + distros: [RHEL-8.7.0-Nightly] + identifier: tests-87to91 + tmt_plan: "^(?!.*upgrade_plugin)(?!.*c2r)(?!.*sap)(?!.*7to8)(?!.*morf)" + tf_post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; curl https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/repo/epel-8/group_oamg-leapp-epel-8.repo --output /etc/yum.repos.d/copr_build.repo; yum install -y leapp*master*" + env: + LEAPP_DEVEL_TARGET_PRODUCT_TYPE: beta + RHSM_SKU: RH00069 + TARGET_RELEASE: "9.1" + TARGET_KERNEL: el9 + RHSM_REPOS: rhel-8-for-x86_64-appstream-rpms,rhel-8-for-x86_64-baseos-rpms