Commit 634fb968 authored by Eric Timmons's avatar Eric Timmons
Browse files

Switch to Travis and Github CI automated builds

parent ed3ac8c2
name: Release all images
on:
workflow_dispatch:
inputs:
namespace:
description: "The namespace into which the images are released"
required: true
default: daewok
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
IMAGE_NAME: ccl
IMAGE_BUILD_NAMESPACE: daewok
IMAGE_TARGET_NAMESPACE: ${{ github.event.inputs.namespace }}
VERSION: "1.12"
jobs:
retag_linux:
name: Retag all -tmp-master suffixes for Linux
runs-on: ubuntu-20.04
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to Dockerhub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: Retag all -tmp-master suffixes for Linux
run: ./cl-docker-images-build/cl-docker-images-build pull_retag_and_push_linux_arch_images
release_linux:
name: Release Linux images
runs-on: ubuntu-20.04
needs: retag_linux
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to Dockerhub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: Release Linux Images
run: ./cl-docker-images-build/cl-docker-images-build release_linux_manifests
release_windows:
name: Release Windows images
runs-on: ubuntu-20.04
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to Dockerhub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: Release Windows Images
run: |
create_manifest_for_windows () {
docker manifest create $IMAGE_TARGET_NAMESPACE/$IMAGE_NAME:$1 ${IMAGE_BUILD_NAMESPACE}winamd64/$IMAGE_NAME:$1
docker manifest push -p $IMAGE_TARGET_NAMESPACE/$IMAGE_NAME:$1
}
create_manifest_for_windows $VERSION-windowsservercore-ltsc2019
create_manifest_for_windows windowsservercore-ltsc2019
create_manifest_for_windows $VERSION-windowsservercore
create_manifest_for_windows windowsservercore
create_manifest_for_windows latest-windowsservercore
create_manifest_for_windows $VERSION-windowsservercore-ltsc2019-build
create_manifest_for_windows windowsservercore-ltsc2019-build
create_manifest_for_windows $VERSION-windowsservercore-build
create_manifest_for_windows windowsservercore-build
create_manifest_for_windows latest-windowsservercore-build
release_shared:
name: Release shared tags
runs-on: ubuntu-20.04
needs:
- release_linux
- release_windows
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to Dockerhub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: Release Shared Tags
run: ./cl-docker-images-build/cl-docker-images-build release_shared_manifests
name: Build Windows Images
on: [pull_request]
jobs:
build_ltsc2019:
name: Build LTSC2019 Image
runs-on: windows-2019
env:
VERSION: "1.12"
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Pull existing image
run: docker pull daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019
continue-on-error: true
- name: Build image
run: docker build -t daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 --pull --cache-from daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 $env:VERSION/windowsservercore/ltsc2019/windows-amd64
name: Publish Windows Images
on:
push:
branches:
- master
jobs:
push_ltsc2019:
name: Push LTSC2019 Image
runs-on: windows-2019
env:
VERSION: "1.12"
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to Dockerhub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "$env:DOCKER_PASSWORD" | docker login -u "$env:DOCKER_USERNAME" --password-stdin
- name: Pull existing image
run: docker pull daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019
continue-on-error: true
- name: Build image
run: docker build -t daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 --cache-from daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 $env:VERSION/windowsservercore/ltsc2019/windows-amd64
- name: Tag images
run: |
docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:$env:VERSION-windowsservercore
docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:windowsservercore-ltsc2019
docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:windowsservercore
docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:latest-windowsservercore
docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:latest
docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:$env:VERSION
- name: Push nonbuild image
run: |
docker push daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019
docker push daewokwinamd64/ccl:windowsservercore-ltsc2019
docker push daewokwinamd64/ccl:$env:VERSION-windowsservercore
docker push daewokwinamd64/ccl:windowsservercore
docker push daewokwinamd64/ccl:latest-windowsservercore
docker push daewokwinamd64/ccl:latest
docker push daewokwinamd64/ccl:$env:VERSION
[submodule "cl-docker-images-build"]
path = cl-docker-images-build
url = ../cl-docker-images-build.git
os: linux
dist: focal
language: shell
env:
global:
BUILD_SCRIPT: cl-docker-images-build/cl-docker-images-build
DOCKER_BUILDKIT: "1"
DOCKER_CLI_EXPERIMENTAL: "enabled"
stages:
- name: build
- name: deploy
if: branch = master
services:
- docker
before_install:
- echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart
- docker info
- |
# Log in earlier, to hopefully avoid running into Docker Hub's new pull
# limits.
if [ -n "$DOCKER_PASSWORD" ]; then
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
fi
- |
if [ "$TRAVIS_BRANCH" = "master" ]; then
BUILD_TAG_SUFFIX="-tmp-master"
else
BUILD_TAG_SUFFIX="-tmp"
fi
export BUILD_TAG_SUFFIX
_nonnightly: &nonnightly
if: (NOT (type = cron) AND NOT (branch =~ ^nightly-.*$))
_nightly: &nightly
allow_failures:
if: NOT (type = cron)
_build_job: &build_job
stage: build
script:
# Pull the previous images
- $BUILD_SCRIPT pull
# Build the image
- $BUILD_SCRIPT build
after_success: |
if [ -n "$DOCKER_PASSWORD" ]; then
$BUILD_SCRIPT push_build_image
fi
jobs:
include:
# Regular images
# Debian Buster
- arch: amd64
env:
ARCH: amd64
OS_NAME: debian
OS_VERSION: "buster"
<<: [*build_job, *nonnightly]
- arch: arm64
env:
ARCH: arm32v7
OS_NAME: debian
OS_VERSION: "buster"
<<: [*build_job, *nonnightly]
# Debian Stretch
- arch: amd64
env:
ARCH: amd64
OS_NAME: debian
OS_VERSION: "stretch"
<<: [*build_job, *nonnightly]
- arch: arm64
env:
ARCH: arm32v7
OS_NAME: debian
OS_VERSION: "stretch"
<<: [*build_job, *nonnightly]
# Ubuntu Focal
- arch: amd64
env:
ARCH: amd64
OS_NAME: ubuntu
OS_VERSION: "focal"
<<: [*build_job, *nonnightly]
- arch: arm64
install:
- unset DOCKER_BUILDKIT
- sudo apt-get remove -y docker docker.io containerd runc
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get install -y docker-ce docker-ce-cli containerd.io
env:
ARCH: arm32v7
OS_NAME: ubuntu
OS_VERSION: "focal"
<<: [*build_job, *nonnightly]
# Ubuntu Bionic
- arch: amd64
env:
ARCH: amd64
OS_NAME: ubuntu
OS_VERSION: "bionic"
<<: [*build_job, *nonnightly]
- arch: arm64
env:
ARCH: arm32v7
OS_NAME: ubuntu
OS_VERSION: "bionic"
<<: [*build_job, *nonnightly]
#+TITLE: CCL Docker Images
#+AUTHOR: Eric Timmons
* Supported Tags
This project contains Dockerfiles for a variety of stock CCL images as well as
CI infrastructure to automatically build and push them.
** Simple Tags
See [[file:hub-description.org]] for a more detailed description of the images.
+ =1.12-debian-buster=, =1.12-debian=, =debian-buster=, =debian=
+ =1.12-debian-stretch=, =debian-stretch=
+ =1.12-ubuntu-focal=, =1.12-ubuntu=, =ubuntu-focal=, =ubuntu=
+ =1.12-ubuntu-bionic=, =ubuntu-bionic=
+ =1.12-windowsservercore-1909=, =1.12-windowsservercore=, =windowsservercore-1909=, =windowsservercore=
+ =1.12-windowsservercore-ltsc2019=, =windowsservercore-ltsc2019=
* Image Repos
** Shared Tags
The end goal is to get these images accepted into Docker's official image
program. This drives the current layout of the repo as the official images
program does not allow images to be customized via build args.
+ =1.12= ::
+ =1.12-debian-buster=
+ =1.12-windowsservercore-1909=
+ =1.12-windowsservercore-ltsc2019=
+ =latest= ::
+ =1.12-debian-buster=
+ =1.12-windowsservercore-1909=
+ =1.12-windowsservercore-ltsc2019=
Again, similar to the official images program, images are pushed to an arch
specific organization and then pushed to a common organization using Docker
manifests.
* Quick Reference
* CI
+ CCL Home Page :: [[https://ccl.clozure.com/][https://ccl.clozure.com/]]
+ Where to file Docker image related issues :: [[https://gitlab.com/mit-mers/docker/ccl]]
+ Where to file issues for build infrastructure :: [[https://gitlab.com/mit-mers/docker/library]]
+ Where to file issues for CCL itself :: [[https://github.com/Clozure/ccl/issues][https://github.com/Clozure/ccl/issues]]
+ Maintained by :: [[https://github.com/daewok/docker-ccl/][Eric Timmons]] (i.e., this is not an official CCL image)
+ Maintained by :: [[https://github.com/daewok][Eric Timmons]] and the [[https://mers.csail.mit.edu/][MIT MERS Group]] (i.e., this is not an official SBCL image)
+ Supported architectures :: =linux/amd64=, =linux/arm/v7=, =windows/amd64=
+ Previously known as :: =daewok/ccl=
We use a mixture of Travis CI and GitHub Actions to build the images. Travis
is responsible for building all Linux based images and GitHub Actions builds
the Windows based images. The reason for this split is primarily because
Travis provides hosted Arm instances, whereas GitHub currently does not.
* What is CCL?
Building the images can take a *long* time and can occasionally fail due to
transient conditions outside our control. Given that there are a large number
of images, we want to cache images between builds so we can reuse as much
work as possible. Additionally, we don't want to waste time rebuilding images
that have already been released if the goal is to test changes to the nightly
images. Therefore, the CI jobs follow the following rules:
From [[https://ccl.clozure.com][CCL's Home Page]]:
For jobs run on master, all images are built and pushed to the arch specific
repos with tags ending in =-tmp-master=. Nightly images are then retagged
without the suffix and pushed to the common org using manifests. When a
manual release job is triggered, all non-nightly images are retagged without
the suffix and pushed to the common org using manifests.
#+begin_quote
Clozure CL (often called CCL for short) is a free Common Lisp implementation
with a long history. Some distinguishing features of the implementation
include fast compilation speed, native threads, a precise, generational,
compacting garbage collector, and a convenient foreign-function interface.
#+end_quote
For jobs run on a branch starting with =nightly-= only the nightly images are
built and are pushed (if possible) to the arch specific repos with the tag
suffix =-tmp=. These tags are used as potential cache sources when building
on any branch (including master).
* What's in the image?
For jobs run on any other branch, all images are built and pushed (if
possible) to the arch specific repos with the tag suffix =-tmp=. These tags
are used as potential cache sources when building on any branch (including
master).
This image contains CCL binaries built from the latest binary releases from
the CCL devs for a variety of OSes and architectures.
The general policy for OS support is that images will be built for two
versions of supported OSes: either the two most recent versions or the latest
LTS and most recent version, as applicable.
* License
CCL is licensed under the [[https://www.apache.org/licenses/LICENSE-2.0][Apache v2.0]].
The Dockerfiles used to build the images are licensed under BSD-2-Clause.
As with all Docker images, these likely also contain other software which may
be under other licenses (such as Bash, etc from the base distribution, along
with any direct or indirect dependencies of the primary software being
contained).
As for any pre-built image usage, it is the image user's responsibility to
ensure that any use of this image complies with any relevant licenses for all
software contained within.
This tagging scheme means that multiple non-master branches being developed
on in parallel will stomp on each other's caches. However, for now, that
seems like an acceptable tradeoff when compared to coming up with a more
robust tagging scheme.
Subproject commit a23deb9161aad3afb0e8b719b0b48fc555dbcb63
ARCHES=amd64 arm32v7
DEBIAN_LATEST=buster
DEBIAN_VERSIONS=buster stretch
DEFAULT_LINUX_OS=debian
IMAGE_NAME=ccl
IMAGE_BUILD_NAMESPACE=daewok
IMAGE_TARGET_NAMESPACE=daewok
INCLUDE_WINDOWS_IN_MANIFEST=yes
LATEST_VERSION=1.12
OSES=debian ubuntu windowsservercore
UBUNTU_LATEST=focal
UBUNTU_VERSIONS=focal bionic
WINDOWSSERVERCORE_LATEST=ltsc2019
WINDOWSSERVERCORE_VERSIONS=ltsc2019
#+TITLE: CCL Docker Images
#+AUTHOR: Eric Timmons
* Supported Tags
** Simple Tags
+ =1.12-debian-buster=, =1.12-debian=, =debian-buster=, =debian=
+ =1.12-debian-stretch=, =debian-stretch=
+ =1.12-ubuntu-focal=, =1.12-ubuntu=, =ubuntu-focal=, =ubuntu=
+ =1.12-ubuntu-bionic=, =ubuntu-bionic=
+ =1.12-windowsservercore-ltsc2019=, =1.12-windowsservercore=, =windowsservercore-ltsc2019=, =windowsservercore=
** Shared Tags
+ =1.12= ::
+ =1.12-debian-buster=
+ =1.12-windowsservercore-ltsc2019=
+ =latest= ::
+ =1.12-debian-buster=
+ =1.12-windowsservercore-ltsc2019=
* Quick Reference
+ CCL Home Page :: [[https://ccl.clozure.com/][https://ccl.clozure.com/]]
+ Where to file Docker image related issues :: [[https://github.com/cl-docker-images/ccl]]
+ Where to file issues for CCL itself :: [[https://github.com/Clozure/ccl/issues][https://github.com/Clozure/ccl/issues]]
+ Maintained by :: [[https://github.com/daewok/docker-ccl/][Eric Timmons]] (i.e., this is not an official CCL image)
+ Maintained by :: [[https://github.com/daewok][Eric Timmons]] and the [[https://mers.csail.mit.edu/][MIT MERS Group]] (i.e., this is not an official CCL image)
+ Supported architectures :: =linux/amd64=, =linux/arm/v7=, =windows/amd64=
+ Previously known as :: =daewok/ccl=
* What is CCL?
From [[https://ccl.clozure.com][CCL's Home Page]]:
#+begin_quote
Clozure CL (often called CCL for short) is a free Common Lisp implementation
with a long history. Some distinguishing features of the implementation
include fast compilation speed, native threads, a precise, generational,
compacting garbage collector, and a convenient foreign-function interface.
#+end_quote
* What's in the image?
This image contains CCL binaries built from the latest binary releases from
the CCL devs for a variety of OSes and architectures.
The general policy for OS support is that images will be built for two
versions of supported OSes: either the two most recent versions or the latest
LTS and most recent version, as applicable.
* License
CCL is licensed under the [[https://www.apache.org/licenses/LICENSE-2.0][Apache v2.0]].
The Dockerfiles used to build the images are licensed under BSD-2-Clause.
As with all Docker images, these likely also contain other software which may
be under other licenses (such as Bash, etc from the base distribution, along
with any direct or indirect dependencies of the primary software being
contained).
As for any pre-built image usage, it is the image user's responsibility to
ensure that any use of this image complies with any relevant licenses for all
software contained within.
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