Skip to content

Commit

Permalink
Add native-image build in Jenkinsfile
Browse files Browse the repository at this point in the history
Builds and archives a binary version of the server,
as well as its sha256 hash.
Only for Windows and Linux as of right now.

Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 committed Sep 16, 2020
1 parent 5f566ec commit d04f081
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ pipeline{
}
stages{
stage("Maven Build"){
steps {
withMaven {
sh './mvnw clean verify -B -Pci,generate-p2 -Dcbi.jarsigner.skip=false'
}
steps {
withMaven {
sh './mvnw clean verify -B -Pci,generate-p2 -Dcbi.jarsigner.skip=false'
}
}
}
stage('Deploy to downloads.eclipse.org') {
when {
Expand Down
41 changes: 41 additions & 0 deletions NativeImage.jenkins
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pipeline {
agent{
none
}
stages {
stage("native-image") {
parallel {
stage("Linux native-image") {
agent {
docker "oracle/graalvm-ce:latest"
}
environment {
MAVEN_HOME = "$WORKSPACE/.m2/"
MAVEN_USER_HOME = "$MAVEN_HOME"
}
steps {
sh "./mvnw package -Pnative -DskipTests"
archiveArtifacts artifacts: 'org.eclipse.lemminx/target/lemminx-linux*', fingerprint: true
sh "sha256sum org.eclipse.lemminx/target/lemminx-linux* > lemminx-linux-hash"
archiveArtifacts artifacts: 'lemminx-linux-hash', fingerprint: false
}
}
/*stage("Windows native-image") {
agent {
label "windows"
}
steps {
powershell "Invoke-WebRequest https:/graalvm/graalvm-ce-builds/releases/download/vm-20.2.0/graalvm-ce-java11-windows-amd64-20.2.0.zip -OutFile graalvm-windows.zip"
powershell "Expand-Archive graalvm-windows.zip"
powershell ".\\graalvm-windows\\graalvm-ce-java11-20.2.0\\bin\\gu install native-image"
bat "set JAVA_HOME=%WORKSPACE%\\graalvm-windows\\graalvm-ce-java11-20.2.0&& echo %JAVA_HOME% && \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat\" && .\\mvnw.cmd package -Pnative -DskipTests"
archiveArtifacts artifacts: 'org.eclipse.lemminx/target/*.exe', fingerprint: true
powershell "Get-FileHash org.eclipse.lemminx\\target\\*.exe | Select -ExpandProperty Hash > lemminx-windows-hash"
archiveArtifacts artifacts: 'lemminx-windows-hash', fingerprint: false
}
}*/
}
}
}
}

0 comments on commit d04f081

Please sign in to comment.