Dynamically resolve HAProxy and QuicTLS versions from makefiles
This commit is contained in:
parent
34c6fcf982
commit
41494f6b92
@ -3,10 +3,9 @@ stages:
|
|||||||
- build
|
- build
|
||||||
- publish
|
- publish
|
||||||
|
|
||||||
variables: &default-variables
|
variables:
|
||||||
TZ: "UTC"
|
TZ: "UTC"
|
||||||
GIT_DEPTH: "1"
|
GIT_DEPTH: "1"
|
||||||
HAPROXY_VERSION: "2.6.0"
|
|
||||||
|
|
||||||
.build-job: &build-job
|
.build-job: &build-job
|
||||||
image: docker.io/library/debian:buster
|
image: docker.io/library/debian:buster
|
||||||
@ -73,6 +72,7 @@ docker:
|
|||||||
export DEBIAN_CODENAME="bullseye"
|
export DEBIAN_CODENAME="bullseye"
|
||||||
export JOB_TIMESTAMP="$(date -D '%Y-%m-%dT%H:%M:%S%Z' -d "$CI_JOB_STARTED_AT" +'%Y%m%d-%H%M')"
|
export JOB_TIMESTAMP="$(date -D '%Y-%m-%dT%H:%M:%S%Z' -d "$CI_JOB_STARTED_AT" +'%Y%m%d-%H%M')"
|
||||||
|
|
||||||
|
export HAPROXY_VERSION="$(cat haproxy/Makefile | head -n1 | cut -d'=' -f2 | tr -d ' ')"
|
||||||
export HAPROXY_SHORTVER="$(echo "$(HAPROXY_VERSION)" | cut -d'.' -f1-2)"
|
export HAPROXY_SHORTVER="$(echo "$(HAPROXY_VERSION)" | cut -d'.' -f1-2)"
|
||||||
echo "Building image with"
|
echo "Building image with"
|
||||||
echo " -> haproxy version: $HAPROXY_VERSION ($HAPROXY_SHORTVER)"
|
echo " -> haproxy version: $HAPROXY_VERSION ($HAPROXY_SHORTVER)"
|
||||||
@ -129,7 +129,7 @@ pkg:quictls:
|
|||||||
script: |
|
script: |
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
PKG_VER=1.1.1o
|
PKG_VER="$(cat deps/quictls/Makefile | head -n1 | cut -d'=' -f2 | tr -d ' ')"
|
||||||
if [ "$CI_COMMIT_REF_NAME" != "$CI_DEFAULT_BRANCH" ]; then
|
if [ "$CI_COMMIT_REF_NAME" != "$CI_DEFAULT_BRANCH" ]; then
|
||||||
export PKG_VER="branch-$CI_COMMIT_REF_SLUG"
|
export PKG_VER="branch-$CI_COMMIT_REF_SLUG"
|
||||||
echo "Git reference $CI_COMMIT_REF_NAME is not the default branch. Setting version to $PKG_VER"
|
echo "Git reference $CI_COMMIT_REF_NAME is not the default branch. Setting version to $PKG_VER"
|
||||||
@ -139,8 +139,6 @@ pkg:quictls:
|
|||||||
-H"JOB-TOKEN: $CI_JOB_TOKEN" \
|
-H"JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||||
--upload-file "deps/quictls/quictls-dist.tar.gz" \
|
--upload-file "deps/quictls/quictls-dist.tar.gz" \
|
||||||
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/quictls/$PKG_VER/quictls.tar.gz"
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/quictls/$PKG_VER/quictls.tar.gz"
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
|
|
||||||
pkg:haproxy:
|
pkg:haproxy:
|
||||||
image: docker.io/curlimages/curl:latest
|
image: docker.io/curlimages/curl:latest
|
||||||
@ -151,7 +149,7 @@ pkg:haproxy:
|
|||||||
script: |
|
script: |
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
PKG_VER=$HAPROXY_VERSION
|
PKG_VER="$(cat haproxy/Makefile | head -n1 | cut -d'=' -f2 | tr -d ' ')"
|
||||||
if [ "$CI_COMMIT_REF_NAME" != "$CI_DEFAULT_BRANCH" ]; then
|
if [ "$CI_COMMIT_REF_NAME" != "$CI_DEFAULT_BRANCH" ]; then
|
||||||
export PKG_VER="branch-$CI_COMMIT_REF_SLUG"
|
export PKG_VER="branch-$CI_COMMIT_REF_SLUG"
|
||||||
echo "Git reference $CI_COMMIT_REF_NAME is not the default branch. Setting version to $PKG_VER"
|
echo "Git reference $CI_COMMIT_REF_NAME is not the default branch. Setting version to $PKG_VER"
|
||||||
@ -161,9 +159,6 @@ pkg:haproxy:
|
|||||||
-H"JOB-TOKEN: $CI_JOB_TOKEN" \
|
-H"JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||||
--upload-file "haproxy/haproxy-dist.tar.gz" \
|
--upload-file "haproxy/haproxy-dist.tar.gz" \
|
||||||
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/haproxy/$PKG_VER/haproxy.tar.gz"
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/haproxy/$PKG_VER/haproxy.tar.gz"
|
||||||
variables:
|
|
||||||
<<: *default-variables
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
|
|
||||||
deb:haproxy:
|
deb:haproxy:
|
||||||
<<: *build-job
|
<<: *build-job
|
||||||
|
Loading…
Reference in New Issue
Block a user