From 4f9ba2c1b764938a56d508f5f310ea3277bc34ed Mon Sep 17 00:00:00 2001 From: Devan Carpenter Date: Sun, 14 Feb 2021 20:21:26 +0100 Subject: [PATCH 1/3] build-system: add 1st party dependencies file This commit adds a machine-readable file specifying the required versions of all 1st party dependencies. More info: https://dev.pep.foundation/CID/Processes --- DEPENDENCIES | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 DEPENDENCIES diff --git a/DEPENDENCIES b/DEPENDENCIES new file mode 100644 index 0000000..7ce15be --- /dev/null +++ b/DEPENDENCIES @@ -0,0 +1,5 @@ +# 1st Party Dependencies +## Prefer git tags instead of SHA hashes when possible. + +pEpEngine=Release_2.1.13 +sequoia=365d00a08bec6a5a48d48a7c7893d78c27092b59 From dd56c009e3534eaa9001c0b11ecb59d4b16f0b96 Mon Sep 17 00:00:00 2001 From: Devan Carpenter Date: Mon, 15 Feb 2021 02:23:09 +0100 Subject: [PATCH 2/3] CI: use specific project versions Make the CI jobs consume the DEPENDENCIES file. More info: https://dev.pep.foundation/CID/Processes --- .gitlab-ci.yml | 31 ++++++++++++++++++++++++++----- scripts/debian10/Makefile | 14 +++++++++++++- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea90745..d25b920 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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]+$/' diff --git a/scripts/debian10/Makefile b/scripts/debian10/Makefile index 8e10078..6d59421 100644 --- a/scripts/debian10/Makefile +++ b/scripts/debian10/Makefile @@ -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 From 1399afb4b21d5b938a54c7836f1d1adba2b14ae4 Mon Sep 17 00:00:00 2001 From: Devan Carpenter Date: Tue, 16 Feb 2021 12:53:03 +0100 Subject: [PATCH 3/3] CI: remove unfinished CentOS/RHEL jobs --- .gitlab-ci.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d25b920..4dc8459 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,25 +5,6 @@ stages: - build -# CentOS/RHEL - -centos8:build: - extends: .make_in_docker - stage: build - variables: - 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 debian10:build: