Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple pipeline #29

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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'
}
}
8 changes: 4 additions & 4 deletions example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<build>
<plugins>
<plugin>
<!-- <plugin>
<groupId>com.github.github</groupId>
<artifactId>downloads-maven-plugin</artifactId>
<version>0.6</version>
Expand All @@ -61,7 +61,7 @@
<phase>install</phase>
</execution>
</executions>
</plugin>
</plugin> -->
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
Expand Down Expand Up @@ -116,8 +116,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
Expand Down