From 494b6d6bcf3a2583d6bc72067b3b59a726ed19e7 Mon Sep 17 00:00:00 2001 From: Simon Delamare <simon.delamare@ens-lyon.fr> Date: Wed, 23 Mar 2022 13:28:30 +0100 Subject: [PATCH] Update ci to also build bullseye package --- .gitlab-ci.yml | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ddd531b..841f30e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,28 +1,46 @@ +--- # This is important to avoid stale artifacts in the build directory variables: GIT_STRATEGY: clone # Another stage is needed for the deployment (so that files are already generated by the previous job) stages: - - test - - deploy + - build + - deploy -test-and-build: +.build: &build + stage: build tags: - - grid5000-docker - image: debian:buster + - grid5000-docker script: - - apt-get update && apt-get -y --no-install-recommends install devscripts build-essential equivs git - - mk-build-deps -ir -t 'apt-get -y --no-install-recommends' - - pip3 install -U pip # required by orjson dependency - - dpkg-buildpackage --no-sign - - cp ../*deb . # needed to upload it as artifact + - apt-get update && apt-get -y --no-install-recommends install devscripts build-essential equivs git + - mk-build-deps -ir -t 'apt-get -y --no-install-recommends' + - pip3 install -U pip # required by orjson dependency + - dpkg-buildpackage --no-sign + - mkdir $TARGETDIR + - cp ../*deb $TARGETDIR/ # needed to upload it as artifact except: - - tags + - tags + +build-buster: &build-buster + <<: *build + variables: + TARGETDIR: "buster" + image: debian:buster + artifacts: # generate artifacts for files we want to publish + paths: + - buster + expire_in: '1 day' + +build-bullseye: &build-bullseye + <<: *build + variables: + TARGETDIR: "bullseye" + image: debian:bullseye artifacts: # generate artifacts for files we want to publish - paths: - - ./*.deb - expire_in: '1 day' + paths: + - bullseye + expire_in: '1 day' push-package: stage: deploy @@ -33,4 +51,5 @@ push-package: - master when: manual script: - - g5k-deploy-files --only-if-tag --debian --directory deb/kwollect + - g5k-deploy-files --only-if-tag --debian --files 'buster/*.deb' --directory deb/kwollect + - g5k-deploy-files --only-if-tag --debian --files 'bullseye/*.deb' --directory deb/kwollect/bullseye -- GitLab