CI: add build & publish step for debian stable package

This commit is contained in:
Benjamin Renard 2023-10-26 12:35:56 +02:00
parent 59436c9fe4
commit e985f50d8a
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -114,6 +114,21 @@ tests:jessie:
- rm -f .phplint-cache - rm -f .phplint-cache
- /tmp/vendor/bin/phplint src - /tmp/vendor/bin/phplint src
build:debian-stable:
image: brenard/debian-python-deb:debian11
stage: build
cache:
paths:
- .cache/pip
only:
- tags
script:
- ./build-deb.sh --install-build-deps
- rm -fr dist/ldapsaisie-*
artifacts:
paths:
- dist/*
build:debian-sid: build:debian-sid:
image: brenard/debian-python-deb:debian11 image: brenard/debian-python-deb:debian11
stage: build stage: build
@ -266,6 +281,25 @@ publish:snapshot:
script: script:
- rsync -atv ldapsaisie-snapshot.tar.gz $SSH_USER@$SSH_HOST:download/ldapsaisie-snapshot.tar.gz - rsync -atv ldapsaisie-snapshot.tar.gz $SSH_USER@$SSH_HOST:download/ldapsaisie-snapshot.tar.gz
publish:debian-stable:
stage: publish
image: debian:stable-slim
needs:
- build:debian-stable
only:
- tags
before_script:
- apt-get update
- apt-get install -y --no-install-recommends rsync openssh-client dupload
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | base64 -d | ssh-add -
- mkdir ~/.ssh
- echo "$SSH_HOST_KEY" | base64 -d > ~/.ssh/known_hosts
- echo "$DUPLOAD_CONFIG" | base64 -d > ~/.dupload.conf
script:
- echo "Publish stable debian packages on APT repository..."
- dupload --to debian-stable dist/ldapsaisie*changes
publish:debian-sid: publish:debian-sid:
stage: publish stage: publish
image: debian:stable-slim image: debian:stable-slim