From 7daf7afa7c30e0cd8ec330db1b34d80fd060d0a7 Mon Sep 17 00:00:00 2001 From: "J.D. Liau" Date: Wed, 27 Jun 2018 13:58:38 +0000 Subject: [PATCH 1/7] add Jenkinsfile --- Jenkinsfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..14f0b741ab --- /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' + } + } + } +} From bbb8cce3027cfda2b51219bf64daa6dad0c18f38 Mon Sep 17 00:00:00 2001 From: "J.D. Liau" Date: Wed, 27 Jun 2018 14:26:26 +0000 Subject: [PATCH 2/7] add proxy --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 14f0b741ab..d3935e9fd0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,9 @@ pipeline { stages { stage('Build') { steps { - sh 'npm install' + withEnv(['HTTP_PROXY=http://PITC-Zscaler-Global-ZEN.proxy.corporate.ge.com:80']) { + sh 'npm install' + } } } } From 4d7170202fce1cace9b0eed407b1c7592fd89587 Mon Sep 17 00:00:00 2001 From: "J.D. Liau" Date: Wed, 27 Jun 2018 14:32:26 +0000 Subject: [PATCH 3/7] add proxy --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d3935e9fd0..77de27d8c8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,9 +8,9 @@ pipeline { stages { stage('Build') { steps { - withEnv(['HTTP_PROXY=http://PITC-Zscaler-Global-ZEN.proxy.corporate.ge.com:80']) { - sh 'npm install' - } + sh 'npm config set proxy http://PITC-Zscaler-Global-ZEN.proxy.corporate.ge.com:80' + sh 'npm config set https-proxy http://PITC-Zscaler-Global-ZEN.proxy.corporate.ge.com:80' + sh 'npm install' } } } From 20f474a058bda738af36b69118437d871b2095e2 Mon Sep 17 00:00:00 2001 From: "J.D. Liau" Date: Wed, 27 Jun 2018 14:53:22 +0000 Subject: [PATCH 4/7] remove proxy --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 77de27d8c8..1e584d2a8a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,8 +8,6 @@ pipeline { stages { stage('Build') { steps { - sh 'npm config set proxy http://PITC-Zscaler-Global-ZEN.proxy.corporate.ge.com:80' - sh 'npm config set https-proxy http://PITC-Zscaler-Global-ZEN.proxy.corporate.ge.com:80' sh 'npm install' } } From f3227afb62018ff54a238490ba31a184e20cf87c Mon Sep 17 00:00:00 2001 From: "J.D. Liau" Date: Wed, 27 Jun 2018 15:03:58 +0000 Subject: [PATCH 5/7] add rc file --- .npmrc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..c52f543fe5 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +proxy=http://pitc-zscaler-global-zen.proxy.corporate.ge.com:80/ +https-proxy=http://PITC-Zscaler-Global-ZEN.proxy.corporate.ge.com:80 From 9019f18bb6916b219b4621e4e4d538118c181513 Mon Sep 17 00:00:00 2001 From: "J.D. Liau" Date: Wed, 27 Jun 2018 16:45:43 +0000 Subject: [PATCH 6/7] add test stage --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 1e584d2a8a..26423eb6fa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,11 +5,19 @@ pipeline { args '-p 3000:3000' } } + environment { + CI = 'true' + } stages { stage('Build') { steps { sh 'npm install' } } + stage('Test') { + steps { + sh './jenkins/scripts/test.sh' + } + } } } From dcd520cc194d56a18203e3427a44a11d6be42fce Mon Sep 17 00:00:00 2001 From: "J.D. Liau" Date: Wed, 27 Jun 2018 16:48:45 +0000 Subject: [PATCH 7/7] add deliver stage --- Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 26423eb6fa..54af4c3a7e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,5 +19,12 @@ pipeline { sh './jenkins/scripts/test.sh' } } + stage('Deliver') { + steps { + sh './jenkins/scripts/deliver.sh' + input message: 'Finished using the web site? (Click "Proceed" to continue)' + sh './jenkins/scripts/kill.sh' + } + } } }