Skip to content

Commit

Permalink
Merge pull request #193 from yih-redhat/fix-anaconda
Browse files Browse the repository at this point in the history
ci: fix rhel 9.6 anaconda case failure
  • Loading branch information
yih-redhat authored Dec 5, 2024
2 parents 64a0857 + 0a4b489 commit 5958ef4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 25 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/greenboot-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,26 @@ jobs:
variables: "ARCH=x86_64"
timeout: 90

Fedora-rawhide-bootc:
needs: check-pull-request
if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
continue-on-error: true
runs-on: ubuntu-latest
# Fedora-rawhide-bootc:
# needs: check-pull-request
# if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
# continue-on-error: true
# runs-on: ubuntu-latest

steps:
- name: Run the tests
uses: sclorg/[email protected]
with:
compose: Fedora-Rawhide
api_key: ${{ secrets.TF_API_KEY }}
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
git_ref: ${{ needs.check-pull-request.outputs.ref }}
# update_pull_request_status: true
# pull_request_status_name: "Fedora-Rawhide-bootc"
tmt_context: "arch=x86_64;distro=fedora-rawhide"
tmt_plan_regex: bootc
tf_scope: private
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 }}"
variables: "ARCH=x86_64"
timeout: 90
# steps:
# - name: Run the tests
# uses: sclorg/[email protected]
# with:
# compose: Fedora-Rawhide
# api_key: ${{ secrets.TF_API_KEY }}
# git_url: ${{ needs.check-pull-request.outputs.repo_url }}
# git_ref: ${{ needs.check-pull-request.outputs.ref }}
# tmt_context: "arch=x86_64;distro=fedora-rawhide"
# tmt_plan_regex: bootc
# tf_scope: private
# 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 }}"
# variables: "ARCH=x86_64"
# timeout: 90

Centos-stream-9-bootc:
needs: check-pull-request
Expand All @@ -98,8 +96,6 @@ jobs:
api_key: ${{ secrets.TF_API_KEY }}
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
git_ref: ${{ needs.check-pull-request.outputs.ref }}
# update_pull_request_status: true
# pull_request_status_name: "Centos-stream-9-bootc"
tmt_context: "arch=x86_64;distro=cs-9"
tmt_plan_regex: bootc
tf_scope: private
Expand All @@ -121,8 +117,6 @@ jobs:
api_key: ${{ secrets.TF_API_KEY }}
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
git_ref: ${{ needs.check-pull-request.outputs.ref }}
# update_pull_request_status: true
# pull_request_status_name: "Centos-stream-9-bootc"
tmt_context: "arch=x86_64;distro=rhel-9-6"
tmt_plan_regex: bootc
tf_scope: private
Expand Down
10 changes: 10 additions & 0 deletions tests/files/rhel-9-6.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[RHEL-96-NIGHTLY-BaseOS]
name=baseos
baseurl=http://REPLACE_ME_HERE/rhel-9/nightly/RHEL-9/latest-RHEL-9.6.0/compose/BaseOS/x86_64/os
enabled=1
gpgcheck=0
[RHEL-96-NIGHTLY-AppStream]
name=appstream
baseurl=http://REPLACE_ME_HERE/rhel-9/nightly/RHEL-9/latest-RHEL-9.6.0/compose/AppStream/x86_64/os/
enabled=1
gpgcheck=0
8 changes: 8 additions & 0 deletions tests/greenboot-bootc-anaconda-iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ case "${ID}-${VERSION_ID}" in
BASE_IMAGE_URL="registry.stage.redhat.io/rhel9/rhel-bootc:9.6"
BIB_URL="registry.stage.redhat.io/rhel9/bootc-image-builder:9.6"
BOOT_ARGS="uefi"
sed -i "s/REPLACE_ME_HERE/${DOWNLOAD_NODE}/g" files/rhel-9-6.repo
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
Expand Down Expand Up @@ -192,6 +193,13 @@ RUN dnf install -y \
# Clean up by removing the local RPMs if desired
RUN rm -f /tmp/greenboot-*.rpm
EOF

if [[ "$ID" == "rhel" ]]; then
tee -a Containerfile >> /dev/null << EOF
COPY files/rhel-9-6.repo /etc/yum.repos.d/rhel-9-6.repo
EOF
fi

podman build --retry=5 --retry-delay=10s -t quay.io/${QUAY_USERNAME}/greenboot-bootc:${TEST_UUID} -f Containerfile .
greenprint "Pushing greenboot-bootc container to quay.io"
podman push quay.io/${QUAY_USERNAME}/greenboot-bootc:${TEST_UUID}
Expand Down

0 comments on commit 5958ef4

Please sign in to comment.