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