forked from eclipse-m2e/m2e-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
53 lines (53 loc) · 1.76 KB
/
Copy pathJenkinsfile
File metadata and controls
53 lines (53 loc) · 1.76 KB
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
pipeline {
options {
timeout(time: 180, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr:'10'))
}
agent {
label "centos-latest"
}
tools {
maven 'apache-maven-latest'
jdk 'openjdk-jdk11-latest'
}
stages {
stage('get m2e-core-tests') {
steps {
sh 'git submodule update --init --recursive --remote'
}
}
stage('Build') {
steps {
sh 'mvn clean install -f m2e-maven-runtime/pom.xml -B -Peclipse-sign -Dmaven.repo.local=$WORKSPACE/.m2/repository'
wrap([$class: 'Xvnc', useXauthority: true]) {
sh 'mvn clean verify -f pom.xml -B -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -Peclipse-sign,uts,its -Dmaven.repo.local=$WORKSPACE/.m2/repository -Dtycho.surefire.timeout=7200'
}
}
post {
always {
archiveArtifacts artifacts: 'org.eclipse.*.site/target/repository/**/*,org.eclipse.*.site/target/*.zip,*/target/work/data/.metadata/.log,m2e-core-tests/*/target/work/data/.metadata/.log,m2e-maven-runtime/target/*.properties'
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 '''
M2E_VERSION=$(grep '<m2e.version>.*</m2e.version>' pom.xml | sed -e 's/.*<m2e.version>\\(.*\\)<\\/m2e.version>.*/\\1/')
DOWNLOAD_AREA=/home/data/httpd/download.eclipse.org/technology/m2e/snapshots/${M2E_VERSION}/latest
echo M2E_VERSION=$M2E_VERSION
echo DOWNLOAD_AREA=$DOWNLOAD_AREA
ssh genie.m2e@build.eclipse.org "\
rm -rf ${DOWNLOAD_AREA}/* && \
mkdir -p ${DOWNLOAD_AREA}"
scp -r org.eclipse.m2e.site/target/repository/* genie.m2e@build.eclipse.org:${DOWNLOAD_AREA}
'''
}
}
}
}
}