Commit 6b47afc2 authored by Eric Timmons's avatar Eric Timmons
Browse files

Don't try to build CI images as part of CI

parent 644ea7f2
......@@ -10,21 +10,6 @@ stages:
- prep
- build
##############################################################################
# Build CI Images
##############################################################################
# Build the image used for making the executable.
ci-image:amd64:
stage: prep
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"username\":\"$DOCKER_HUB_USERNAME\",\"password\":\"$DOCKER_HUB_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --cache --cache-repo $DOCKER_HUB_CI_REPO --context $CI_PROJECT_DIR --build-arg sbcl_version=$SBCL_VERSION --build-arg alpine_version=$ALPINE_VERSION --dockerfile $CI_PROJECT_DIR/docker/Dockerfile.linux-static-builder --destination $DOCKER_HUB_CI_REPO:$SBCL_VERSION-alpine$ALPINE_VERSION-amd64
##############################################################################
# Build static releases
##############################################################################
......@@ -42,8 +27,6 @@ static-release:linux:amd64:
extends: .static-release
variables:
ARCH: amd64
needs:
- ci-image:amd64
##############################################################################
# Build dynamic executables
......
#+TITLE: Developer README
This file is meant to be a colleciton of notes for CLPM developers that users
don't typically have to worry about.
* CI
The CI jobs require SBCL to be built with non standard options (and a
patch). To avoid having to build SBCL with these changes in every job, we
build a Docker image with this patched SBCL. The ideal situation would be to
have a job early in the pipeline that builds the image (only if needed) and
then the later jobs consume this image.
Unfortunately, gitlab.common-lisp.net does not have the built in container
registry enabled. This means that we have to use a third party, such as
Docker Hub, to hold the image between jobs. I strongly prefer to not put
access tokens to my personal Docker Hub account on the clpm group (as I'd
like to eventually have more people added to the group). Therefore, I
(etimmons) build the CI images locally, push them to Docker Hub, and then
just use those images in the CI pipeline. In the future we may want to make a
clpm org on Docker Hub or see if the admins can enable the built-in Docker
registry for us.
Build on amd64:
#+begin_src shell
ARCH=amd64
SBCL_VERSION=2.1.1
ALPINE_VERSION=3.13
docker build --build-arg sbcl_version=$SBCL_VERSION \
--build-arg alpine_version=$ALPINE_VERSION \
-t daewok/clpm-ci:$SBCL_VERSION-alpine$ALPINE_VERSION-$ARCH \
--pull \
--platform=linux/amd64 \
-f docker/Dockerfile.linux-ci \
docker
docker push daewok/clpm-ci:$SBCL_VERSION-alpine$ALPINE_VERSION-$ARCH
#+end_src
Build on armhf:
#+begin_src shell
ARCH=armhf
SBCL_VERSION=2.1.1
ALPINE_VERSION=3.13
docker build --build-arg sbcl_version=$SBCL_VERSION \
--build-arg alpine_version=$ALPINE_VERSION \
-t daewok/clpm-ci:$SBCL_VERSION-alpine$ALPINE_VERSION-$ARCH \
--pull \
--platform=linux/arm/v7 \
-f docker/Dockerfile.linux-ci \
docker
docker push daewok/clpm-ci:$SBCL_VERSION-alpine$ALPINE_VERSION-$ARCH
#+end_src
Build on arm64:
#+begin_src shell
ARCH=arm64
SBCL_VERSION=2.1.1
ALPINE_VERSION=3.13
docker build --build-arg sbcl_version=$SBCL_VERSION \
--build-arg alpine_version=$ALPINE_VERSION \
-t daewok/clpm-ci:$SBCL_VERSION-alpine$ALPINE_VERSION-$ARCH \
--pull \
--platform=linux/arm64/v8 \
-f docker/Dockerfile.linux-ci \
docker
docker push daewok/clpm-ci:$SBCL_VERSION-alpine$ALPINE_VERSION-$ARCH
#+end_src
# This Dockerfile builds an image with all neded dependencies to create static
# releases for Linux.
# This Dockerfile builds a Linux image for use on Gitlab CI.
ARG sbcl_version=2.1.1
ARG daewok_signing_key=823DF61DEDB633B3DE7B2B7C181191EF9ACF6934
......@@ -60,15 +59,13 @@ RUN set -x \
# Build it!
RUN set -x \
&& case "$(cat /etc/apk/arch)" in \
armv7) SBCL_ARCH=arm;; \
aarch64) SBCL_ARCH=arm64;; \
x86_64) SBCL_ARCH=x86-64;; \
armv7) SBCL_ARCH=arm; SBCL_MAKE_ARGS="--with-sb-linkable-runtime";; \
aarch64) SBCL_ARCH=arm64; SBCL_MAKE_ARGS="--with-sb-linkable-runtime --with-sb-prelink-linkage-table";; \
x86_64) SBCL_ARCH=x86-64; SBCL_MAKE_ARGS="--with-sb-linkable-runtime --with-sb-prelink-linkage-table";; \
*) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export SBCL_ARCH \
&& sh make.sh --with-sb-linkable-runtime --with-sb-prelink-linkage-table \
&& sh make.sh $SBCL_MAKE_ARGS \
&& sh install.sh
RUN apk add --no-cache openssl-dev openssl-libs-static pkgconfig
WORKDIR /app
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment