From a2458747631ba1f479304bacc8a9a3cd2528fa16 Mon Sep 17 00:00:00 2001 From: Adrien le Maire Date: Mon, 1 Mar 2021 20:23:58 +0000 Subject: [PATCH] Update .gitlab-ci.yml, shields/Makefile, shields/version files --- .gitlab-ci.yml | 13 +++++++++++++ shields/Makefile | 19 +++++++++++++++++++ shields/version | 1 + 3 files changed, 33 insertions(+) create mode 100644 shields/Makefile create mode 100644 shields/version diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d21d52..36c5c73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -189,6 +189,19 @@ borg: changes: - borg/* +shields: + stage: build + tags: + - docker + script: + - cd shields + - make push + only: + variables: + - $CI_COMMIT_REF_PROTECTED == "true" + changes: + - shields/* + .docker_init: &docker_init | if ! docker info &>/dev/null; then if [ -z "${DOCKER_HOST}" -a "${KUBERNETES_PORT}" ]; then diff --git a/shields/Makefile b/shields/Makefile new file mode 100644 index 0000000..98c7faa --- /dev/null +++ b/shields/Makefile @@ -0,0 +1,19 @@ +NAMESPACE=alemairebe +include version + +IMAGE=shields + +push: get decompress build + +get: + wget https://github.com/badges/shields/archive/$(VERSION).tar.gz + +decompress: + tar $(VERSION).tar.bz2 + +build: + docker buildx build --platform linux/amd64,linux/arm64 --push \ + --cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \ + --cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \ + --tag ${NAMESPACE}/${IMAGE}:$(VERSION) \ + --tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) shields-$(VERSION) diff --git a/shields/version b/shields/version new file mode 100644 index 0000000..b055dbf --- /dev/null +++ b/shields/version @@ -0,0 +1 @@ +VERSION=server-2021-03-01