@@ -29,96 +29,31 @@ jobs:
2929 openshift-tests :
3030 needs : distgen-check
3131 # This job only runs for '[test-all]' or '[test-openshift] pull request comments by owner, member
32- name : " OpenShift tests: ${{ matrix.version }} - ${{ matrix.context }}"
32+ name : " ${{ matrix.test_case }} tests: ${{ matrix.version }} - ${{ matrix.os_test }}"
3333 runs-on : ubuntu-20.04
3434 strategy :
3535 fail-fast : false
3636 matrix :
3737 version : [ "10", "11", "12", "13", "15" ]
3838 os_test : [ "centos7", "rhel7", "rhel8", "rhel9"]
39- include :
40- - tmt_plan : " centos7"
39+ test_case : [ "openshift-3", "openshift-4" ]
40+ exclude :
41+ - test_case : " openshift-4"
4142 os_test : " centos7"
42- context : " CentOS7 - OpenShift 3"
43- api_key : " TF_PUBLIC_API_KEY"
44- branch : " main"
45- tmt_repo : " https://github.com/sclorg/sclorg-testing-farm"
46- compose : " CentOS-7"
47- test_name : " test-openshift"
48- - tmt_plan : " rhel7-openshift-3"
49- os_test : " rhel7"
50- context : " RHEL7 - OpenShift 3"
51- compose : " RHEL-7-LatestUpdated"
52- api_key : " TF_INTERNAL_API_KEY"
53- branch : " master"
54- tmt_repo : " https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
55- test_name : " test-openshift"
56- tf_scope : " private"
57- - tmt_plan : " rhel7-openshift-4"
58- os_test : " rhel7"
59- context : " RHEL7 - OpenShift 4"
60- compose : " RHEL-7-LatestUpdated"
61- test_name : " test-openshift-4"
62- api_key : " TF_INTERNAL_API_KEY"
63- branch : " master"
64- tmt_repo : " https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
65- tf_scope : " private"
66- - tmt_plan : " rhel8-openshift-4"
43+ - test_case : " openshift-3"
6744 os_test : " rhel8"
68- context : " RHEL8 - OpenShift 4"
69- compose : " RHEL-8.6.0-Nightly"
70- test_name : " test-openshift-4"
71- api_key : " TF_INTERNAL_API_KEY"
72- branch : " master"
73- tmt_repo : " https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
74- tf_scope : " private"
75- - tmt_plan : " rhel9-openshift-4"
45+ - test_case : " openshift-3"
7646 os_test : " rhel9"
77- context : " RHEL9 - OpenShift 4"
78- compose : " RHEL-9.1.0-Nightly"
79- test_name : " test-openshift-4"
80- api_key : " TF_INTERNAL_API_KEY"
81- branch : " master"
82- tmt_repo : " https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
83- tf_scope : " private"
8447
8548 if : |
8649 github.event.issue.pull_request
8750 && (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]'))
8851 && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
8952 steps :
90- - name : Checkout repo
91- uses : actions/checkout@v2
92- with :
93- ref : " refs/pull/${{ github.event.issue.number }}/head"
94-
95- - name : Prepare needed variables
96- shell : bash
97- id : vars
98- run : |
99- dockerfile="Dockerfile.${{ matrix.os_test }}"
100- if [[ ${{ matrix.os_test }} == "centos7" ]]; then
101- dockerfile="Dockerfile"
102- fi
103- echo "::set-output name=DOCKERFILE_NAME::${dockerfile}"
104-
105- - name : Check that ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }} is present
106- id : check_dockerfile
107- uses : andstor/file-existence-action@v1
108- with :
109- files : " ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }}"
110-
111- # https://github.com/sclorg/testing-farm-as-github-action
112- - name : Schedule tests for ${{ matrix.version }} - ${{ matrix.context }}
113- id : github_action
114- if : steps.check_dockerfile.outputs.files_exists == 'true'
115- uses : sclorg/testing-farm-as-github-action@v1
53+ - uses : sclorg/tfaga-wrapper@main
11654 with :
117- api_key : ${{ secrets[matrix.api_key] }}
118- git_url : ${{ matrix.tmt_repo }}
119- git_ref : ${{ matrix.branch }}
120- tf_scope : ${{ matrix.tf_scope }}
121- tmt_plan_regex : ${{ matrix.tmt_plan }}
122- pull_request_status_name : " ${{ matrix.context }} - ${{ matrix.version }}"
123- variables : " REPO_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY;REPO_NAME=$GITHUB_REPOSITORY;PR_NUMBER=${{ github.event.issue.number }};SINGLE_VERSION=${{ matrix.version }};OS=${{ matrix.os_test }};TEST_NAME=${{ matrix.test_name }}"
124- compose : ${{ matrix.compose }}
55+ os_test : ${{ matrix.os_test }}
56+ version : ${{ matrix.version }}
57+ test_case : ${{ matrix.test_case }}
58+ public_api_key : ${{ secrets.TF_PUBLIC_API_KEY }}
59+ private_api_key : ${{ secrets.TF_INTERNAL_API_KEY }}
0 commit comments