forked from PnX-SI/gn_module_monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- keep trying to send geometry to "objForm" object (FormGroup) Reviewed-by: andriacap
- Loading branch information
Showing
7 changed files
with
180 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
image: debian:latest | ||
|
||
before_script: | ||
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' | ||
- mkdir -p ~/.ssh | ||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa | ||
- chmod 700 ~/.ssh/id_rsa | ||
- eval "$(ssh-agent -s)" | ||
- ssh-add ~/.ssh/id_rsa | ||
- ssh-keyscan -t rsa gitlab.com > ~/.ssh/known_hosts | ||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' | ||
- chmod 644 ~/.ssh/known_hosts | ||
|
||
variables: | ||
SERVEUR: '${SSH_USER}@${VM_IPADDRESS}' | ||
# .dependencies_cache: | ||
# cache: | ||
# key: | ||
# files: | ||
# - package-lock.json | ||
# paths: | ||
# - .nvm | ||
|
||
stages: | ||
- setup | ||
- dependencies | ||
- build | ||
- reload_service | ||
|
||
pull_git_stage: | ||
stage: setup | ||
script: | ||
- | | ||
ssh ${SERVEUR} -p 3022 <<'ENDSSH' | ||
whoami && | ||
cd /home/geonatureadmin/geonature/contrib/gn_module_monitoring/ && | ||
git fetch gitl-ac-ssh deploy && | ||
git pull && | ||
exit | ||
ENDSSH | ||
- ssh ${SERVEUR} -p 3022 "ls -al && pwd" | ||
- ls -al | ||
- pwd | ||
# extends: .dependencies_cache | ||
# artifacts: | ||
# expire_in: 20 mins | ||
# paths: | ||
# - node_modules | ||
tags: | ||
- node | ||
only: | ||
- deploy | ||
|
||
dependencies_stage: | ||
stage: dependencies | ||
variables: | ||
PATH_GEONATURE_FRONTEND: '/home/geonatureadmin/geonature/frontend' | ||
script: | ||
- | | ||
ssh ${SERVEUR} -p 3022 <<'ENDSSH' | ||
export NVM_DIR="$HOME/.nvm" && . "$NVM_DIR/nvm.sh" --no-use && | ||
cd /home/geonatureadmin/geonature/frontend && | ||
ls -al && | ||
echo $NVM_DIR && | ||
nvm use && npm ci && | ||
exit | ||
ENDSSH | ||
- ssh ${SERVEUR} -p 3022 "ls -al && pwd" | ||
- ls -al | ||
- pwd | ||
tags: | ||
- node | ||
rules: | ||
- if: $CI_COMMIT_BRANCH == "deploy" | ||
changes: | ||
- ./frontend/package.json | ||
|
||
|
||
build_stage: | ||
stage: build | ||
variables: | ||
PATH_GEONATURE_FRONTEND: '/home/geonatureadmin/geonature/frontend' | ||
script: | ||
- | | ||
ssh ${SERVEUR} -p 3022 <<'ENDSSH' | ||
export NVM_DIR="$HOME/.nvm" && . "$NVM_DIR/nvm.sh" --no-use && | ||
cd /home/geonatureadmin/geonature/frontend && | ||
ls -al && | ||
echo $NVM_DIR && | ||
nvm use && npm run build && | ||
exit | ||
ENDSSH | ||
- ssh ${SERVEUR} -p 3022 "ls -al && pwd" | ||
- ls -al | ||
- pwd | ||
tags: | ||
- node | ||
rules: | ||
- if: $CI_COMMIT_BRANCH == "deploy" | ||
when: always | ||
|
||
relooad_backend_stage: | ||
stage: reload_service | ||
variables: | ||
SERVICE_GEONATURE: 'geonature.service' | ||
script: | ||
- | | ||
ssh ${SERVEUR} -p 3022 <<'ENDSSH' | ||
sudo systemctl restart geonature.service && | ||
exit | ||
ENDSSH | ||
- ssh ${SERVEUR} -p 3022 "ls -al && pwd" | ||
- ls -al | ||
- pwd | ||
tags: | ||
- node | ||
only: | ||
- deploy | ||
|
||
# deploy_stage: | ||
# stage: deploy | ||
# script: | ||
# - which rsync || ( apt update -y && apt install rsync -y ) | ||
# - ls -la | ||
# - /sbin/ip route|awk '/default/ { print $3 }' | ||
# - echo ${SERVEUR} | ||
# # - /usr/bin/rsync -r ./web/dist/ ${SERVEUR}:${CHEMIN}. --exclude-from="exclude.build" | ||
# only: | ||
# - deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters