Skip to content

Commit

Permalink
Use common base image (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdawe authored Nov 14, 2023
1 parent f32e713 commit 3eb59aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
12 changes: 8 additions & 4 deletions docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ docker-build-image-push:
@echo "Pushing: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
docker push "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"

podman-build:
@echo "Base Image is set to: $(BASEIMAGE)"
@echo "Adding Driver dependencies to $(BASEIMAGE)"
bash ./buildubimicro.sh $(BASEIMAGE)
podman-build: download-csm-common
$(eval include csm-common.mk)
@echo "Base Image is set to: $(DEFAULT_BASEIMAGE)"
@echo "Adding Driver dependencies to $(DEFAULT_BASEIMAGE)"
bash ./buildubimicro.sh $(DEFAULT_BASEIMAGE)
@echo "Base image build: SUCCESS" $(eval BASEIMAGE=localhost/csipowerscale-ubimicro:latest)
@echo "Building: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
$(BUILDER) build -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" -f Dockerfile.podman --target $(BUILDSTAGE) --build-arg GOPROXY=$(GOPROXY) --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg GOVERSION=$(GOVERSION) .
Expand All @@ -23,3 +24,6 @@ podman-build-image-push:
version:
@echo "MAJOR $(MAJOR) MINOR $(MINOR) PATCH $(PATCH) BUILD ${BUILD} TYPE ${TYPE} RELNOTE $(RELNOTE) SEMVER $(SEMVER)"
@echo "Target Version: $(VERSION)"

download-csm-common:
curl -O -L https://raw.githubusercontent.com/dell/csm/main/config/csm-common.mk
9 changes: 0 additions & 9 deletions overrides.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#

# DEFAULT values
# ubi9/ubi-micro:9.2-13
DEFAULT_BASEIMAGE="registry.access.redhat.com/ubi9/ubi-micro@sha256:630cf7bdef807f048cadfe7180d6c27eb3aaa99323ffc3628811da230ed3322a"
DEFAULT_GOVERSION="1.21"
DEFAULT_REGISTRY=""
DEFAULT_IMAGENAME="isilon"
Expand All @@ -27,11 +25,6 @@ endif
DEFAULT_IMAGETAG=$(BUILD_TIMESTAMP)
DEFAULT_GOPROXY=""

# set the BASEIMAGE if needed
ifeq ($(BASEIMAGE),)
export BASEIMAGE="$(DEFAULT_BASEIMAGE)"
endif

# set the GOVERSION if needed
ifeq ($(GOVERSION),)
export GOVERSION="$(DEFAULT_GOVERSION)"
Expand Down Expand Up @@ -76,8 +69,6 @@ overrides-help:
@echo
@echo "GOVERSION - The version of Go to build with, default is: $(DEFAULT_GOVERSION)"
@echo " Current setting is: $(GOVERSION)"
@echo "BASEIMAGE - The base container image to build from, default is: $(DEFAULT_BASEIMAGE)"
@echo " Current setting is: $(BASEIMAGE)"
@echo "REGISTRY - The registry to push images to, default is: $(DEFAULT_REGISTRY)"
@echo " Current setting is: $(REGISTRY)"
@echo "IMAGENAME - The image name to be built, defaut is: $(DEFAULT_IMAGENAME)"
Expand Down

0 comments on commit 3eb59aa

Please sign in to comment.