CI: handle building & deploying ldapsaisie-snapshot.tar.gz file

This commit is contained in:
Benjamin Renard 2023-09-28 14:27:35 +02:00
parent 1b672f59e7
commit aa197983a1
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC
2 changed files with 14 additions and 3 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ vendor
/src/local.* /src/local.*
tests-report*.xml tests-report*.xml
.phplint-cache .phplint-cache
/ldapsaisie-snapshot.tar.gz

View file

@ -86,6 +86,15 @@ tests:jessie:
- rm -f .phplint-cache - rm -f .phplint-cache
- /tmp/vendor/bin/phplint src - /tmp/vendor/bin/phplint src
build:snapshot:
stage: build
image: alpine
script:
- tar -czf ldapsaisie-snapshot.tar.gz --exclude=ldapsaisie-snapshot.tar.gz ./
artifacts:
paths:
- ldapsaisie-snapshot.tar.gz
build:doc: build:doc:
stage: build stage: build
image: python:alpine image: python:alpine
@ -129,7 +138,7 @@ build:doc:epub:
paths: paths:
- doc/LdapSaisie.epub - doc/LdapSaisie.epub
deploy:doc: deploy:
stage: deploy stage: deploy
image: alpine:latest image: alpine:latest
before_script: before_script:
@ -139,5 +148,6 @@ deploy:doc:
- mkdir ~/.ssh - mkdir ~/.ssh
- echo "$SSH_HOST_KEY" | base64 -d > ~/.ssh/known_hosts - echo "$SSH_HOST_KEY" | base64 -d > ~/.ssh/known_hosts
script: script:
- rsync -atv --exclude '.git*' --delete --progress ./doc/public_html/ $SSH_USER@$SSH_HOST:./ - rsync -atv --exclude '.git*' --delete --progress ./doc/public_html/ $SSH_USER@$SSH_HOST:doc/
- rsync -atv ./doc/LdapSaisie.html ./doc/LdapSaisie.pdf ./doc/LdapSaisie.epub $SSH_USER@$SSH_HOST:./ - rsync -atv ./doc/LdapSaisie.html ./doc/LdapSaisie.pdf ./doc/LdapSaisie.epub $SSH_USER@$SSH_HOST:doc/
- rsync -atv ldapsaisie-snapshot.tar.gz $SSH_USER@$SSH_HOST:download/ldapsaisie-snapshot.tar.gz