Skip to content

Commit 2fd5bf1

Browse files
committed
Add Jenkinsfile for our CI
1 parent 96cf3b4 commit 2fd5bf1

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Jenkinsfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
node {
2+
catchError {
3+
def nexusRepo = 'https://www.silverpeas.org/nexus/content/repositories/snapshots/'
4+
docker.image('silverpeas/silverbuild')
5+
.inside('-u root -v $HOME/.m2/settings.xml:/root/.m2/settings.xml -v $HOME/.m2/settings-security.xml:/root/.m2/settings-security.xml -v $HOME/.gitconfig:/root/.gitconfig -v $HOME/.ssh:/root/.ssh -v $HOME/.gnupg:/root/.gnupg') {
6+
stage('Preparation') {
7+
checkout scm
8+
}
9+
stage('Build') {
10+
sh "mvn clean install -Pdeployment -Djava.awt.headless=true -Dcontext=ci"
11+
}
12+
stage('Deployment') {
13+
// deployment to ensure dependencies on this snapshot version of Silverpeas Core for other
14+
// projects to build downstream. By doing so, we keep clean the local maven repository for
15+
// reproducibility reason
16+
sh "mvn deploy -DaltDeploymentRepository=silverpeas::default::${nexusRepo} -Pdeployment -Djava.awt.headless=true -Dmaven.test.skip=true"
17+
}
18+
}
19+
}
20+
step([$class : 'Mailer',
21+
notifyEveryUnstableBuild: true,
22+
recipients : "miguel.moquillon@silverpeas.org, yohann.chastagnier@silverpeas.org, nicolas.eysseric@silverpeas.org",
23+
sendToIndividuals : true])
24+
}

0 commit comments

Comments
 (0)