forked from eclipse-lsp4e/lsp4e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (45 loc) · 1.24 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
pipeline {
options {
timeout(time: 40, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr:'10'))
}
agent {
label "centos-latest"
}
tools {
maven 'apache-maven-latest'
jdk 'openjdk-jdk17-latest'
}
stages {
stage('Build') {
steps {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh 'mvn clean verify org.eclipse.dash:license-tool-plugin:license-check -B -Psign -Dmaven.repo.local=$WORKSPACE/.m2/repository -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true -Ddash.fail=false'
}
}
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 'master'
}
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}
'''
}
}
}
}
}