forked from eclipse/lsp4jakarta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
71 lines (71 loc) · 2.47 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
59
60
61
62
63
64
65
66
67
68
69
70
71
pipeline {
agent any
tools {
jdk 'temurin-jdk17-latest'
}
environment {
MAVEN_HOME = "$WORKSPACE/.m2/"
MAVEN_USER_HOME = "$MAVEN_HOME"
}
stages {
stage("Build LSP4Jakarta JDT extension"){
steps {
withMaven {
sh 'cd jakarta.jdt && ./mvnw clean verify -B -Peclipse-sign && cd ..'
}
}
}
stage('Deploy LSP4Jakarta JDT extension to repo.eclipse.org and downloads.eclipse.org') {
when {
branch 'main'
}
steps {
withMaven {
sh 'cd jakarta.jdt && ./mvnw deploy -B -Peclipse-sign -DskipTests && cd ..'
}
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
VERSION=`grep -o '[0-9].*[0-9]' jakarta.jdt/org.eclipse.lsp4jakarta.jdt.core/target/maven-archiver/pom.properties`
targetDir=/home/data/httpd/download.eclipse.org/lsp4jakarta/snapshots/$VERSION
ssh [email protected] rm -rf $targetDir
ssh [email protected] mkdir -p $targetDir
scp -r jakarta.jdt/org.eclipse.lsp4jakarta.jdt.site/target/*.zip [email protected]:$targetDir
ssh [email protected] unzip $targetDir/*.zip -d $targetDir/repository
'''
}
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
VERSION=latest
targetDir=/home/data/httpd/download.eclipse.org/lsp4jakarta/snapshots/$VERSION
ssh [email protected] rm -rf $targetDir
ssh [email protected] mkdir -p $targetDir
scp -r jakarta.jdt/org.eclipse.lsp4jakarta.jdt.site/target/*.zip [email protected]:$targetDir
ssh [email protected] unzip $targetDir/*.zip -d $targetDir/repository
'''
}
}
}
stage("Build LSP4Jakarta Language Server") {
steps {
withMaven {
sh 'cd jakarta.ls && ./mvnw clean verify -B -Dcbi.jarsigner.skip=false -X && cd ..'
}
}
}
stage ('Deploy LSP4Jakarta Language Server artifacts to Maven repository') {
when {
branch 'main'
}
steps {
withMaven {
sh 'cd jakarta.ls && ./mvnw deploy -B -DskipTests'
}
}
}
}
post {
always {
junit '**/target/surefire-reports/*.xml'
}
}
}