Commit ec7b5256 authored by Markus Frosch's avatar Markus Frosch 📣
Browse files

Improve Makefile variables for GitLab and set defaults

parent 36ed4860
Pipeline #3245 failed with stage
in 43 seconds
......@@ -5,10 +5,6 @@ image: docker:latest
services:
- docker:dind
variables:
DOCKER_REGISTRY: ${CI_REGISTRY}
DOCKER_IMAGE_PREFIX: ${CI_PROJECT_PATH}/
before_script:
- docker info
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
......
IMAGE_PREFIX := ${DOCKER_IMAGE_PREFIX}
ifeq ($(IMAGE_PREFIX),)
IMAGE_PREFIX := icinga/raspbian-base
ifndef CI_REGISTRY
CI_REGISTRY := registry.icinga.com
endif
REGISTRY := ${DOCKER_REGISTRY}
ifneq ($(REGISTRY),)
IMAGE_PREFIX := $(REGISTRY)/$(IMAGE_PREFIX)
ifeq ($(CI_PROJECT_PATH),)
CI_PROJECT_PATH := build-docker/raspbian
endif
ifeq ($(CI_COMMIT_REF_NAME),)
CI_COMMIT_REF_NAME := $(shell git rev-parse --abbrev-ref HEAD)
endif
FROM := $(shell grep FROM Dockerfile | cut -d" " -f2)
IMAGE := $(IMAGE_PREFIX)debootstrap
IMAGE := $(CI_PROJECT_PATH)/${CI_COMMIT_REF_NAME}
ifneq ($(CI_REGISTRY),)
IMAGE := $(CI_REGISTRY)/$(IMAGE)
endif
QEMU_VERSION = v3.1.0-2
QEMU_STATIC = https://github.com/multiarch/qemu-user-static/releases/download/$(QEMU_VERSION)/qemu-arm-static.tar.gz
......
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