-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathJenkinsfile
48 lines (48 loc) · 1.36 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
pipeline {
options {
timeout(time: 45, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr:'10'))
disableConcurrentBuilds(abortPrevious: true)
}
agent {
label "centos-latest"
}
tools {
maven 'apache-maven-latest'
jdk 'temurin-jdk17-latest'
}
stages {
stage('Build') {
steps {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh """
mvn -B clean verify -f pom.xml \
-Peclipse-sign,uts,its,ci \
-Dtycho.surefire.timeout=720 \
-Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true
"""
}
}
post {
always {
archiveArtifacts artifacts: 'org.eclipse.*.site/target/repository/**/*,org.eclipse.*.site/target/*.zip,*/target/work/data/.metadata/.log,*/target/work/configuration/**'
junit '*/target/surefire-reports/TEST-*.xml,*/*/target/surefire-reports/TEST-*.xml'
}
}
}
stage('Deploy Snapshot') {
when {
branch 'master'
}
steps {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
ssh [email protected] "rm -rf /home/data/httpd/download.eclipse.org/technology/m2e/m2e-wtp/snapshots/*"
scp -r org.eclipse.m2e.wtp.site/target/repository/* [email protected]:/home/data/httpd/download.eclipse.org/technology/m2e/m2e-wtp/snapshots/
'''
}
}
}
}
}