Commit 59431412 authored by Eric Timmons's avatar Eric Timmons
Browse files

Switch back to gitlab CI

Additionally, make OS support mirror the OS support in official images (Windows
1809 or older and no Ubuntu)
parent 2a3b9255
Pipeline #1978 failed with stages
in 1 minute and 2 seconds
name: Release all images
on:
workflow_dispatch:
inputs:
namespace:
description: "The namespace into which the images are released"
required: true
default: daewok
debug:
description: "Debug?"
env:
DEBUG: ${{ github.event.inputs.debug }}
DOCKER_CLI_EXPERIMENTAL: "enabled"
IMAGE_NAME: ccl
IMAGE_BUILD_NAMESPACE: daewok
IMAGE_TARGET_NAMESPACE: ${{ github.event.inputs.namespace }}
VERSION: "1.12"
jobs:
release_linux:
name: Release Linux images
runs-on: ubuntu-20.04
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
submodules: true
- 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
with:
submodules: true
- 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
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
with:
submodules: true
- 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
release_readme:
name: Release readme
runs-on: ubuntu-20.04
needs:
- release_shared
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: Push README
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
docker run -i \
-v $(pwd):/repo \
-e DOCKER_USER=$DOCKER_USERNAME \
-e DOCKER_PASS=$DOCKER_PASSWORD \
chko/docker-pushrm:1 \
--file /repo/hub-description.md \
--debug \
${IMAGE_TARGET_NAMESPACE}/${IMAGE_NAME}
name: Retag build images
on: workflow_dispatch
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
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
with:
submodules: true
- 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
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
include:
- project: 'cl-docker-images/ci-helpers'
file: '/cl-docker-images-default-pipeline.yml'
variables:
CANONICAL_NAMESPACE: daewok
CL_DOCKER_IMAGES_AMD64: "1"
CL_DOCKER_IMAGES_ARM32V7: "1"
CL_DOCKER_IMAGES_WINAMD64: "1"
WINDOWS_PARENT_IMAGES: "mcr.microsoft.com/windows/servercore:ltsc2016;mcr.microsoft.com/windows/servercore:1809"
[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
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" ] || [ "$TRAVIS_BRANCH" = "stable" ]; then
BUILD_TAG_SUFFIX="-tmp-master"
else
BUILD_TAG_SUFFIX="-tmp"
fi
export BUILD_TAG_SUFFIX
_nonnightly: &nonnightly
if: (((type = cron) OR NOT (branch = stable)) AND NOT (branch =~ ^nightly-.*$))
_nightly: &nightly
if: (NOT (branch = stable))
allow_failures:
if: NOT (type = cron)
before_script:
- mkdir tmp
- cd tmp
- git clone https://github.com/Clozure/ccl.git
- cd ccl
- export EXTRA_BUILDARGS="--build-arg ref=$(git rev-parse HEAD)"
- cd ../..
- rm -rf tmp
_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]
# Nightly images
# Debian Buster
- arch: amd64
env:
ARCH: amd64
OS_NAME: debian
OS_VERSION: "buster"
VERSION: nightly
<<: [*build_job, *nightly]
- arch: arm64
env:
ARCH: arm32v7
OS_NAME: debian
OS_VERSION: "buster"
VERSION: nightly
<<: [*build_job, *nightly]
# Debian Stretch
- arch: amd64
env:
ARCH: amd64
OS_NAME: debian
OS_VERSION: "stretch"
VERSION: nightly
<<: [*build_job, *nightly]
- arch: arm64
env:
ARCH: arm32v7
OS_NAME: debian
OS_VERSION: "stretch"
VERSION: nightly
<<: [*build_job, *nightly]
# Ubuntu Focal
- arch: amd64
env:
ARCH: amd64
OS_NAME: ubuntu
OS_VERSION: "focal"
VERSION: nightly
<<: [*build_job, *nightly]
- 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"
VERSION: nightly
<<: [*build_job, *nightly]
# Ubuntu Bionic
- arch: amd64
env:
ARCH: amd64
OS_NAME: ubuntu
OS_VERSION: "bionic"
VERSION: nightly
<<: [*build_job, *nightly]
- arch: arm64
env:
ARCH: arm32v7
OS_NAME: ubuntu
OS_VERSION: "bionic"
VERSION: nightly
<<: [*build_job, *nightly]
# Deploy nightly
- arch: amd64
stage: deploy
if: ((type = cron) AND branch = master)
env:
INCLUDE_WINDOWS_IN_MANIFEST: "no"
VERSION: nightly
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# First, download all the nightly builds, retag them, and push them to
# the arch specific repos
- $BUILD_SCRIPT pull_retag_and_push_linux_arch_images
# Next, create and push all the linux manifests
- $BUILD_SCRIPT release_linux_manifests
# Last, release shared manifests
- $BUILD_SCRIPT release_shared_manifests
# Deploy rebuilds
- arch: amd64
stage: deploy
if: ((type = cron) AND branch = stable)
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# First, download all the nightly builds, retag them, and push them to
# the arch specific repos
- $BUILD_SCRIPT pull_retag_and_push_linux_arch_images
# Next, create and push all the linux manifests
- $BUILD_SCRIPT release_linux_manifests
# Last, release shared manifests
- $BUILD_SCRIPT release_shared_manifests
FROM ubuntu:bionic
LABEL maintainer="etimmons@mit.edu"
ENV CCL_VERSION=1.12
ARG PLATFORM=linuxx86
ARG CCL_SCRIPT=ccl64
WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \
&& curl -L https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -L https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \
&& mv ccl-${CCL_VERSION} ccl \
&& ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& apt-get remove -y curl ca-certificates build-essential m4 make \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /
COPY docker-entrypoint /usr/local/bin/docker-entrypoint
ENTRYPOINT ["docker-entrypoint"]
CMD ["ccl"]
#!/bin/sh
# If the first arg starts with a hyphen, prepend ccl to arguments.
if [ "${1#-}" != "$1" ]; then
set -- ccl "$@"
fi
exec "$@"
FROM ubuntu:bionic
LABEL maintainer="etimmons@mit.edu"
ENV CCL_VERSION=1.12
ARG PLATFORM=linuxarm
ARG CCL_SCRIPT=ccl
WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \
&& curl -L https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -L https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \
&& mv ccl-${CCL_VERSION} ccl \
&& ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& apt-get remove -y curl ca-certificates build-essential m4 make \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /
COPY docker-entrypoint /usr/local/bin/docker-entrypoint
ENTRYPOINT ["docker-entrypoint"]
CMD ["ccl"]
#!/bin/sh
# If the first arg starts with a hyphen, prepend ccl to arguments.
if [ "${1#-}" != "$1" ]; then
set -- ccl "$@"
fi
exec "$@"
FROM ubuntu:focal
LABEL maintainer="etimmons@mit.edu"
ENV CCL_VERSION=1.12
ARG PLATFORM=linuxx86
ARG CCL_SCRIPT=ccl64
WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \
&& curl -L https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -L https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \
&& mv ccl-${CCL_VERSION} ccl \
&& ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& apt-get remove -y curl ca-certificates build-essential m4 make \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /
COPY docker-entrypoint /usr/local/bin/docker-entrypoint
ENTRYPOINT ["docker-entrypoint"]
CMD ["ccl"]
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