diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..d766b69b25 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,24 @@ +pipeline { + agent { + docker { + args '-p 3000:3000' + image 'node:6-alpine' + } + + } + stages { + stage('Build') { + steps { + sh 'npm install' + } + } + stage('Test') { + environment { + CI = 'true' + } + steps { + sh './jenkins/scripts/test.sh' + } + } + } +} \ No newline at end of file diff --git a/README.md b/README.md index 8a36e36b2c..2c6ee61a2c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# simple-node-js-react-npm-app + simple-node-js-react-npm-app This repository is for the [Build a Node.js and React app with npm](https://jenkins.io/doc/tutorials/build-a-node-js-and-react-app-with-npm/) @@ -11,4 +11,4 @@ check that the application renders satisfactorily. 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. +the "Test" and "Deliver" stagues of your Pipeline.