Fix Install Jenkins
Some checks failed
Neutral/pipeline/head There was a failure building this commit
Some checks failed
Neutral/pipeline/head There was a failure building this commit
This commit is contained in:
parent
9a354b69b5
commit
a01851211f
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -2,24 +2,20 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Install Neutral') {
|
|
||||||
steps {
|
|
||||||
echo "[Neutral-Deploy] - Installation Stage"
|
|
||||||
sh "ssh raphix@raphix.fr 'pwd'"
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Test Neutral') {
|
stage('Test Neutral') {
|
||||||
steps {
|
steps {
|
||||||
echo "[Neutral-Deploy] - Test Stage"
|
echo "[Neutral-Deploy] - Test Stage"
|
||||||
sh "ssh raphix@raphix.fr 'pwd'"
|
// sh "git clone git clone https://git.raphix.fr/infrastructure/neutral.git neutral"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy Neutral') {
|
stage('Deploy Neutral') {
|
||||||
steps {
|
steps {
|
||||||
echo "[Neutral-Deploy] - Deploy Stage"
|
echo "[Neutral-Deploy] - Deploy Stage"
|
||||||
sh "ssh raphix@raphix.fr 'echo Test'"
|
sh "ssh raphix@raphix.fr sudo apt update"
|
||||||
|
sh "ssh raphix@raphix.fr sudo apt upgrade"
|
||||||
|
sh "ssh raphix@raphix.fr /home/gitlab-ci/neutral_deploy.sh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
bin/www
2
bin/www
@ -12,7 +12,7 @@ var http = require('http');
|
|||||||
* Get port from environment and store in Express.
|
* Get port from environment and store in Express.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var port = normalizePort(process.env.PORT || '80');
|
var port = normalizePort(process.env.PORT || '3001');
|
||||||
app.set('port', port);
|
app.set('port', port);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
20
script/neutral_deploy.sh
Normal file
20
script/neutral_deploy.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
echo "[Neutral-Deploy] - Stage - Déploiement - START "
|
||||||
|
echo "[Neutral-Deploy] - Arrêt de Neutral : Processing"
|
||||||
|
pm2 stop Neutral
|
||||||
|
pm2 delete neutral
|
||||||
|
echo "[Neutral-Deploy] - Arrêt de Neutral : Success"
|
||||||
|
echo "[Neutral-Deploy] - Supression de Neutral : Processing"
|
||||||
|
rm -rf ./neutral
|
||||||
|
echo "[Neutral-Deploy] - Supression de Neutral : Success"
|
||||||
|
echo "[Neutral-Deploy] - Installation de Neutral : Processing"
|
||||||
|
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 ./neutral
|
||||||
|
npm install
|
||||||
|
echo "[Neutral-Deploy] - Installation des dépendances : Success"
|
||||||
|
echo "[Neutral-Deploy] - Démarrage de Neutral : Processing"
|
||||||
|
cd ..
|
||||||
|
pm2 start neutral.config.js
|
||||||
|
echo "[Neutral-Deploy] - Démarrage de Neutral : Success"
|
||||||
|
echo "[Neutral-Deploy] - Stage - Déploiement - END"
|
Loading…
x
Reference in New Issue
Block a user