diff --git a/Jenkinsfile b/Jenkinsfile index bc8a0d6..8826449 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any stages { - stage('Test Neutral') { + stage('[Neutral] - Test') { steps { echo "[Neutral-Deploy] - Test Stage" // sh "git clone git clone https://git.raphix.fr/infrastructure/neutral.git neutral" @@ -10,12 +10,12 @@ pipeline { } } - stage('Deploy Neutral') { + stage('[Neutral] - Deploy') { steps { echo "[Neutral-Deploy] - Deploy Stage" sh "ssh raphix@raphix.fr sudo apt update -y" sh "ssh raphix@raphix.fr sudo apt upgrade -y" - sh "ssh raphix@raphix.fr sudo -u 'gitlab-ci' /home/gitlab-ci/neutral_deploy.sh" + sh "ssh raphix@raphix.fr sudo -S -u gitlab-ci /home/gitlab-ci/neutral_deploy.sh" } } } diff --git a/neutral-functions.js b/neutral-functions.js index 1572486..dbe57bd 100644 --- a/neutral-functions.js +++ b/neutral-functions.js @@ -3,7 +3,6 @@ var uuid = require('uuid') var path = require("path") var CryptoJS = require("crypto-js") var Jimp = require("jimp") -const { compileString } = require("sass") module.exports.checkUser = () => { diff --git a/public/templates/files.html b/public/templates/files.html index 36a8849..33753b6 100644 --- a/public/templates/files.html +++ b/public/templates/files.html @@ -28,7 +28,7 @@ const currentDir = document.getElementById("fi_current_directory") const fileExplorer = document.getElementById("fileExplorer") - const fileExplorerError = fileExplorer.outerHTML + const fileExplorerError = '

Revenir au dossier parent

' + fileExplorer.outerHTML getDirectory(currentDir.value) @@ -65,6 +65,7 @@ if(response.result == "failed") { + fileExplorerList.push('

Revenir au dossier parent

') content.innerHTML = '

Erreur de chargement des données - Erreur : ' + response.content + '

' console.log("FAILED") @@ -255,6 +256,10 @@ currentDir.value = cdSplit.join("/") + if(currentDir.value == "") { + currentDir.value = "/" + } + getDirectory(currentDir.value) diff --git a/script/neutral_deploy.sh b/script/neutral_deploy.sh index ec63827..9b3d925 100644 --- a/script/neutral_deploy.sh +++ b/script/neutral_deploy.sh @@ -1,7 +1,6 @@ echo "[Neutral-Deploy] - Stage - Déploiement - START " echo "[Neutral-Deploy] - Arrêt de Neutral : Processing" cd /home/gitlab-ci -pwd pm2 stop Neutral pm2 delete Neutral echo "[Neutral-Deploy] - Arrêt de Neutral : Success" @@ -13,12 +12,10 @@ git clone https://git.raphix.fr/infrastructure/neutral.git echo "[Neutral-Deploy] - Installation de Neutral : Success" echo "[Neutral-Deploy] - Installation des dépendances : Processing" cd /home/gitlab-ci/neutral -pwd npm install echo "[Neutral-Deploy] - Installation des dépendances : Success" echo "[Neutral-Deploy] - Démarrage de Neutral : Processing" cd /home/gitlab-ci -pwd pm2 start neutral.config.js echo "[Neutral-Deploy] - Démarrage de Neutral : Success" echo "[Neutral-Deploy] - Stage - Déploiement - END"