Skip to content

Commit

Permalink
CI: Build .iso (but not -efi.iso) images.
Browse files Browse the repository at this point in the history
Previously (in #8) building both seemed to timeout or otherwise fall foul of
some sort of infra glitch. Try just building one for now.

This is a first step in trying to actually boot images in CI.

Signed-off-by: Ian Campbell <ijc@docker.com>
  • Loading branch information
Ian Campbell committed Dec 7, 2017
1 parent 5f3b89a commit d0cd661
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ linuxkit_pkg_build: &linuxkit_pkg_build
image_build: &image_build
docker:
- image: debian:stretch
# image builds seem to need a bit more grunt (RAM) than usual. Possibly getting OOM killed, which https://github.com/moby/tool/pull/191 might help.
# NB: This will become a paid for feature at some point soon (with plenty of warning), so is not a long term solution.
resource_class: large
steps:
- run:
name: Configure $PATH
command: echo 'export PATH=/workspace/bin:$PATH' >> $BASH_ENV
- run:
name: Install packages
# ca-certificates are needed for attach_workspace (and git over https)
command: apt-get update && apt-get install -y ca-certificates curl git make openssh-client
command: apt-get update && apt-get install -y ca-certificates curl git make openssh-client strace
- attach_workspace:
at: /workspace
- checkout
Expand Down Expand Up @@ -72,10 +75,12 @@ image_build: &image_build
command: |
mkdir -p /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK
df -h .
# KUBE_FORMATS="iso-efi iso-bios" times out or fails for larger docker images.
# Just do tar for now.
make KUBE_FORMATS="tar" kube-master.iso kube-node.iso
#mv kube-master*.iso kube-node*.iso /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK
ulimit -a
make LINUXKIT_ARGS="-v" KUBE_FORMATS="iso-bios" kube-master.iso kube-node.iso
mv kube-master*.iso kube-node*.iso /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK
- persist_to_workspace:
root: /workspace
paths: images

version: 2
jobs:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ KUBE_FORMAT_ARGS := $(patsubst %,-format %,$(KUBE_FORMATS))
all: kube-master.iso kube-node.iso

kube-master.iso: yml/kube.yml yml/$(KUBE_RUNTIME).yml yml/$(KUBE_RUNTIME)-master.yml yml/$(KUBE_NETWORK).yml
linuxkit $(LINUXKIT_ARGS) build $(LINUXKIT_BUILD_ARGS) -name kube-master $(KUBE_FORMAT_ARGS) $^
# strace logs received signals
strace -f -e trace=signal linuxkit $(LINUXKIT_ARGS) build $(LINUXKIT_BUILD_ARGS) -name kube-master $(KUBE_FORMAT_ARGS) $^

kube-node.iso: yml/kube.yml yml/$(KUBE_RUNTIME).yml yml/$(KUBE_NETWORK).yml
linuxkit $(LINUXKIT_ARGS) build $(LINUXKIT_BUILD_ARGS) -name kube-node $(KUBE_FORMAT_ARGS) $^
Expand Down

0 comments on commit d0cd661

Please sign in to comment.