From d7178c4fb6a2bf0f995ea237724ca7820036b81e Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Fri, 3 Jul 2020 17:05:45 +0200 Subject: [PATCH] feat: Switch to single-switch images Close coq-community/docker-coq#4 --- coq/beta/Dockerfile | 1 - coq/dev/Dockerfile | 1 - coq/dual/beta/Dockerfile | 1 - coq/dual/dev/Dockerfile | 1 - coq/dual/stable/Dockerfile | 1 - coq/stable/Dockerfile | 1 - images.yml | 149 ++++++++++++++----------------------- 7 files changed, 57 insertions(+), 98 deletions(-) diff --git a/coq/beta/Dockerfile b/coq/beta/Dockerfile index 678ba38..c9dde31 100644 --- a/coq/beta/Dockerfile +++ b/coq/beta/Dockerfile @@ -1,4 +1,3 @@ -# TODO later: Use coqorg/base:4.05.0 ARG BASE_TAG="latest" FROM coqorg/base:${BASE_TAG} diff --git a/coq/dev/Dockerfile b/coq/dev/Dockerfile index 2b6a76f..1c50da6 100644 --- a/coq/dev/Dockerfile +++ b/coq/dev/Dockerfile @@ -1,4 +1,3 @@ -# TODO later: Use coqorg/base:4.05.0 ARG BASE_TAG="latest" FROM coqorg/base:${BASE_TAG} diff --git a/coq/dual/beta/Dockerfile b/coq/dual/beta/Dockerfile index 4f7dde3..225f9df 100644 --- a/coq/dual/beta/Dockerfile +++ b/coq/dual/beta/Dockerfile @@ -1,4 +1,3 @@ -# TODO later: Use coqorg/base:4.05.0 ARG BASE_TAG="latest" FROM coqorg/base:${BASE_TAG} diff --git a/coq/dual/dev/Dockerfile b/coq/dual/dev/Dockerfile index a1e39b8..b3b30c7 100644 --- a/coq/dual/dev/Dockerfile +++ b/coq/dual/dev/Dockerfile @@ -1,4 +1,3 @@ -# TODO later: Use coqorg/base:4.05.0 ARG BASE_TAG="latest" FROM coqorg/base:${BASE_TAG} diff --git a/coq/dual/stable/Dockerfile b/coq/dual/stable/Dockerfile index 397b440..41dd2cd 100644 --- a/coq/dual/stable/Dockerfile +++ b/coq/dual/stable/Dockerfile @@ -1,4 +1,3 @@ -# TODO later: Use coqorg/base:4.05.0 ARG BASE_TAG="latest" FROM coqorg/base:${BASE_TAG} diff --git a/coq/stable/Dockerfile b/coq/stable/Dockerfile index 86fcaf6..7c32449 100644 --- a/coq/stable/Dockerfile +++ b/coq/stable/Dockerfile @@ -1,4 +1,3 @@ -# TODO later: Use coqorg/base:4.05.0 ARG BASE_TAG="latest" FROM coqorg/base:${BASE_TAG} diff --git a/images.yml b/images.yml index 8a735d8..8430a31 100644 --- a/images.yml +++ b/images.yml @@ -6,30 +6,8 @@ args: BUILD_DATE: '{defaults[build_date]}' images: - matrix: - # TODO: replace latest with 2 images (single-switch), merge tags - base: ['latest'] - coq: ['dev'] - build: - keywords: - - 'dev' - context: './coq' - dockerfile: './dual/dev/Dockerfile' - commit_api: - fetcher: 'github' - repo: 'coq/coq' - branch: 'master' - args: - BASE_TAG: '{matrix[base]}' - COQ_VERSION: '{matrix[coq]}' - COQ_COMMIT: '{defaults[commit]}' - VCS_REF: '{defaults[commit][0:7]}' - COQ_EXTRA_OPAM: 'coq-bignums' - tags: - - tag: '{matrix[coq]}' - if: '{matrix[base]} == "latest"' - # TODO: remove all occurrences of 'coqorg/base:latest' - - matrix: - base: ['4.09.1-flambda'] + minimal: ['4.05.0'] + base: ['4.05.0', '4.07.1-flambda', '4.09.1-flambda'] coq: ['dev'] build: keywords: @@ -47,91 +25,85 @@ images: VCS_REF: '{defaults[commit][0:7]}' COQ_EXTRA_OPAM: 'coq-bignums' tags: + - tag: '{matrix[coq]}' + if: '{matrix[base]} == {matrix[minimal]}' - tag: '{matrix[coq]}-ocaml-{matrix[base]}' - if: '{matrix[base]} != "latest"' + if: '{matrix[base]} != {matrix[minimal]}' - tag: '{matrix[coq]}-ocaml-{matrix[base][%.*-*]}-flambda' - if: '{matrix[base]} != "latest"' - # TODO/FIXME: Update later on + if: '{matrix[base]} != {matrix[minimal]}' + # TODO: Uncomment when the v8.14 branch is created # - matrix: - # base: ['latest', '4.09.1-flambda'] + # minimal: ['4.05.0'] + # base: ['4.05.0', '4.07.1-flambda', '4.09.1-flambda'] + # # TODO: Update when appropriate # coq: ['8.14-alpha'] # build: - # keywords: - # - '{matrix[coq][%-*]}' - # context: './coq' - # dockerfile: './dev/Dockerfile' + # # TODO: Remove this commit_api section when the beta is released # commit_api: # fetcher: 'github' # repo: 'coq/coq' # branch: 'v8.14' + # context: './coq' + # # TODO: Replace with "beta/Dockerfile" when the beta is released + # dockerfile: './dev/Dockerfile' + # keywords: + # - '{matrix[coq][%-*]}' # args: # BASE_TAG: '{matrix[base]}' + # # TODO: Replace with '{matrix[coq]}' when the beta is released # COQ_VERSION: '{matrix[coq][%-*]}.dev' # COQ_COMMIT: '{defaults[commit]}' + # # TODO: Replace with 'V{matrix[coq][//-/+]}' when the beta is released # VCS_REF: '{defaults[commit][0:7]}' # COQ_EXTRA_OPAM: 'coq-bignums' # tags: # - tag: '{matrix[coq]}' - # if: '{matrix[base]} == "latest"' - # - tag: '{matrix[coq][%-*]}' - # if: '{matrix[base]} == "latest"' + # if: '{matrix[base]} == {matrix[minimal]}' # - tag: '{matrix[coq]}-ocaml-{matrix[base]}' - # if: '{matrix[base]} != "latest"' + # if: '{matrix[base]} != {matrix[minimal]}' # - tag: '{matrix[coq][%-*]}-ocaml-{matrix[base][%.*-*]}-flambda' - # if: '{matrix[base]} != "latest"' + # if: '{matrix[base]} != {matrix[minimal]}' - matrix: - base: ['latest'] + minimal: ['4.05.0'] + base: ['4.05.0', '4.07.1-flambda', '4.09.1-flambda'] + # TODO: Update when appropriate coq: ['8.13-alpha'] build: - keywords: - - '8.13' - context: './coq' - dockerfile: './dual/dev/Dockerfile' + # TODO: Remove this commit_api section when the beta is released commit_api: fetcher: 'github' repo: 'coq/coq' branch: 'v8.13' - args: - BASE_TAG: '{matrix[base]}' - COQ_VERSION: '{matrix[coq][%-*]}.dev' - COQ_COMMIT: '{defaults[commit]}' - VCS_REF: '{defaults[commit][0:7]}' - COQ_EXTRA_OPAM: 'coq-bignums' - tags: - - tag: '{matrix[coq]}' - if: '{matrix[base]} == "latest"' - - tag: '{matrix[coq][%-*]}' - if: '{matrix[base]} == "latest"' - - matrix: - base: ['4.09.1-flambda'] - coq: ['8.13-alpha'] - build: - keywords: - - '8.13' context: './coq' + # TODO: Replace with "beta/Dockerfile" when the beta is released dockerfile: './dev/Dockerfile' - commit_api: - fetcher: 'github' - repo: 'coq/coq' - branch: 'v8.13' + keywords: + - '8.13' args: BASE_TAG: '{matrix[base]}' + # TODO: Replace with '{matrix[coq]}' when the beta is released COQ_VERSION: '{matrix[coq][%-*]}.dev' COQ_COMMIT: '{defaults[commit]}' + # TODO: Replace with 'V{matrix[coq][//-/+]}' when the beta is released VCS_REF: '{defaults[commit][0:7]}' COQ_EXTRA_OPAM: 'coq-bignums' tags: + - tag: '{matrix[coq]}' + if: '{matrix[base]} == {matrix[minimal]}' + - tag: '{matrix[coq][%-*]}' + if: '{matrix[base]} == {matrix[minimal]}' - tag: '{matrix[coq]}-ocaml-{matrix[base]}' - if: '{matrix[base]} != "latest"' + if: '{matrix[base]} != {matrix[minimal]}' - tag: '{matrix[coq][%-*]}-ocaml-{matrix[base][%.*-*]}-flambda' - if: '{matrix[base]} != "latest"' + if: '{matrix[base]} != {matrix[minimal]}' - matrix: - # TODO: replace latest with 2 images (single-switch), merge tags - base: ['latest'] + minimal: ['4.05.0'] + base: ['4.05.0', '4.07.1-flambda', '4.09.1-flambda'] coq: ['8.12.1', '8.11.2', '8.10.2', '8.9.1', '8.8.2'] + coq_latest: ['8.12.1'] build: context: './coq' - dockerfile: './dual/stable/Dockerfile' + dockerfile: './stable/Dockerfile' args: BASE_TAG: '{matrix[base]}' COQ_VERSION: '{matrix[coq]}' @@ -140,40 +112,27 @@ images: tags: - tag: 'latest' if: - # TODO: Bump this version too: - - '{matrix[coq]} == "8.12.1"' - - '{matrix[base]} == "latest"' + - '{matrix[coq]} == {matrix[coq_latest]}' + - '{matrix[base]} == {matrix[minimal]}' - tag: '{matrix[coq]}' - if: '{matrix[base]} == "latest"' + if: '{matrix[base]} == {matrix[minimal]}' - tag: '{matrix[coq][%.*]}' - if: '{matrix[base]} == "latest"' - - matrix: - base: ['4.09.1-flambda'] - coq: ['8.12.1', '8.11.2', '8.10.2', '8.9.1', '8.8.2'] - build: - context: './coq' - dockerfile: './stable/Dockerfile' - args: - BASE_TAG: '{matrix[base]}' - COQ_VERSION: '{matrix[coq]}' - VCS_REF: 'V{matrix[coq]}' - COQ_EXTRA_OPAM: 'coq-bignums' - tags: + if: '{matrix[base]} == {matrix[minimal]}' - tag: 'latest-ocaml-{matrix[base][%.*-*]}-flambda' if: - # TODO: Bump this version too: - - '{matrix[coq]} == "8.12.1"' - - '{matrix[base]} != "latest"' + - '{matrix[coq]} == {matrix[coq_latest]}' + - '{matrix[base]} != {matrix[minimal]}' - tag: '{matrix[coq]}-ocaml-{matrix[base]}' - if: '{matrix[base]} != "latest"' + if: '{matrix[base]} != {matrix[minimal]}' - tag: '{matrix[coq][%.*]}-ocaml-{matrix[base][%.*-*]}-flambda' - if: '{matrix[base]} != "latest"' + if: '{matrix[base]} != {matrix[minimal]}' - matrix: - base: ['latest'] + minimal: ['4.05.0'] + base: ['4.05.0', '4.07.1-flambda'] coq: ['8.7.2'] build: context: './coq' - dockerfile: './dual/stable/Dockerfile' + dockerfile: './stable/Dockerfile' args: BASE_TAG: '{matrix[base]}' COQ_VERSION: '{matrix[coq]}' @@ -181,7 +140,13 @@ images: COQ_EXTRA_OPAM: 'coq-bignums' tags: - tag: '{matrix[coq]}' + if: '{matrix[base]} == {matrix[minimal]}' - tag: '{matrix[coq][%.*]}' + if: '{matrix[base]} == {matrix[minimal]}' + - tag: '{matrix[coq]}-ocaml-{matrix[base]}' + if: '{matrix[base]} != {matrix[minimal]}' + - tag: '{matrix[coq][%.*]}-ocaml-{matrix[base][%.*-*]}-flambda' + if: '{matrix[base]} != {matrix[minimal]}' - matrix: base: ['4.02.3'] coq: ['8.6.1']