From f48e9b8063f6e4aaa87954687f627d81d432f8af Mon Sep 17 00:00:00 2001 From: Thanh Vu Date: Fri, 15 Jun 2018 16:15:27 +0700 Subject: [PATCH 1/6] init pipeline --- Jenkinsfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..f20fd35ea8 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,16 @@ +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 85050178ba0ad6657ebc26696677c38a91dc9c79 Mon Sep 17 00:00:00 2001 From: Thanh Vu Date: Fri, 15 Jun 2018 16:43:30 +0700 Subject: [PATCH 2/6] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8a36e36b2c..cbecbf9674 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,5 @@ The `jenkins` directory contains an example of the `Jenkinsfile` (i.e. Pipeline) you'll be creating yourself during the tutorial and the `scripts` subdirectory contains shell scripts with commands that are executed when Jenkins processes the "Test" and "Deliver" stages of your Pipeline. + +Update test jenkins From dd9f9370849ec0e62aa877618f2b2b75c9d14942 Mon Sep 17 00:00:00 2001 From: Thanh Vu Date: Fri, 15 Jun 2018 16:47:57 +0700 Subject: [PATCH 3/6] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index cbecbf9674..8a36e36b2c 100644 --- a/README.md +++ b/README.md @@ -12,5 +12,3 @@ The `jenkins` directory contains an example of the `Jenkinsfile` (i.e. Pipeline) you'll be creating yourself during the tutorial and the `scripts` subdirectory contains shell scripts with commands that are executed when Jenkins processes the "Test" and "Deliver" stages of your Pipeline. - -Update test jenkins From 0a6b3f2be333e3766affcf62f6763c87e1ec16bb Mon Sep 17 00:00:00 2001 From: Thanh Vu Date: Sat, 16 Jun 2018 01:38:39 +0700 Subject: [PATCH 4/6] Added Jenkinsfile --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index f20fd35ea8..81a5deebe4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,5 +12,13 @@ pipeline { sh 'npm install' } } + stage('Test') { + steps { + sh './jenkins/scripts/test.sh' + } + } + } + environment { + CI = 'true' } } \ No newline at end of file From 1ae6d75fa33ff3f29be8eb068a672e610a3efa44 Mon Sep 17 00:00:00 2001 From: Thanh Vu Date: Sat, 16 Jun 2018 01:43:59 +0700 Subject: [PATCH 5/6] add Deliver pipeline --- Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 81a5deebe4..ebc74993c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,13 @@ pipeline { sh './jenkins/scripts/test.sh' } } + stage('Deliver') { + steps { + sh './jenkins/scripts/deliver.sh' + echo 'Finished using the web site? (Click "Proceed" to continue)' + sh './jenkins/scripts/kill.sh' + } + } } environment { CI = 'true' From b0d07c678cd01116ab23fc0742d0dcc8aaf02da7 Mon Sep 17 00:00:00 2001 From: Thanh Vu Date: Sat, 16 Jun 2018 01:49:00 +0700 Subject: [PATCH 6/6] Added Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ebc74993c1..e2adc27925 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { stage('Deliver') { steps { sh './jenkins/scripts/deliver.sh' - echo 'Finished using the web site? (Click "Proceed" to continue)' + input 'Finished using the web site? (Click "Proceed" to continue)' sh './jenkins/scripts/kill.sh' } }