Commit e83be419 authored by Markus Frosch's avatar Markus Frosch 📣

Add latest tag for x86_64

parent 6d5b4612
Pipeline #2505 passed with stage
in 1 minute and 33 seconds
......@@ -6,12 +6,12 @@ stages:
- build
variables:
DOCKER_REGISTRY: registry.icinga.com
DOCKER_REGISTRY: ${CI_REGISTRY}
DOCKER_IMAGE_PREFIX: ${CI_PROJECT_PATH}/
before_script:
- docker info
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.icinga.com
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN ${CI_REGISTRY}
- apk -U add make
.build_job: &build_job
......
......@@ -15,6 +15,12 @@ DIST := $(shell basename $$(dirname `pwd`))
VARIANT := $(shell basename `pwd`)
IMAGE := $(IMAGE_PREFIX)$(DIST):$(VARIANT)
ifeq ($(VARIANT),x86_64)
IMAGE_EXTRA := $(IMAGE_PREFIX)$(DIST):latest
else
IMAGE_EXTRA :=
endif
all: pull build
pull:
......@@ -23,9 +29,15 @@ pull:
build:
docker build --cache-from "${IMAGE}" --tag "$(IMAGE)" .
ifneq ($(IMAGE_EXTRA),)
docker tag "$(IMAGE)" "$(IMAGE_EXTRA)"
endif
push:
docker push "$(IMAGE)"
ifneq ($(IMAGE_EXTRA),)
docker push "$(IMAGE_EXTRA)"
endif
clean:
if (docker inspect --type image "$(IMAGE)" >/dev/null 2>&1); then docker rmi "$(IMAGE)"; fi
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