Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #193 from weaveworks/image-releases
Browse files Browse the repository at this point in the history
Support selecting the release when building Ignite images
  • Loading branch information
luxas authored Jul 16, 2019
2 parents 9bd9d55 + 568227f commit ac95fab
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 25 deletions.
43 changes: 22 additions & 21 deletions images/Makefile
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
4 changes: 3 additions & 1 deletion images/amazonlinux/Dockerfile
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 \
Expand Down
4 changes: 3 additions & 1 deletion images/centos/Dockerfile
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 \
Expand Down
2 changes: 1 addition & 1 deletion images/kubeadm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM weaveworks/ignite-ubuntu:latest
FROM weaveworks/ignite-ubuntu:18.04
# Install dependencies. Use containerd for running the containers (for better performance)
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-transport-https \
Expand Down
4 changes: 3 additions & 1 deletion images/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ubuntu:18.04
ARG RELEASE

FROM ubuntu:${RELEASE}

# udev is needed for booting a "real" VM, setting up the ttyS0 console properly
# kmod is needed for modprobing modules
Expand Down

0 comments on commit ac95fab

Please sign in to comment.