Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tprasadtp committed Nov 10, 2023
1 parent 82adb13 commit c40abd7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 83 deletions.
93 changes: 14 additions & 79 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,60 +45,13 @@ jobs:
- name: Copy ISO
run: cp --force build/rhel/virtio-win.iso build/virtio-win.iso

- name: Mount ISO
run: |
echo "--> Prepare ISO"
sudo mkdir /mnt/virtio-iso
sudo chown $USER:$USER /mnt/virtio-iso
sudo chmod 755 /mnt/virtio-iso
echo "--> Mounting ISO"
sudo mount -o loop build/virtio-win.iso /mnt/virtio-iso
- name: Copy files and generate Win-PE ISOs
run: ./scripts/ci-copy-files.sh /mnt/virtio-iso

- name: Upload virtio-win.iso
uses: actions/upload-artifact@v3
with:
name: virtio-win.iso
path: build/virtio-win.iso
retention-days: 7

- name: Upload virtio-win.iso checksum
uses: actions/upload-artifact@v3
with:
name: virtio-win.iso.sha256
path: build/virtio-win.iso.sha256
retention-days: 7

- name: Upload virtio-win-guest-tools.exe
uses: actions/upload-artifact@v3
with:
name: virtio-win-guest-tools.exe
path: docker/build/virtio-win-guest-tools.exe
retention-days: 7

- name: Upload virtio-win-guest-tools.exe checksum
uses: actions/upload-artifact@v3
with:
name: virtio-win-guest-tools.exe.sha256
path: docker/build/virtio-win-guest-tools.exe.sha256
retention-days: 7

- name: Upload virtio-winpe.iso
uses: actions/upload-artifact@v3
with:
name: virtio-winpe.iso
path: docker/build/virtio-winpe.iso
retention-days: 7

- name: Upload virtio-winpe.iso checksum
uses: actions/upload-artifact@v3
with:
name: virtio-winpe.iso.sha256
path: docker/build/virtio-winpe.iso.sha256
retention-days: 7

- name: Upload VERSION.txt
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -146,45 +99,27 @@ jobs:
- name: Download ISO
uses: actions/download-artifact@v3
with:
path: docker/build/
path: build/
name: virtio-win.iso

- name: Download ISO checksum
uses: actions/download-artifact@v3
with:
path: docker/build/
name: virtio-win.iso.sha256

- name: Download winpe ISO
uses: actions/download-artifact@v3
with:
path: docker/build/
name: virtio-winpe.iso

- name: Download winpe ISO checksum
uses: actions/download-artifact@v3
with:
path: docker/build/
name: virtio-winpe.iso.sha256

- name: Download virtio-win-guest-tools.exe
uses: actions/download-artifact@v3
with:
path: docker/build/
name: virtio-win-guest-tools.exe

- name: Download virtio-win-guest-tools.exe checksum
uses: actions/download-artifact@v3
with:
path: docker/build/
name: virtio-win-guest-tools.exe.sha256

- name: Download VERSION.txt
uses: actions/download-artifact@v3
with:
path: docker/build/
path: build/
name: VERSION.txt

- name: Mount ISO
run: |
echo "--> Prepare ISO"
sudo mkdir /mnt/virtio-iso
sudo chown $USER:$USER /mnt/virtio-iso
sudo chmod 755 /mnt/virtio-iso
echo "--> Mounting ISO"
sudo mount -o loop build/virtio-win.iso /mnt/virtio-iso
- name: Copy files and generate Win-PE ISOs
run: ./scripts/ci-copy-files.sh /mnt/virtio-iso

- name: Release if necessary
run: |
ls -alh docker/build
Expand Down
12 changes: 8 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dotenv:

vars:
DOCKER_IMAGE_RHEL: registry.access.redhat.com/ubi9/ubi:latest
DOCKER_IMAGE_FEDORA: quay.io/fedora/fedora:latest

tasks:
default:
Expand Down Expand Up @@ -48,6 +49,7 @@ tasks:
--env SMDEV_CONTAINER_OFF=true \
--mount="type=bind,src={{.TASKFILE_DIR}}/build/rhel/secrets/entitlement,dst=/etc/pki/entitlement" \
--mount="type=bind,src={{.TASKFILE_DIR}}/build/rhel/secrets/consumer,dst=/etc/pki/consumer" \
--init \
{{.DOCKER_IMAGE_RHEL}} \
bash -c 'rm -f /etc/rhsm-host && subscription-manager unregister'
Expand All @@ -65,6 +67,7 @@ tasks:
--mount="type=bind,src={{.TASKFILE_DIR}}/build/rhel/secrets/consumer,dst=/etc/pki/consumer" \
--mount="type=bind,src={{.TASKFILE_DIR}}/build/rhel/cache,dst=/var/cache/dnf" \
--mount="type=bind,src={{.TASKFILE_DIR}}/build/rhel,dst=/build" \
--init \
{{.DOCKER_IMAGE_RHEL}} \
bash -c 'dnf install --best -y --setopt=keepcache=true virtio-win && dnf repoquery --quiet --installed --cacheonly --qf "%{version}-%{release}" virtio-win > /build/VERSION.txt && echo "Copying files to host" && cp /usr/share/virtio-win/virtio-win.iso /build/virtio-win.iso'
Expand All @@ -74,10 +77,11 @@ tasks:
- cmd: mkdir -p "build/fedora/cache"
- cmd: |
docker run --rm \
--mount="type=bind,src={{.TASKFILE_DIR}}/build/{{.UPSTREAM}}/cache,dst=/var/cache/dnf" \
--mount="type=bind,src={{.TASKFILE_DIR}}/build/{{.UPSTREAM}},dst=/build" \
{{.DOCKER_IMAGE_RHEL}} \
bash -c 'dnf install --best -y --setopt=keepcache=true virtio-win && dnf repoquery --quiet --installed --cacheonly --qf "%{version}-%{release}" virtio-win > /build/VERSION.txt && echo "Copying files to host" && cp /usr/share/virtio-win/virtio-win.iso /build/virtio-win.iso'
--mount="type=bind,src={{.TASKFILE_DIR}}/build/fedora/cache,dst=/var/cache/dnf" \
--mount="type=bind,src={{.TASKFILE_DIR}}/build/fedora,dst=/build" \
--init \
{{.DOCKER_IMAGE_FEDORA}} \
bash -c 'printf "Adding Repo\n" && curl -sSfL https://fedorapeople.org/groups/virt/virtio-win/virtio-win.repo -o /etc/yum.repos.d/virtio-win.repo && printf "Download ISO\n" && dnf install --best -y --setopt=keepcache=true virtio-win && dnf repoquery --quiet --installed --cacheonly --qf "%{version}-%{release}" virtio-win > /build/VERSION.txt && echo "Copying files to host" && cp /usr/share/virtio-win/virtio-win.iso /build/virtio-win.iso'
clean-creds:
desc: "Cleanup RedHat Manager credentials"
Expand Down

0 comments on commit c40abd7

Please sign in to comment.