forked from eclipse-lemminx/lemminx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (45 loc) · 1.27 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{
agent any
tools {
jdk 'adoptopenjdk-hotspot-jdk8-latest'
}
environment {
MAVEN_HOME = "$WORKSPACE/.m2/"
MAVEN_USER_HOME = "$MAVEN_HOME"
}
stages{
stage("Maven Build"){
steps {
withMaven {
sh './mvnw clean verify -B -Pci,generate-p2 -Dcbi.jarsigner.skip=false'
}
}
}
stage('Deploy to downloads.eclipse.org') {
when {
branch 'main'
}
steps {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
targetDir=/home/data/httpd/download.eclipse.org/lemminx/snapshots
ssh [email protected] rm -rf $targetDir
ssh [email protected] mkdir -p $targetDir
scp -r org.eclipse.lemminx/target/org.eclipse.lemminx-* [email protected]:$targetDir
ssh [email protected] unzip $targetDir/org.eclipse.lemminx-p2repo.zip -d $targetDir/repository
'''
}
}
}
stage ('Deploy Maven artifacts') {
when {
branch 'main'
}
steps {
withMaven {
sh './mvnw clean deploy -B -Pci,generate-p2 -DskipTests -Dcbi.jarsigner.skip=false'
}
}
}
}
}