From dbb138f15c6806568ccae2f75c689622e1c71095 Mon Sep 17 00:00:00 2001
From: pazifargan <118433295+pazifargan@users.noreply.github.com>
Date: Thu, 17 Nov 2022 11:00:34 +0200
Subject: [PATCH 1/6] Update Jenkinsfile
d
---
Jenkinsfile | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index eb3c073..29b571d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,28 +1,29 @@
pipeline {
agent any
+
stages {
- stage("Initialize") {
+ stage('cleanWs') {
steps {
cleanWs()
}
}
- stage('Get SCM') {
+ stage('pull') {
steps {
- git "https://github.com/ranazrad/simple-webapp-nodejs.git"
- sh "cat Jenkinsfile"
+ git 'https://github.com/pazifargan/simple-webapp-nodejs.git'
}
}
- stage('Build') {
+ stage('build') {
steps {
- sh "docker build -t nodewebapp ."
- sh "docker images"
+ nodejs('nodejs8') {
+ sh 'npm install'
+ }
}
}
- stage('Deploy') {
+ stage('test') {
steps {
- sh "docker kill nodewebapp"
- sh "docker rm nodewebapp"
- sh "docker run -itd --name nodewebapp -p 8081:3000 nodewebapp:latest &"
+ nodejs('nodejs8') {
+ sh 'npm test'
+ }
}
}
}
From 67cf5441777f8af71e5e7859f50e9e5b9220dc5d Mon Sep 17 00:00:00 2001
From: pazifargan <118433295+pazifargan@users.noreply.github.com>
Date: Thu, 17 Nov 2022 11:08:28 +0200
Subject: [PATCH 2/6] Update index.jade
.
---
views/index.jade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/index.jade b/views/index.jade
index 266c4f3..c45ed05 100644
--- a/views/index.jade
+++ b/views/index.jade
@@ -4,6 +4,6 @@ block content
h1= title
p Welcome to Your Web Application
- //Remove the follwoing comments and tigger the CI\CD pipeline (Make sure to ident correctly)
+ //Remove the follwoing comments and tigger the CI\CD pipeline (Make sure to ident correctly).
h3 This application was deployed using CI\CD (docker pipeline) by Jenkins
From 7a363738e51e325c5a18100822693a2452e240b5 Mon Sep 17 00:00:00 2001
From: pazifargan <118433295+pazifargan@users.noreply.github.com>
Date: Thu, 17 Nov 2022 11:08:46 +0200
Subject: [PATCH 3/6] Update index.jade
---
views/index.jade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/index.jade b/views/index.jade
index c45ed05..266c4f3 100644
--- a/views/index.jade
+++ b/views/index.jade
@@ -4,6 +4,6 @@ block content
h1= title
p Welcome to Your Web Application
- //Remove the follwoing comments and tigger the CI\CD pipeline (Make sure to ident correctly).
+ //Remove the follwoing comments and tigger the CI\CD pipeline (Make sure to ident correctly)
h3 This application was deployed using CI\CD (docker pipeline) by Jenkins
From 83142da18e152acd172d96c9b870aaa62f533537 Mon Sep 17 00:00:00 2001
From: pazifargan <118433295+pazifargan@users.noreply.github.com>
Date: Thu, 17 Nov 2022 11:10:20 +0200
Subject: [PATCH 4/6] Update index.jade
---
views/index.jade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/index.jade b/views/index.jade
index 266c4f3..c45ed05 100644
--- a/views/index.jade
+++ b/views/index.jade
@@ -4,6 +4,6 @@ block content
h1= title
p Welcome to Your Web Application
- //Remove the follwoing comments and tigger the CI\CD pipeline (Make sure to ident correctly)
+ //Remove the follwoing comments and tigger the CI\CD pipeline (Make sure to ident correctly).
h3 This application was deployed using CI\CD (docker pipeline) by Jenkins
From 7a49ce8a9d086212b331f3831bdbd5e4c06353ec Mon Sep 17 00:00:00 2001
From: pazifargan <118433295+pazifargan@users.noreply.github.com>
Date: Thu, 17 Nov 2022 11:11:13 +0200
Subject: [PATCH 5/6] Update index.jade
---
views/index.jade | 1 +
1 file changed, 1 insertion(+)
diff --git a/views/index.jade b/views/index.jade
index c45ed05..ff93c7c 100644
--- a/views/index.jade
+++ b/views/index.jade
@@ -5,5 +5,6 @@ block content
p Welcome to Your Web Application
//Remove the follwoing comments and tigger the CI\CD pipeline (Make sure to ident correctly).
+ //noooo
h3 This application was deployed using CI\CD (docker pipeline) by Jenkins
From a0a1b55bef4bdaf12afd2df142eb4b4e57d90886 Mon Sep 17 00:00:00 2001
From: pazifargan <118433295+pazifargan@users.noreply.github.com>
Date: Thu, 17 Nov 2022 11:12:19 +0200
Subject: [PATCH 6/6] Update index.jade
---
views/index.jade | 1 -
1 file changed, 1 deletion(-)
diff --git a/views/index.jade b/views/index.jade
index ff93c7c..c45ed05 100644
--- a/views/index.jade
+++ b/views/index.jade
@@ -5,6 +5,5 @@ block content
p Welcome to Your Web Application
//Remove the follwoing comments and tigger the CI\CD pipeline (Make sure to ident correctly).
- //noooo
h3 This application was deployed using CI\CD (docker pipeline) by Jenkins