diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f214c154..a96b59fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -114,6 +114,21 @@ tests:jessie: - rm -f .phplint-cache - /tmp/vendor/bin/phplint src +build:debian-stable: + image: brenard/debian-python-deb:debian11 + stage: build + cache: + paths: + - .cache/pip + rules: + - if: $CI_COMMIT_TAG != null && $CI_COMMIT_BRANCH == "master" + script: + - ./build-deb.sh --install-build-deps + - rm -fr dist/ldapsaisie-* + artifacts: + paths: + - dist/* + build:debian-sid: image: brenard/debian-python-deb:debian11 stage: build @@ -266,6 +281,25 @@ publish:snapshot: script: - 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 + rules: + - if: $CI_COMMIT_TAG != null && $CI_COMMIT_BRANCH == "master" + 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: stage: publish image: debian:stable-slim