forked from eclipse-lsp4e/lsp4e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
58 lines (52 loc) · 1.32 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
56
57
58
pipeline {
options {
timeout(time: 15, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '10'))
disableConcurrentBuilds(abortPrevious: true)
}
agent {
label 'centos-latest'
}
tools {
jdk 'temurin-jdk17-latest'
}
stages {
stage('Build') {
steps {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh """
./mvnw clean verify \
org.eclipse.dash:license-tool-plugin:license-check \
-B ${env.BRANCH_NAME=='main' ? '-Psign': ''} \
-Dmaven.test.failure.ignore=true \
-Ddash.fail=false \
-Dsurefire.rerunFailingTestsCount=3
"""
}
}
post {
always {
archiveArtifacts artifacts: 'repository/target/repository/**/*,repository/target/*.zip,*/target/work/data/.metadata/.log'
junit '*/target/surefire-reports/TEST-*.xml'
}
}
}
stage('Deploy Snapshot') {
when {
branch 'main'
}
steps {
sshagent (['projects-storage.eclipse.org-bot-ssh']) {
sh '''
DOWNLOAD_AREA=/home/data/httpd/download.eclipse.org/lsp4e/snapshots/
echo DOWNLOAD_AREA=$DOWNLOAD_AREA
ssh [email protected] "\
rm -rf ${DOWNLOAD_AREA}/* && \
mkdir -p ${DOWNLOAD_AREA}"
scp -r repository/target/repository/* [email protected]:${DOWNLOAD_AREA}
'''
}
}
}
}
}