This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #193 from weaveworks/image-releases
Support selecting the release when building Ignite images
- Loading branch information
Showing
5 changed files
with
32 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
# WHAT specifies the OS image to build | ||
WHAT?= | ||
IS_LATEST?= | ||
DOCKER_USER?=weaveworks | ||
VERSION?=$(shell git describe HEAD --tags) | ||
RELEASE?=latest | ||
TAG:=${RELEASE}$(if $(strip $(VERSION)),-${VERSION}) | ||
OP:=build | ||
|
||
all: build | ||
build: | ||
ifeq ($(WHAT),) | ||
$(error WHAT is a required argument) | ||
endif | ||
@ls ${WHAT} >/dev/null | ||
docker build -t ${DOCKER_USER}/ignite-${WHAT}:${VERSION} ${WHAT} | ||
docker build --build-arg RELEASE -t ${DOCKER_USER}/ignite-${WHAT}:${TAG} ${WHAT} | ||
|
||
push: | ||
docker push ${DOCKER_USER}/ignite-${WHAT}:${VERSION} | ||
docker tag ${DOCKER_USER}/ignite-${WHAT}:${VERSION} ${DOCKER_USER}/ignite-${WHAT}:latest | ||
docker push ${DOCKER_USER}/ignite-${WHAT}:${TAG} | ||
docker tag ${DOCKER_USER}/ignite-${WHAT}:${TAG} ${DOCKER_USER}/ignite-${WHAT}:${RELEASE} | ||
docker push ${DOCKER_USER}/ignite-${WHAT}:${RELEASE} | ||
ifeq ($(IS_LATEST),true) | ||
docker tag ${DOCKER_USER}/ignite-${WHAT}:${TAG} ${DOCKER_USER}/ignite-${WHAT}:latest | ||
docker push ${DOCKER_USER}/ignite-${WHAT}:latest | ||
|
||
build-all: | ||
# Temporarily comment out the kernel build for the RC | ||
# make -C kernel | ||
$(MAKE) build WHAT=amazon-kernel | ||
$(MAKE) build WHAT=amazonlinux | ||
$(MAKE) build WHAT=alpine | ||
$(MAKE) build WHAT=ubuntu | ||
$(MAKE) build WHAT=centos | ||
$(MAKE) build WHAT=kubeadm | ||
endif | ||
|
||
push-all: build-all | ||
# Temporarily comment out the kernel build for the RC | ||
# make -C kernel push | ||
$(MAKE) push WHAT=amazon-kernel | ||
$(MAKE) push WHAT=amazonlinux | ||
$(MAKE) push WHAT=alpine | ||
$(MAKE) push WHAT=ubuntu | ||
$(MAKE) push WHAT=centos | ||
$(MAKE) push WHAT=kubeadm | ||
$(MAKE) OP=push build-all | ||
|
||
build-all: | ||
$(MAKE) ${OP} WHAT=amazon-kernel | ||
$(MAKE) ${OP} WHAT=amazonlinux RELEASE=2 IS_LATEST=true | ||
$(MAKE) ${OP} WHAT=alpine | ||
$(MAKE) ${OP} WHAT=ubuntu RELEASE=16.04 | ||
$(MAKE) ${OP} WHAT=ubuntu RELEASE=18.04 IS_LATEST=true | ||
$(MAKE) ${OP} WHAT=ubuntu RELEASE=19.04 | ||
$(MAKE) ${OP} WHAT=centos RELEASE=7 IS_LATEST=true | ||
$(MAKE) ${OP} WHAT=kubeadm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
FROM amazonlinux:2 | ||
ARG RELEASE | ||
|
||
FROM amazonlinux:${RELEASE} | ||
|
||
# Install common utilities | ||
RUN yum -y install \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
FROM centos:7 | ||
ARG RELEASE | ||
|
||
FROM centos:${RELEASE} | ||
|
||
# Install common utilities | ||
RUN yum -y install \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters