Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix build image #987

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
# cache into GitHub actions cache, nice
cache-from: type=gha
cache-to: type=gha,mode=max
target: default
file: Dockerfile.image
build-args: |
IMAGE_TAG=${{ steps.meta.outputs.version }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/master-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,19 @@ jobs:
ISO_TO_TEST: ${{ inputs.iso_to_test }}
TAG: from-obs
run: |
ARCH=$(uname -m)
mkdir -p build
wget -v -L -c ${ISO_TO_TEST} -O build/elemental-${TAG}.iso
wget -v -L -c ${ISO_TO_TEST} -O build/elemental-teal.${ARCH}-${TAG}.iso
- name: Create symbolic link to ISO for SeedImage
run: |
ISO=$(ls build/elemental-*.iso 2> /dev/null)
ISO=$(ls build/*.iso 2> /dev/null)
ln -sf ${ISO} base-image.iso
- name: Extract iPXE artifacts from ISO
run: |
# Extract TAG
ISO=$(ls build/elemental-*.iso 2> /dev/null)
TAG=${ISO#*-}
ARCH=$(uname -m)
ISO=$(ls build/*.iso 2> /dev/null)
TAG=${ISO#*.${ARCH}-}
export TAG=${TAG%.iso}
# Extract iPXE artifacts
make extract_kernel_init_squash
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ endif

.PHONY: extract_kernel_init_squash
extract_kernel_init_squash:
@VAR='$(ISO)'; \
INITRD_FILE=$$(isoinfo -R -i build/${ISO} -find -type f -name initrd -print 2>/dev/null); \
KERNEL_FILE=$$(isoinfo -R -i build/${ISO} -find -type f -name kernel -print 2>/dev/null); \
[[ -z "$${KERNEL_FILE}" ]] && KERNEL_FILE=$$(isoinfo -R -i build/${ISO} -find -type f -name linux -print 2>/dev/null); \
isoinfo -x /rootfs.squashfs -R -i build/${ISO} > build/$${VAR/\.iso/.squashfs} 2>/dev/null; \
isoinfo -x $${INITRD_FILE} -R -i build/${ISO} > build/$${VAR/\.iso/-initrd} 2>/dev/null; \
isoinfo -x $${KERNEL_FILE} -R -i build/${ISO} > build/$${VAR/\.iso/-kernel} 2>/dev/null
@VAR='build/$(ISO)'; \
INITRD_FILE=$$(isoinfo -R -i $${VAR} -find -type f -name initrd -print 2>/dev/null); \
KERNEL_FILE=$$(isoinfo -R -i $${VAR} -find -type f -name kernel -print 2>/dev/null); \
[[ -z "$${KERNEL_FILE}" ]] && KERNEL_FILE=$$(isoinfo -R -i $${VAR} -find -type f -name linux -print 2>/dev/null); \
isoinfo -x /rootfs.squashfs -R -i $${VAR} > $${VAR/\.iso/.squashfs} 2>/dev/null; \
isoinfo -x $${INITRD_FILE} -R -i $${VAR} > $${VAR/\.iso/-initrd} 2>/dev/null; \
isoinfo -x $${KERNEL_FILE} -R -i $${VAR} > $${VAR/\.iso/-kernel} 2>/dev/null

.PHONY: ipxe
ipxe:
Expand Down
Loading