From 9e95311904fb90615e8473cc8bf96c2d544f8428 Mon Sep 17 00:00:00 2001 From: Inessa Vasilevskaya Date: Wed, 30 Mar 2022 11:46:30 +0200 Subject: [PATCH 04/39] Switch to the official composite action for tft Looks like phracek's github action is mature enough https://github.com/sclorg/testing-farm-as-github-action to perform that switch. Status update enablement is not part of this patch. In order to enable wait-for-result functionality the single tmt-tests workflow will have to be split into 2 distinct 7to8 and 8to9 workflows (to be done in following commits). This will cause massive refactoring, probably involving moving artifacts preparation into one workflow and creating a specific repository_dispatch event to trigger 7to8 and 8to9 with test artifacts as inputs. OAMG-6493 --- .github/workflows/tmt-tests.yml | 46 ++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tmt-tests.yml b/.github/workflows/tmt-tests.yml index 15e8a488..5cf21e0b 100644 --- a/.github/workflows/tmt-tests.yml +++ b/.github/workflows/tmt-tests.yml @@ -140,37 +140,53 @@ jobs: id: run_test_7to8 env: ARTIFACTS: ${{ steps.leapp_pr_regex_match.outputs.match != '' && format('{0},{1}', steps.copr_build_leapp.outputs.copr_id, steps.copr_build.outputs.copr_id) || steps.copr_build.outputs.copr_id }} - uses: oamg/testing-farm-service-action@main + uses: sclorg/testing-farm-as-github-action@v1.2.9 with: # required - tft_server: ${{ secrets.TF_ENDPOINT }} - tft_token: ${{ secrets.TF_API_KEY }} - compose: ${{ secrets.COMPOSE_RHEL79 }} - artifacts: ${{ env.ARTIFACTS }} + api_url: ${{ secrets.TF_ENDPOINT }} + api_key: ${{ secrets.TF_API_KEY }} + git_url: 'https://gitlab.cee.redhat.com/oamg/tmt-plans' + github_token: ${{ secrets.GITHUB_TOKEN }} # optional - tests_regex: "^(?!.*c2r)(?!.*sap)(?!.*8to9)" + tf_scope: 'private' + tmt_plan_regex: "^(?!.*c2r)(?!.*sap)(?!.*8to9)" + compose: ${{ secrets.COMPOSE_RHEL79 }} arch: 'x86_64' copr: 'epel-7-x86_64' + copr_artifacts: ${{ env.ARTIFACTS }} debug: ${{ secrets.ACTIONS_STEP_DEBUG }} - test_name: '7to8' tmt_context: 'distro=rhel-7' + pull_request_status_name: '7to8' + create_issue_comment: 'true' + # NOTE(ivasilev) In order to update pr status this workflow has to be massively refactored with artifacts + # preparation moved out to a different workflow and the rest split into 2 workflows - 7to8 and 8to9 that are + # triggered on a specific repository dispatch event. + update_pull_request_status: 'false' - name: Schedule regression testing for 8to9 id: run_test_8to9 env: ARTIFACTS: ${{ steps.leapp_pr_regex_match.outputs.match != '' && format('{0},{1}', steps.copr_build_leapp.outputs.copr_id, steps.copr_build.outputs.copr_id) || steps.copr_build.outputs.copr_id }} - uses: oamg/testing-farm-service-action@main + uses: sclorg/testing-farm-as-github-action@v1.2.9 with: # required - tft_server: ${{ secrets.TF_ENDPOINT }} - tft_token: ${{ secrets.TF_API_KEY }} - compose: ${{ secrets.COMPOSE_RHEL86 }} - artifacts: ${{ env.ARTIFACTS }} + api_url: ${{ secrets.TF_ENDPOINT }} + api_key: ${{ secrets.TF_API_KEY }} + git_url: 'https://gitlab.cee.redhat.com/oamg/tmt-plans' + github_token: ${{ secrets.GITHUB_TOKEN }} # optional - tests_regex: "^(?!.*c2r)(?!.*sap)(?!.*7to8)" + tf_scope: 'private' + tmt_plan_regex: "^(?!.*c2r)(?!.*sap)(?!.*7to8)" + compose: ${{ secrets.COMPOSE_RHEL86 }} arch: 'x86_64' copr: 'epel-8-x86_64' + copr_artifacts: ${{ env.ARTIFACTS }} debug: ${{ secrets.ACTIONS_STEP_DEBUG }} - test_name: '8to9' - env_vars: 'TARGET_RELEASE=9.0;TARGET_KERNEL=el9;RHSM_SKU=RH00069;RHSM_REPOS=rhel-8-for-x86_64-appstream-beta-rpms,rhel-8-for-x86_64-baseos-beta-rpms;LEAPP_EXEC_ENV_VARS=LEAPP_DEVEL_TARGET_PRODUCT_TYPE=beta' + variables: 'TARGET_RELEASE=9.0;TARGET_KERNEL=el9;RHSM_SKU=RH00069;RHSM_REPOS=rhel-8-for-x86_64-appstream-beta-rpms,rhel-8-for-x86_64-baseos-beta-rpms;LEAPP_EXEC_ENV_VARS=LEAPP_DEVEL_TARGET_PRODUCT_TYPE=beta' tmt_context: 'distro=rhel-8' + pull_request_status_name: '8to9' + create_issue_comment: 'true' + # NOTE(ivasilev) In order to update pr status this workflow has to be massively refactored with artifacts + # preparation moved out to a different workflow and the rest split into 2 workflows - 7to8 and 8to9 that are + # triggered on a specific repository dispatch event. + update_pull_request_status: 'false' -- 2.35.3