forked from eclipse-gef/gef-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
55 lines (53 loc) · 1.93 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
pipeline {
options {
timeout(time: 240, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr:'20'))
disableConcurrentBuilds(abortPrevious: true)
}
agent {
label "centos-7"
}
tools {
maven 'apache-maven-latest'
jdk 'openjdk-jdk17-latest'
}
stages {
stage('Build') {
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
sh '''
export GDK_BACKEND=x11
mvn clean verify -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-DapiBaselineTargetDirectory=${WORKSPACE} \
-Dgpg.passphrase="${KEYRING_PASSPHRASE}" \
-Dproject.build.sourceEncoding=UTF-8 \
-Peclipse-sign
'''
}
}
post {
always {
archiveArtifacts artifacts: '.*log,org.eclipse.gef.repository/target/repository/*', allowEmptyArchive: true
junit(
allowEmptyResults: true,
testResults: '**/target/surefire-reports/*.xml'
)
}
failure {
mail bcc: '', body: "<b>GEF Classic: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL de build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: GEF Classic -> ${env.JOB_NAME}", to: "[email protected]";
}
}
}
stage('Deploy') {
steps {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
ssh -o BatchMode=yes [email protected] rm -rf /home/data/httpd/download.eclipse.org/tools/gef/classic/latest
ssh -o BatchMode=yes [email protected] mkdir -p /home/data/httpd/download.eclipse.org/tools/gef/classic/latest
scp -o BatchMode=yes -r org.eclipse.gef.repository/target/repository/* [email protected]:/home/data/httpd/download.eclipse.org/tools/gef/classic/latest
'''
}
}
}
}
}