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 <[email protected]>
  • Loading branch information
Ian Campbell committed Dec 7, 2017
1 parent 5f3b89a commit 8e10db4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,22 @@ 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.
# small 1.0 2GB
# medium (default) 2.0 4GB pass: fail:5
# medium+ 3.0 6GB pass: fail:2
# large 4.0 8GB pass:2 fail:
# xlarge 8.0 16GB
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 +80,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
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +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
# 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
Expand Down

0 comments on commit 8e10db4

Please sign in to comment.