diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..df8223fdac --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,30 @@ +pipeline { + agent { + docker { + image 'node:6-alpine' + args '-p 3000:3000' + } + } + environment { + CI = 'true' + } + stages { + stage('Build') { + steps { + sh 'npm install' + } + } + stage('Test') { + steps { + 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' + } + } + } +} diff --git a/jenkins/scripts/test.sh b/jenkins/scripts/test.sh index 360d00b94e..6789ebcef0 100755 --- a/jenkins/scripts/test.sh +++ b/jenkins/scripts/test.sh @@ -10,7 +10,7 @@ echo 'installing this dependency, it would typically be done so using this' echo 'flag. For a comprehensive explanation about "devDependencies", see' echo 'https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies.' set -x -# npm install --save-dev cross-env +npm install --save-dev cross-env set +x echo 'The following "npm" command tests that your simple Node.js/React'