mirror of
https://github.com/rocky-linux/sig-cloud-instance-images.git
synced 2024-12-29 20:30:55 +00:00
fix builds for minimal
This commit is contained in:
parent
f7a74536c0
commit
03b7d892e1
2 changed files with 24 additions and 18 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -17,6 +17,10 @@ jobs:
|
||||||
architecture:
|
architecture:
|
||||||
- x64
|
- x64
|
||||||
- ARM64
|
- ARM64
|
||||||
|
variant:
|
||||||
|
- Base
|
||||||
|
- Minimal
|
||||||
|
- UBI
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- self-hosted
|
||||||
- ${{ matrix.architecture }}
|
- ${{ matrix.architecture }}
|
||||||
|
@ -25,10 +29,10 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build images
|
- name: Build images
|
||||||
run: make
|
run: make VARIANT=${{ matrix.variant }}
|
||||||
|
|
||||||
- name: Get image name
|
- 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
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|
34
Makefile
34
Makefile
|
@ -1,33 +1,34 @@
|
||||||
ARCH = $(shell uname -m)
|
ARCH = $(shell uname -m)
|
||||||
BUILDDATE = $(shell /bin/date +%Y%m%d_%H%M)
|
BUILDDATE = $(shell /bin/date +%Y%m%d_%H%M)
|
||||||
KICKSTART_DIR = kickstarts
|
|
||||||
KICKSTART_PATH = "${KICKSTART_DIR}/Rocky-8-Container.ks"
|
|
||||||
LOG_DIR = logs
|
LOG_DIR = logs
|
||||||
OUT = out
|
OUT = out
|
||||||
RELEASE_VER = 8.6
|
RELEASE_VER = 8.6
|
||||||
MAJOR = $(shell v='$(RELEASE_VER)'; echo "$${v%.*}")
|
MAJOR = $(shell v='$(RELEASE_VER)'; echo "$${v%.*}")
|
||||||
TEMPLATE_DIR = templates
|
TEMPLATE_DIR = templates
|
||||||
TEMPLATE_PATH = "${TEMPLATE_DIR}/tdl-${ARCH}.xml"
|
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
|
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),)
|
ifneq ($(DEBUG),)
|
||||||
DEBUGPARAM := --debug
|
DEBUGPARAM := --debug
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Basic type is just 'container'
|
# Basic type is just 'container'
|
||||||
TYPE=container
|
TYPE=Container
|
||||||
CONTAINER_NAME = rocky-$(MAJOR)-$(TYPE)-$(RELEASE_VER).$(BUILDDATE).$(ARCH)
|
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:
|
clean:
|
||||||
-rm *.meta
|
-rm *.meta
|
||||||
|
@ -36,7 +37,8 @@ publish:
|
||||||
@echo $(OUTNAME)-$(ARCH).tar.xz
|
@echo $(OUTNAME)-$(ARCH).tar.xz
|
||||||
|
|
||||||
$(KICKSTART_DIR):
|
$(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)
|
$(BASEIMAGE_META): $(KICKSTART_DIR)
|
||||||
sudo imagefactory $(DEBUGPARAM) base_image \
|
sudo imagefactory $(DEBUGPARAM) base_image \
|
||||||
|
|
Loading…
Reference in a new issue