From e04d2d989bf6d30a0d175911bdf57ee6783f59b6 Mon Sep 17 00:00:00 2001 From: asaf-haligua <66241065+asaf-haligua@users.noreply.github.com> Date: Sun, 10 Jul 2022 17:02:36 +0300 Subject: [PATCH 1/8] Delete Jenkinsfile --- Jenkinsfile | 73 ----------------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 715c5b58..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,73 +0,0 @@ -pipeline { - agent any - stages { - stage('chekout code') { - parallel { - stage('chekout code') { - steps { - git(url: 'git@github.com:lidorg-dev/NodeJS-EmptySiteTemplate.git', branch: 'master', credentialsId: 'github') - } - } - - stage('say hello to me ') { - steps { - sh 'echo "Hello"' - } - } - - } - } - - stage('Build') { - steps { - sh 'npm install' - } - } - - stage('Test App') { - parallel { - stage('Run the App') { - steps { - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh 'node server.js' - } - - } - } - - stage('check if app is running') { - steps { - sh '''sleep 5 -curl localhost:8081 -if [ $(echo $?) -eq 0 ]; -then - echo "success" - ps -ef | grep node | awk \'{print $2}\' | head -n 1 | xargs kill - exit 0 -else - echo "failure" - exit 1 -fi ''' - } - } - - } - } - - stage('Package') { - steps { - sh '''mkdir target && rsync -Rr . target/ -tar -czvf package-$BUILD_ID.tar.gz target/ -''' - } - } - - stage('Archive Artifact') { - steps { - archiveArtifacts '*.tar.gz' - sh 'rm -rf *' - } - } - - } -} \ No newline at end of file From 5208fe0cc99cc1eda4eecff4f666bb3fa0e1554e Mon Sep 17 00:00:00 2001 From: asaf-haligua <66241065+asaf-haligua@users.noreply.github.com> Date: Sun, 10 Jul 2022 17:02:56 +0300 Subject: [PATCH 2/8] Delete server.js --- server.js | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 server.js diff --git a/server.js b/server.js deleted file mode 100644 index 618252d6..00000000 --- a/server.js +++ /dev/null @@ -1,8 +0,0 @@ -var http = require('http'); - -http.createServer(function (req, res) { - - res.writeHead(200, { 'Content-Type': 'text/html' }); - res.end('Hello, Lidor!'); - -}).listen(process.env.PORT || 8081); From 99f5c0373fc91a4f875bdc4792e08598aafe7be7 Mon Sep 17 00:00:00 2001 From: asaf-haligua <66241065+asaf-haligua@users.noreply.github.com> Date: Sun, 10 Jul 2022 17:33:36 +0300 Subject: [PATCH 3/8] Added Jenkinsfile --- Jenkinsfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..669c690a --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,28 @@ +pipeline { + agent any + stages { + stage('checkout code') { + parallel { + stage('checkout code') { + steps { + git(url: 'git@github.com:asaf-haligua/NodeJS-EmptySiteTemplate.git', branch: 'master', credentialsId: 'githubas-jenkins ') + } + } + + stage('say hello to me') { + steps { + sh 'echo "Hello"' + } + } + + } + } + + stage('Build') { + steps { + sh 'npm install' + } + } + + } +} \ No newline at end of file From f10d26a42cea6519f2c00a2c48905ec3c0780c3c Mon Sep 17 00:00:00 2001 From: asaf-haligua <66241065+asaf-haligua@users.noreply.github.com> Date: Sun, 10 Jul 2022 17:51:14 +0300 Subject: [PATCH 4/8] Added Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 669c690a..af92dea6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { parallel { stage('checkout code') { steps { - git(url: 'git@github.com:asaf-haligua/NodeJS-EmptySiteTemplate.git', branch: 'master', credentialsId: 'githubas-jenkins ') + git(url: 'git@github.com:asaf-haligua/NodeJS-EmptySiteTemplate.git', branch: 'master', credentialsId: 'github') } } From c9245bbdebca3c98c997c156becddde2530588f8 Mon Sep 17 00:00:00 2001 From: asaf-haligua <66241065+asaf-haligua@users.noreply.github.com> Date: Sun, 10 Jul 2022 17:52:25 +0300 Subject: [PATCH 5/8] Added Jenkinsfile From e5135d3efb7618ad328a5568173f15634820f5f5 Mon Sep 17 00:00:00 2001 From: asaf-haligua <66241065+asaf-haligua@users.noreply.github.com> Date: Sun, 10 Jul 2022 17:53:50 +0300 Subject: [PATCH 6/8] Added Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index af92dea6..669c690a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { parallel { stage('checkout code') { steps { - git(url: 'git@github.com:asaf-haligua/NodeJS-EmptySiteTemplate.git', branch: 'master', credentialsId: 'github') + git(url: 'git@github.com:asaf-haligua/NodeJS-EmptySiteTemplate.git', branch: 'master', credentialsId: 'githubas-jenkins ') } } From 9958bcabdc5f616f81ed814f760cdddd7fe418ae Mon Sep 17 00:00:00 2001 From: asaf-haligua <66241065+asaf-haligua@users.noreply.github.com> Date: Sun, 10 Jul 2022 19:04:43 +0300 Subject: [PATCH 7/8] Delete Jenkinsfile --- Jenkinsfile | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 669c690a..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,28 +0,0 @@ -pipeline { - agent any - stages { - stage('checkout code') { - parallel { - stage('checkout code') { - steps { - git(url: 'git@github.com:asaf-haligua/NodeJS-EmptySiteTemplate.git', branch: 'master', credentialsId: 'githubas-jenkins ') - } - } - - stage('say hello to me') { - steps { - sh 'echo "Hello"' - } - } - - } - } - - stage('Build') { - steps { - sh 'npm install' - } - } - - } -} \ No newline at end of file From c0a393806d5e27fb3e4615c5ab35632895a31357 Mon Sep 17 00:00:00 2001 From: asaf-haligua <66241065+asaf-haligua@users.noreply.github.com> Date: Sun, 10 Jul 2022 19:06:21 +0300 Subject: [PATCH 8/8] Added Jenkinsfile --- Jenkinsfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..669c690a --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,28 @@ +pipeline { + agent any + stages { + stage('checkout code') { + parallel { + stage('checkout code') { + steps { + git(url: 'git@github.com:asaf-haligua/NodeJS-EmptySiteTemplate.git', branch: 'master', credentialsId: 'githubas-jenkins ') + } + } + + stage('say hello to me') { + steps { + sh 'echo "Hello"' + } + } + + } + } + + stage('Build') { + steps { + sh 'npm install' + } + } + + } +} \ No newline at end of file