Avoid artifacting untarred dist folders and add package publication
This commit is contained in:
parent
77fea45630
commit
2bbb15c003
@ -19,30 +19,33 @@ lua:
|
|||||||
stage: dependencies
|
stage: dependencies
|
||||||
script: make -C deps/lua
|
script: make -C deps/lua
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 14 days
|
expire_in: 7 days
|
||||||
paths: [ "deps/lua/dist" ]
|
paths: [ "deps/lua/lua-dist.tar.gz" ]
|
||||||
|
|
||||||
pcre2:
|
pcre2:
|
||||||
<<: *build-job
|
<<: *build-job
|
||||||
stage: dependencies
|
stage: dependencies
|
||||||
script: make -C deps/pcre2
|
script: make -C deps/pcre2
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 14 days
|
expire_in: 7 days
|
||||||
paths: [ "deps/pcre2/dist" ]
|
paths: [ "deps/pcre2/pcre2-dist.tar.gz" ]
|
||||||
|
|
||||||
quictls:
|
quictls:
|
||||||
<<: *build-job
|
<<: *build-job
|
||||||
stage: dependencies
|
stage: dependencies
|
||||||
script: make -C deps/quictls
|
script: make -C deps/quictls
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 14 days
|
expire_in: 7 days
|
||||||
paths: [ "deps/quictls/dist", "deps/quictls/quictls-*-dist.tar.gz" ]
|
paths: [ "deps/quictls/quictls-dist.tar.gz" ]
|
||||||
|
|
||||||
haproxy:
|
haproxy:
|
||||||
<<: *build-job
|
<<: *build-job
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- apt install -y --no-install-recommends -qq git
|
- apt install -y --no-install-recommends -qq bzip2 git
|
||||||
|
- mkdir deps/lua/dist && tar -C deps/lua/dist -xf deps/lua/lua-dist.tar.gz
|
||||||
|
- mkdir deps/pcre2/dist && tar -C deps/pcre2/dist -xf deps/pcre2/pcre2-dist.tar.gz
|
||||||
|
- mkdir deps/quictls/dist && tar -C deps/quictls/dist -xf deps/quictls/quictls-dist.tar.gz
|
||||||
- make -C haproxy
|
- make -C haproxy
|
||||||
needs:
|
needs:
|
||||||
- job: lua
|
- job: lua
|
||||||
@ -52,8 +55,8 @@ haproxy:
|
|||||||
- job: quictls
|
- job: quictls
|
||||||
artifacts: true
|
artifacts: true
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 14 days
|
expire_in: 7 days
|
||||||
paths: [ "haproxy/dist", "haproxy/haproxy-*-dist.tar.gz" ]
|
paths: [ "haproxy/dist", "haproxy/haproxy-dist.tar.gz" ]
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
stage: publish
|
stage: publish
|
||||||
@ -112,3 +115,47 @@ docker:
|
|||||||
artifacts: true
|
artifacts: true
|
||||||
- job: haproxy
|
- job: haproxy
|
||||||
artifacts: true
|
artifacts: true
|
||||||
|
|
||||||
|
pkg:quictls:
|
||||||
|
image: docker.io/curlimages/curl:latest
|
||||||
|
stage: publish
|
||||||
|
needs:
|
||||||
|
- job: quictls
|
||||||
|
artifacts: true
|
||||||
|
script: |
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
PKG_VER=1.1.1o
|
||||||
|
if [ "$CI_COMMIT_REF_NAME" != "$CI_DEFAULT_BRANCH" ]; then
|
||||||
|
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"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl \
|
||||||
|
-H"JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||||
|
--upload-file "deps/quictls/quictls-dist.tar.gz" \
|
||||||
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/quictls/$PKG_VER/quictls.tar.gz"
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
|
||||||
|
pkg:haproxy:
|
||||||
|
image: docker.io/curlimages/curl:latest
|
||||||
|
stage: publish
|
||||||
|
needs:
|
||||||
|
- job: haproxy
|
||||||
|
artifacts: true
|
||||||
|
script: |
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
PKG_VER=2.6.0
|
||||||
|
if [ "$CI_COMMIT_REF_NAME" != "$CI_DEFAULT_BRANCH" ]; then
|
||||||
|
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"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl \
|
||||||
|
-H"JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||||
|
--upload-file "haproxy/haproxy-dist.tar.gz" \
|
||||||
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/haproxy/$PKG_VER/haproxy.tar.gz"
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
7
deps/lua/Makefile
vendored
7
deps/lua/Makefile
vendored
@ -4,8 +4,9 @@ LUA_TARBALL = lua-$(LUA_VERSION).tar.gz
|
|||||||
LUA_BUILDIR = src
|
LUA_BUILDIR = src
|
||||||
LUA_DESTDIR = dist
|
LUA_DESTDIR = dist
|
||||||
LUA_DESTDIR_ABS = $(shell realpath $(LUA_DESTDIR))
|
LUA_DESTDIR_ABS = $(shell realpath $(LUA_DESTDIR))
|
||||||
|
LUA_ARCHIVE = lua-dist.tar.gz
|
||||||
|
|
||||||
all: $(LUA_BUILDIR) $(LUA_DESTDIR)
|
all: $(LUA_BUILDIR) $(LUA_DESTDIR) $(LUA_ARCHIVE)
|
||||||
|
|
||||||
$(LUA_BUILDIR):
|
$(LUA_BUILDIR):
|
||||||
@if ! [ -d "$(LUA_BUILDIR)" ]; then mkdir -v "$(LUA_BUILDIR)"; fi
|
@if ! [ -d "$(LUA_BUILDIR)" ]; then mkdir -v "$(LUA_BUILDIR)"; fi
|
||||||
@ -21,9 +22,13 @@ $(LUA_DESTDIR): build
|
|||||||
if ! [ -d "$(LUA_DESTDIR)" ]; then mkdir -v "$(LUA_DESTDIR)"; fi
|
if ! [ -d "$(LUA_DESTDIR)" ]; then mkdir -v "$(LUA_DESTDIR)"; fi
|
||||||
$(MAKE) -C $(LUA_BUILDIR) -j$(shell nproc) install INSTALL_TOP="$(LUA_DESTDIR_ABS)"
|
$(MAKE) -C $(LUA_BUILDIR) -j$(shell nproc) install INSTALL_TOP="$(LUA_DESTDIR_ABS)"
|
||||||
|
|
||||||
|
$(LUA_ARCHIVE): $(LUA_DESTDIR)
|
||||||
|
tar -C "$(LUA_DESTDIR)" -cjf "$(LUA_ARCHIVE)" $$(ls -1 $(LUA_DESTDIR))
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf "$(LUA_BUILDIR)"
|
rm -rf "$(LUA_BUILDIR)"
|
||||||
rm -rf "$(LUA_DESTDIR)"
|
rm -rf "$(LUA_DESTDIR)"
|
||||||
rm -fv "$(LUA_TARBALL)"
|
rm -fv "$(LUA_TARBALL)"
|
||||||
|
rm -fv "$(LUA_ARCHIVE)"
|
||||||
|
|
||||||
.PHONY: clean build
|
.PHONY: clean build
|
||||||
|
9
deps/pcre2/Makefile
vendored
9
deps/pcre2/Makefile
vendored
@ -4,6 +4,7 @@ PCRE2_TARBALL = pcre2-$(PCRE2_VERSION).tar.gz
|
|||||||
PCRE2_BUILDIR = src
|
PCRE2_BUILDIR = src
|
||||||
PCRE2_DESTDIR = dist
|
PCRE2_DESTDIR = dist
|
||||||
PCRE2_DESTDIR_ABS = $(shell realpath $(PCRE2_DESTDIR))
|
PCRE2_DESTDIR_ABS = $(shell realpath $(PCRE2_DESTDIR))
|
||||||
|
PCRE2_ARCHIVE = pcre2-dist.tar.gz
|
||||||
|
|
||||||
all: build dist
|
all: build dist
|
||||||
|
|
||||||
@ -18,13 +19,17 @@ build: $(PCRE2_BUILDIR)/pcre2-$(PCRE2_VERSION).tar.gz
|
|||||||
if [ -f "$(PCRE2_BUILDIR)/CmakeCache.txt" ]; then rm -v "$(PCRE2_BUILDIR)/CmakeCache.txt"; fi
|
if [ -f "$(PCRE2_BUILDIR)/CmakeCache.txt" ]; then rm -v "$(PCRE2_BUILDIR)/CmakeCache.txt"; fi
|
||||||
cd "$(PCRE2_BUILDIR)" && cmake -DPCRE2_STATIC_PIC=ON -DPCRE2_SUPPORT_JIT=ON -DCMAKE_INSTALL_PREFIX="$(PCRE2_DESTDIR_ABS)" . && make
|
cd "$(PCRE2_BUILDIR)" && cmake -DPCRE2_STATIC_PIC=ON -DPCRE2_SUPPORT_JIT=ON -DCMAKE_INSTALL_PREFIX="$(PCRE2_DESTDIR_ABS)" . && make
|
||||||
|
|
||||||
dist: build
|
$(PCRE2_DESTDIR): build
|
||||||
if ! [ -d "$(PCRE2_DESTDIR)" ]; then mkdir -v "$(PCRE2_DESTDIR)"; fi
|
if ! [ -d "$(PCRE2_DESTDIR)" ]; then mkdir -v "$(PCRE2_DESTDIR)"; fi
|
||||||
cd "$(PCRE2_BUILDIR)" && make install
|
cd "$(PCRE2_BUILDIR)" && make install
|
||||||
|
|
||||||
|
$(PCRE2_ARCHIVE): $(PCRE2_DESTDIR)
|
||||||
|
tar -C "$(PCRE2_DESTDIR)" -cjf "$(PCRE2_ARCHIVE)" $$(ls -1 $(PCRE2_DESTDIR))
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf "$(PCRE2_BUILDIR)"
|
rm -rf "$(PCRE2_BUILDIR)"
|
||||||
rm -rf "$(PCRE2_DESTDIR)"
|
rm -rf "$(PCRE2_DESTDIR)"
|
||||||
rm -fv "$(PCRE2_TARBALL)"
|
rm -fv "$(PCRE2_TARBALL)"
|
||||||
|
rm -fv "$(PCRE2_ARCHIVE)"
|
||||||
|
|
||||||
.PHONY: clean build dist
|
.PHONY: clean build
|
||||||
|
2
deps/quictls/Makefile
vendored
2
deps/quictls/Makefile
vendored
@ -4,7 +4,7 @@ QUICTLS_TARBALL = quictls-$(QUICTLS_VERSION).tar.gz
|
|||||||
QUICTLS_BUILDIR = src
|
QUICTLS_BUILDIR = src
|
||||||
QUICTLS_DESTDIR = dist
|
QUICTLS_DESTDIR = dist
|
||||||
QUICTLS_DESTDIR_ABS = $(shell realpath $(QUICTLS_DESTDIR))
|
QUICTLS_DESTDIR_ABS = $(shell realpath $(QUICTLS_DESTDIR))
|
||||||
QUICTLS_ARCHIVE = quictls-$(QUICTLS_VERSION)-dist.tar.gz
|
QUICTLS_ARCHIVE = quictls-dist.tar.gz
|
||||||
|
|
||||||
all: $(QUICTLS_DESTDIR) $(QUICTLS_ARCHIVE)
|
all: $(QUICTLS_DESTDIR) $(QUICTLS_ARCHIVE)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ HAPROXY_REPOSRC = http://git.haproxy.org/git/haproxy-$(HAPROXY_VERSION).git
|
|||||||
HAPROXY_BUILDIR = src
|
HAPROXY_BUILDIR = src
|
||||||
HAPROXY_DESTDIR = dist
|
HAPROXY_DESTDIR = dist
|
||||||
HAPROXY_DESTDIR_ABS = $(shell realpath $(HAPROXY_DESTDIR))
|
HAPROXY_DESTDIR_ABS = $(shell realpath $(HAPROXY_DESTDIR))
|
||||||
HAPROXY_ARCHIVE = haproxy-$(HAPROXY_VERSION)-dist.tar.gz
|
HAPROXY_ARCHIVE = haproxy-dist.tar.gz
|
||||||
|
|
||||||
DEP_ROOT_LUA = ../deps/lua
|
DEP_ROOT_LUA = ../deps/lua
|
||||||
DEP_ROOT_PCRE2 = ../deps/pcre2
|
DEP_ROOT_PCRE2 = ../deps/pcre2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user