diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..6fa4974c --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,71 @@ +pipeline { + agent none + stages { + stage('Buzz Build') { + parallel { + stage('Build Java 7') { + agent any + steps { + sh '''mvn clean install -f example/pom.xml + +echo "I am a ${BUZZ_NAME}"''' + } + } + + stage('Build Java 8') { + agent any + steps { + sh 'echo "I am a ${BUZZ_NAME}"' + } + } + + } + } + + stage('Buzz Test') { + parallel { + stage('Testing A 7') { + agent any + steps { + sh 'mvn test -f example/pom.xml' + junit '**/surefire-reports/**/*.xml' + } + } + + stage('Testing B 7') { + agent any + steps { + sh '''sleep 10 +echo done.''' + } + } + + stage('Testing A 8 ') { + agent any + steps { + sh 'mvn test -f example/pom.xml' + } + } + + stage('Testing B 8 ') { + agent any + steps { + sh '''sleep 10 +echo done.''' + } + } + + } + } + + stage('Confirm Deploy to Staging') { + steps { + input(message: 'Deploy to Stage', ok: 'Yes ,Lets do it') + } + } + + } + environment { + BUZZ_NAME = 'Java 8 Bee' + } +} \ No newline at end of file diff --git a/example/pom.xml b/example/pom.xml index 162a7b31..1c57a8b2 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -43,7 +43,7 @@ - + com.github.github site-maven-plugin @@ -116,8 +116,8 @@ org.apache.maven.plugins maven-compiler-plugin - 1.6 - 1.6 + 1.8 + 1.8