Skip to content

Commit ad066cb

Browse files
authored
Merge pull request #172 from yih-redhat/fix-rhel96-test
ci: improve test scripts and fix bugs
2 parents 0a3d53f + 2047d10 commit ad066cb

4 files changed

Lines changed: 97 additions & 61 deletions

File tree

.github/workflows/comment-ci.yaml

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,27 @@ jobs:
1111
if: ${{ github.event.issue.pull_request &&
1212
(endsWith(github.event.comment.body, '/test')) }}
1313
steps:
14+
- name: Get information for pull request
15+
uses: octokit/request-action@v2.x
16+
id: pr-api
17+
with:
18+
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1421
- name: Query author repository permissions
1522
uses: octokit/request-action@v2.x
1623
id: user_permission
1724
with:
1825
route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}/permission
1926
env:
2027
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
2228
- name: Check if user does have correct permissions
2329
if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission)
2430
id: check_user_perm
2531
run: |
2632
echo "User '${{ github.event.sender.login }}' has permission '${{ fromJson(steps.user_permission.outputs.data).permission }}' allowed values: 'admin', 'write'"
2733
echo "allowed_user=true" >> $GITHUB_OUTPUT
2834
29-
- name: Get information for pull request
30-
uses: octokit/request-action@v2.x
31-
id: pr-api
32-
with:
33-
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
3735
outputs:
3836
allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }}
3937
sha: ${{ fromJson(steps.pr-api.outputs.data).head.sha }}
@@ -63,7 +61,7 @@ jobs:
6361
timeout: 90
6462
secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }}"
6563

66-
fedora-43-bootc:
64+
fedora-44-bootc:
6765
needs: check-pull-request
6866
if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
6967
continue-on-error: true
@@ -73,13 +71,13 @@ jobs:
7371
- name: Run the tests
7472
uses: sclorg/testing-farm-as-github-action@v3.1.2
7573
with:
76-
compose: Fedora-43
74+
compose: Fedora-44
7775
api_key: ${{ secrets.TF_API_KEY }}
7876
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
7977
git_ref: ${{ needs.check-pull-request.outputs.ref }}
8078
update_pull_request_status: true
81-
pull_request_status_name: fedora-43-bootc
82-
tmt_context: "arch=x86_64;distro=fedora-43"
79+
pull_request_status_name: fedora-44-bootc
80+
tmt_context: "arch=x86_64;distro=fedora-44"
8381
tmt_plan_regex: bootc
8482
tf_scope: private
8583
variables: "ARCH=x86_64"
@@ -133,28 +131,29 @@ jobs:
133131
# timeout: 90
134132
# secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }}"
135133

136-
rhel-9-8-ostree:
137-
needs: check-pull-request
138-
if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
139-
continue-on-error: true
140-
runs-on: ubuntu-latest
134+
# TODO: uncomment once fix https://github.com/osbuild/images/pull/2251 is landed in RHEL9.8
135+
# rhel-9-8-ostree:
136+
# needs: check-pull-request
137+
# if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
138+
# continue-on-error: true
139+
# runs-on: ubuntu-latest
141140

142-
steps:
143-
- name: Run the tests
144-
uses: sclorg/testing-farm-as-github-action@v3.1.2
145-
with:
146-
compose: RHEL-9.8.0-Nightly
147-
api_key: ${{ secrets.TF_API_KEY }}
148-
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
149-
git_ref: ${{ needs.check-pull-request.outputs.ref }}
150-
update_pull_request_status: true
151-
pull_request_status_name: rhel-9-8-ostree
152-
tmt_context: "arch=x86_64;distro=rhel-9-8"
153-
tmt_plan_regex: ostree
154-
tf_scope: private
155-
variables: "ARCH=x86_64"
156-
timeout: 90
157-
secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }}"
141+
# steps:
142+
# - name: Run the tests
143+
# uses: sclorg/testing-farm-as-github-action@v3.1.2
144+
# with:
145+
# compose: RHEL-9.8.0-Nightly
146+
# api_key: ${{ secrets.TF_API_KEY }}
147+
# git_url: ${{ needs.check-pull-request.outputs.repo_url }}
148+
# git_ref: ${{ needs.check-pull-request.outputs.ref }}
149+
# update_pull_request_status: true
150+
# pull_request_status_name: rhel-9.8-ostree
151+
# tmt_context: "arch=x86_64;distro=rhel-9-8"
152+
# tmt_plan_regex: ostree
153+
# tf_scope: private
154+
# variables: "ARCH=x86_64"
155+
# timeout: 90
156+
# secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }}"
158157

159158
rhel-10-2-bootc:
160159
needs: check-pull-request
@@ -171,7 +170,7 @@ jobs:
171170
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
172171
git_ref: ${{ needs.check-pull-request.outputs.ref }}
173172
update_pull_request_status: true
174-
pull_request_status_name: rhel-10-2-bootc
173+
pull_request_status_name: rhel-10.2-bootc
175174
tmt_context: "arch=x86_64;distro=rhel-10-2"
176175
tmt_plan_regex: bootc
177176
tf_scope: private

.github/workflows/greenboot-ci.yaml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
timeout: 90
6262
secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }}"
6363

64-
fedora-43-bootc:
64+
fedora-44-bootc:
6565
needs: check-pull-request
6666
if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
6767
continue-on-error: true
@@ -71,13 +71,13 @@ jobs:
7171
- name: Run the tests
7272
uses: sclorg/testing-farm-as-github-action@v3.1.2
7373
with:
74-
compose: Fedora-43
74+
compose: Fedora-44
7575
api_key: ${{ secrets.TF_API_KEY }}
7676
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
7777
git_ref: ${{ needs.check-pull-request.outputs.ref }}
7878
update_pull_request_status: true
79-
pull_request_status_name: fedora-43-bootc
80-
tmt_context: "arch=x86_64;distro=fedora-43"
79+
pull_request_status_name: fedora-44-bootc
80+
tmt_context: "arch=x86_64;distro=fedora-44"
8181
tmt_plan_regex: bootc
8282
tf_scope: private
8383
variables: "ARCH=x86_64"
@@ -131,28 +131,29 @@ jobs:
131131
# timeout: 90
132132
# secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }}"
133133

134-
rhel-9-8-ostree:
135-
needs: check-pull-request
136-
if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
137-
continue-on-error: true
138-
runs-on: ubuntu-latest
134+
# TODO: uncomment once fix https://github.com/osbuild/images/pull/2251 is landed in RHEL9.8
135+
# rhel-9-8-ostree:
136+
# needs: check-pull-request
137+
# if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
138+
# continue-on-error: true
139+
# runs-on: ubuntu-latest
139140

140-
steps:
141-
- name: Run the tests
142-
uses: sclorg/testing-farm-as-github-action@v3.1.2
143-
with:
144-
compose: RHEL-9.8.0-Nightly
145-
api_key: ${{ secrets.TF_API_KEY }}
146-
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
147-
git_ref: ${{ needs.check-pull-request.outputs.ref }}
148-
update_pull_request_status: true
149-
pull_request_status_name: rhel-9-8-ostree
150-
tmt_context: "arch=x86_64;distro=rhel-9-8"
151-
tmt_plan_regex: ostree
152-
tf_scope: private
153-
variables: "ARCH=x86_64"
154-
timeout: 90
155-
secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }}"
141+
# steps:
142+
# - name: Run the tests
143+
# uses: sclorg/testing-farm-as-github-action@v3.1.2
144+
# with:
145+
# compose: RHEL-9.8.0-Nightly
146+
# api_key: ${{ secrets.TF_API_KEY }}
147+
# git_url: ${{ needs.check-pull-request.outputs.repo_url }}
148+
# git_ref: ${{ needs.check-pull-request.outputs.ref }}
149+
# update_pull_request_status: true
150+
# pull_request_status_name: rhel-9.8-ostree
151+
# tmt_context: "arch=x86_64;distro=rhel-9-8"
152+
# tmt_plan_regex: ostree
153+
# tf_scope: private
154+
# variables: "ARCH=x86_64"
155+
# timeout: 90
156+
# secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }}"
156157

157158
rhel-10-2-bootc:
158159
needs: check-pull-request
@@ -169,7 +170,7 @@ jobs:
169170
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
170171
git_ref: ${{ needs.check-pull-request.outputs.ref }}
171172
update_pull_request_status: true
172-
pull_request_status_name: rhel-10-2-bootc
173+
pull_request_status_name: rhel-10.2-bootc
173174
tmt_context: "arch=x86_64;distro=rhel-10-2"
174175
tmt_plan_regex: bootc
175176
tf_scope: private

0 commit comments

Comments
 (0)