fix builds for minimal

This commit is contained in:
Neil Hanlon 2022-07-07 10:49:24 -04:00
parent f7a74536c0
commit 03b7d892e1
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
2 changed files with 24 additions and 18 deletions

View File

@ -17,6 +17,10 @@ jobs:
architecture:
- x64
- ARM64
variant:
- Base
- Minimal
- UBI
runs-on:
- self-hosted
- ${{ matrix.architecture }}
@ -25,10 +29,10 @@ jobs:
uses: actions/checkout@v2
- name: Build images
run: make
run: make VARIANT=${{ matrix.variant }}
- name: Get image name
run: echo "ARTIFACT_NAME=$(make publish)" >> $GITHUB_ENV
run: echo "ARTIFACT_NAME=$(make publish VARIANT=${{ matrix.variant }})" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v2

View File

@ -1,33 +1,34 @@
ARCH = $(shell uname -m)
BUILDDATE = $(shell /bin/date +%Y%m%d_%H%M)
KICKSTART_DIR = kickstarts
KICKSTART_PATH = "${KICKSTART_DIR}/Rocky-8-Container.ks"
LOG_DIR = logs
OUT = out
RELEASE_VER = 8.6
MAJOR = $(shell v='$(RELEASE_VER)'; echo "$${v%.*}")
TEMPLATE_DIR = templates
TEMPLATE_PATH = "${TEMPLATE_DIR}/tdl-${ARCH}.xml"
OUTNAME := rocky-${RELEASE_VER}-docker
BASEIMAGE_META := base_image-$(OUTNAME).meta
TARGETIMAGE_META := target_image-$(OUTNAME).meta
STORAGEDIR := /var/lib/imagefactory/storage
.PHONY := all clean setup
.DEFAULT_GOAL := $(OUTNAME).tar.xz
BASEIMAGEUUID = $(shell awk '$$1=="UUID:"{print $$NF}' $(BASEIMAGE_META))
TARGETIMAGEUUID = $(shell awk '$$1=="UUID:"{print $$NF}' $(TARGETIMAGE_META))
ifneq ($(DEBUG),)
DEBUGPARAM := --debug
endif
# Basic type is just 'container'
TYPE=container
CONTAINER_NAME = rocky-$(MAJOR)-$(TYPE)-$(RELEASE_VER).$(BUILDDATE).$(ARCH)
TYPE=Container
VARIANT=Base
CONTAINER_NAME = Rocky-$(MAJOR)-$(TYPE)-$(VARIANT)-$(RELEASE_VER).$(BUILDDATE).$(ARCH)
KICKSTART_DIR = kickstarts
KICKSTART_PATH = "${KICKSTART_DIR}/Rocky-8-${TYPE}-${VARIANT}.ks"
OUTNAME := rocky-${RELEASE_VER}-${TYPE}-${VARIANT}
BASEIMAGE_META := base_image-$(OUTNAME).meta
TARGETIMAGE_META := target_image-$(OUTNAME).meta
BASEIMAGEUUID = $(shell awk '$$1=="UUID:"{print $$NF}' $(BASEIMAGE_META))
TARGETIMAGEUUID = $(shell awk '$$1=="UUID:"{print $$NF}' $(TARGETIMAGE_META))
.PHONY := all clean setup
.DEFAULT_GOAL := $(OUTNAME).tar.xz
clean:
-rm *.meta
@ -36,7 +37,8 @@ publish:
@echo $(OUTNAME)-$(ARCH).tar.xz
$(KICKSTART_DIR):
git clone --branch r$(MAJOR) --single-branch https://git.rockylinux.org/rocky/kickstarts.git kickstarts
git clone --branch r$(MAJOR) --single-branch https://git.resf.org/sig_core/kickstarts.git kickstarts
sed -i 's/$$basearch/$(ARCH)/g' kickstarts/*.ks
$(BASEIMAGE_META): $(KICKSTART_DIR)
sudo imagefactory $(DEBUGPARAM) base_image \