Commit 76d5adc0 authored by Antoine Ouvrard's avatar Antoine Ouvrard

[138]- ajout d'un job jenkins + déclaration du service ofbiz d'integ

parent ae412545
Pipeline #1486 passed with stage
in 3 minutes and 1 second
# Job de déploiement en sur notre integ
Integ Néréide:
stage: deploy
when: manual
variables:
SERVER: ofbiz@$ENV.nereide.ssh
script:
- ./gradlew build
- ./gradlew distTar
- ssh $SERVER systemctl --user stop ofbiz
- echo $LOAD_DATA > LOAD_DATA.txt && cat LOAD_DATA.txt && tar --file ./build/distributions/ofbiz.tar --append LOAD_DATA.txt
- scp ./build/distributions/ofbiz.tar $SERVER:~
- scp ofbiz-integ.service $SERVER:~/.config/systemd/user/ofbiz.service
- ssh $SERVER 'systemctl --user daemon-reload'
- ssh $SERVER 'rm -rf ~/app && tar xf ofbiz.tar && mv ~/ofbiz ~/app && rm ofbiz.tar'
- ssh $SERVER systemctl --user start ofbiz
# Garde en cache certain éléments - cela évite que gradle retélécharge les lib à chaque build
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .gradle/
- build/
[Service]
Type=simple
WorkingDirectory=/home/ofbiz/app/
# Paramètres d'accès BDD
Environment=OFB_POSTGRES_DB="jdbc:postgresql://192.168.5.10/communautaire"
Environment=OFB_POSTGRES_USER="communautaire"
Environment=OFB_POSTGRES_PASS="ofbiz"
ExecStartPre=/home/ofbiz/scripts/load-data.sh
ExecStart=/home/ofbiz/app/framework/bin/ofbiz -u
ExecStop=/home/ofbiz/app/framework/bin/ofbiz -d
[Install]
WantedBy=default.target
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment