From e1e07755bb1fe075a18f5f14c13ab99f32a975ec Mon Sep 17 00:00:00 2001 From: Blake Devcich Date: Mon, 10 Feb 2025 13:06:39 -0600 Subject: [PATCH] Updated workflows to set LUSTRE_VERSION since it doesn't use the makefile --- .github/workflows/main.yml | 2 ++ Makefile | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e4009c..094e0fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,6 +77,7 @@ jobs: push: true target: production tags: ${{ steps.meta.outputs.tags }} + build-args: LUSTRE_VERSION=cray-2.15.B19 - name: "Build the final Docker image in nektos/act" # The docker/build-push-action does actions/checkout, and that can't be @@ -152,6 +153,7 @@ jobs: push: true target: debug tags: ${{ steps.meta.outputs.tags }} + build-args: LUSTRE_VERSION=cray-2.15.B19 create_release: needs: production diff --git a/Makefile b/Makefile index f21ad3a..e8fc5d5 100644 --- a/Makefile +++ b/Makefile @@ -24,19 +24,25 @@ IMAGE_TAG_BASE ?= ghcr.io/nearnodeflash/nnf-mfu # tools. (i.e. podman) CONTAINER_TOOL ?= docker +# Which tag to pull from the cray lustre source code. +# **Note:** This must also be set in .github/workflows/main.yaml for both +# production and debug docker builds. CRAY_LUSTRE_VERSION ?= cray-2.15.B19 -RPM_PLATFORM ?= linux/amd64 +# Only support linux/amd64 builds. This reduces complexity with installing +# lustre, which is an option enabled for mpifileutils. +PLATFORM ?= linux/amd64 + docker-build: VERSION ?= $(shell cat .version) docker-build: TARGET ?= production docker-build: .version - ${CONTAINER_TOOL} build --platform=$(RPM_PLATFORM) --target $(TARGET) --build-arg LUSTRE_VERSION=${CRAY_LUSTRE_VERSION} -t $(IMAGE_TAG_BASE):$(VERSION) . + ${CONTAINER_TOOL} build --platform=$(PLATFORM) --target $(TARGET) --build-arg LUSTRE_VERSION=${CRAY_LUSTRE_VERSION} -t $(IMAGE_TAG_BASE):$(VERSION) . docker-build-debug: VERSION ?= $(shell cat .version) docker-build-debug: TARGET ?= debug docker-build-debug: IMAGE_TAG_BASE := $(IMAGE_TAG_BASE)-debug docker-build-debug: .version - ${CONTAINER_TOOL} build --platform=$(RPM_PLATFORM) --target $(TARGET) --build-arg LUSTRE_VERSION=${CRAY_LUSTRE_VERSION} -t $(IMAGE_TAG_BASE):$(VERSION) . + ${CONTAINER_TOOL} build --platform=$(PLATFORM) --target $(TARGET) --build-arg LUSTRE_VERSION=${CRAY_LUSTRE_VERSION} -t $(IMAGE_TAG_BASE):$(VERSION) . docker-push: VERSION ?= $(shell cat .version) docker-push: .version