-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
40 lines (39 loc) · 1.41 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pipeline {
agent {
docker {
image 'silverpeas/silverbuild'
args '-v $HOME/.m2:/home/silverbuild/.m2 -v $HOME/.gitconfig:/home/silverbuild/.gitconfig -v $HOME/.ssh:/home/silverbuild/.ssh -v $HOME/.gnupg:/home/silverbuild/.gnupg'
}
}
stages {
stage('Publish project web site') {
steps {
script {
// publish the project web site only for the master branch
git credentialsId: 'cacc0467-7c85-41d1-bf4e-eaa470dd5e59', branch: 'master', poll: false, url: "https://github.com/Silverpeas/Silverpeas-Project-Web-Site"
def status = sh script: """
mvn clean site-deploy
""", returnStatus: true
if (status != 0) {
emailext(
subject: "Silverpeas Web Site publishing failure!",
body: """
I was unable to publish the Silverpeas Community Web Site to www.silverpeas.org!
Please, consult the console log of the build ${currentBuild.displayName} of ${currentBuild.projectName}
""",
)
}
}
}
}
}
post {
always {
step([$class : 'Mailer',
notifyEveryUnstableBuild: true,
sendToIndividuals : true])
}
}
}