Browse Source

CI: use specific project versions

Make the CI jobs consume the DEPENDENCIES file.

More info: https://dev.pep.foundation/CID/Processes
android-build
Devan Carpenter 10 months ago
parent
commit
dd56c009e3
Signed by untrusted user: dvn GPG Key ID: E1707CFFD7B85A02
2 changed files with 39 additions and 6 deletions
  1. +26
    -5
      .gitlab-ci.yml
  2. +13
    -1
      scripts/debian10/Makefile

+ 26
- 5
.gitlab-ci.yml View File

@ -11,8 +11,18 @@ centos8:build:
extends: .make_in_docker
stage: build
variables:
CI_MAKE_TARGET: libpepadapter
CI_DISTRO_TARGET: centos8
CI_DISTRO_TARGET: "centos8"
rules:
- if: '$CI_COMMIT_TAG !~ /^Release_[0-9]+\.[0-9]+\.[0-9]+$/'
centos8:tagged-build:
extends: .make_in_docker
stage: build
variables:
CI_DISTRO_TARGET: "centos8"
TAGGED_BUILD: "true"
rules:
- if: '$CI_COMMIT_TAG =~ /^Release_[0-9]+\.[0-9]+\.[0-9]+$/'
# Debian
@ -20,6 +30,17 @@ debian10:build:
extends: .make_in_docker
stage: build
variables:
CI_MAKE_TARGET: libpepadapter
CI_DISTRO_TARGET: debian10
DEBIAN_FRONTEND: noninteractive
CI_DISTRO_TARGET: "debian10"
DEBIAN_FRONTEND: "noninteractive"
rules:
- if: '$CI_COMMIT_TAG !~ /^Release_[0-9]+\.[0-9]+\.[0-9]+$/'
debian10:tagged-build:
extends: .make_in_docker
stage: build
variables:
CI_DISTRO_TARGET: "debian10"
DEBIAN_FRONTEND: "noninteractive"
TAGGED_BUILD: "true"
rules:
- if: '$CI_COMMIT_TAG =~ /^Release_[0-9]+\.[0-9]+\.[0-9]+$/'

+ 13
- 1
scripts/debian10/Makefile View File

@ -1,15 +1,27 @@
include ../../DEPENDENCIES
export
PEPENGINE_VERSION=${pEpEngine}
CURRENT_DISTRO=$(shell basename $(shell pwd))
LIBPEPADAPTER_VERSION=$(shell git rev-parse --short=8 HEAD)
IMAGE_NAME=${DOCKER_REGISTRY_HOST}/pep-$(CURRENT_DISTRO)-libpepadapter
DOCKERFILE=libpEpAdapter.$(CURRENT_DISTRO).Dockerfile
IS_TAGGED=${TAGGED_BUILD}
ifeq ($(IS_TAGGED), true)
# $CI_COMMIT_TAG is a predefined environment variable from Gitlab
LIBPEPADAPTER_VERSION=${CI_COMMIT_TAG}
else
LIBPEPADAPTER_VERSION=$(shell git rev-parse --short=8 HEAD)
endif
all:
-docker pull $(IMAGE_NAME):latest
cd ../../ && docker build --build-arg CURRENT_DISTRO=$(CURRENT_DISTRO) \
--build-arg DOCKER_REGISTRY_HOST=${DOCKER_REGISTRY_HOST} \
--build-arg PEPENGINE_VERSION=$(PEPENGINE_VERSION) \
--build-arg LIBPEPADAPTER_VERSION=$(LIBPEPADAPTER_VERSION) \
--cache-from $(IMAGE_NAME):latest \
--tag=$(IMAGE_NAME):$(LIBPEPADAPTER_VERSION) \
--tag=$(IMAGE_NAME):${LIBPEPADAPTER_VERSION}_engine-${PEPENGINE_VERSION} \
--tag=$(IMAGE_NAME):latest \
-f scripts/${CURRENT_DISTRO}/$(DOCKERFILE) .
docker push $(IMAGE_NAME):${LIBPEPADAPTER_VERSION}
docker push $(IMAGE_NAME):${LIBPEPADAPTER_VERSION}_engine-${PEPENGINE_VERSION}
docker push $(IMAGE_NAME):latest

Loading…
Cancel
Save