From 4bf0b260e375afbc9320e1124068052aa921a376 Mon Sep 17 00:00:00 2001 From: Raphix Date: Sun, 19 Mar 2023 17:45:55 +0100 Subject: [PATCH] Test Neutral Pipeline #3 --- Jenkinsfile | 2 +- app.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 86c18f5..e6d092a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { sh "git clone https://git.raphix.fr/infrastructure/neutral.git" sh "cd neutral" sh "npm i" - sh "PORT=3100 node bin/www" + sh "ENV='TEST' node bin/www" } } diff --git a/app.js b/app.js index fc6ba27..81fa8a7 100644 --- a/app.js +++ b/app.js @@ -68,5 +68,13 @@ app.use(function(err, req, res, next) { ntr.checkUser() +if ("ENV" in process.env) { + if(process.env.ENV == "TEST") { + process.exit(1) + + } + +} + module.exports = app;