From 3438960f04a8fa86f4a8e97cf0663493e23cc898 Mon Sep 17 00:00:00 2001 From: buffer0x7cd Date: Tue, 10 Apr 2018 03:49:38 +0530 Subject: [PATCH 1/5] Added Jenkinsfile for jenkins pipeline --- Jenkinsfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..81a165f772 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,15 @@ +pipeline{ + agent { + docker { + image 'node:6-alpine' + args '-p 3000:3000' + } + } + stages{ + stage('Build'){ + steps{ + sh 'npm install' + } + } + } +} \ No newline at end of file From 9f766a32fc551dd39e3a0de4ed86987757e256cd Mon Sep 17 00:00:00 2001 From: buffer0x7cd Date: Tue, 10 Apr 2018 04:06:56 +0530 Subject: [PATCH 2/5] updated jenkins file --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 81a165f772..94f15a7261 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,14 @@ pipeline{ } } stages{ + stage('Checkout'){ + steps{ + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/Buffer0x7cd/simple-node-js-react-npm-app.git']]]) + } + } + stage('Project Directory'){ + sh 'cd simple-node-js-react-npm-app' + } stage('Build'){ steps{ sh 'npm install' From 2736c88ddaf1991962149b94ce45fcaf0f608181 Mon Sep 17 00:00:00 2001 From: buffer0x7cd Date: Tue, 10 Apr 2018 04:09:45 +0530 Subject: [PATCH 3/5] Fixed project directory stage --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 94f15a7261..9b45b41e01 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,9 @@ pipeline{ } } stage('Project Directory'){ - sh 'cd simple-node-js-react-npm-app' + steps{ + sh 'cd simple-node-js-react-npm-app' + } } stage('Build'){ steps{ From 276f5a99d65c2786639892ac66e521b7cf5bca17 Mon Sep 17 00:00:00 2001 From: buffer0x7cd Date: Tue, 10 Apr 2018 04:12:46 +0530 Subject: [PATCH 4/5] Some changes in Jenkinsfile --- Jenkinsfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9b45b41e01..01bf625367 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,13 +11,9 @@ pipeline{ checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/Buffer0x7cd/simple-node-js-react-npm-app.git']]]) } } - stage('Project Directory'){ - steps{ - sh 'cd simple-node-js-react-npm-app' - } - } stage('Build'){ steps{ + sh 'cd simple-node-js-react-npm-app' sh 'npm install' } } From 650fe15736a8f105556333a951a78bb1ae1fc543 Mon Sep 17 00:00:00 2001 From: buffer0x7cd Date: Tue, 10 Apr 2018 04:14:58 +0530 Subject: [PATCH 5/5] Some changes in Jenkinsfile --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 01bf625367..af84bacfbc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,6 @@ pipeline{ } stage('Build'){ steps{ - sh 'cd simple-node-js-react-npm-app' sh 'npm install' } }