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 11, 2020
1 parent 5f566ec commit 4caa870
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,43 @@ 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("native-image") {
parallel {
stage("Linux native-image") {
agent {
label "linux"
}
steps {
sh "wget -O ./graalvm-linux.tar.gz https:/graalvm/graalvm-ce-builds/releases/download/vm-20.2.0/graalvm-ce-java8-linux-amd64-20.2.0.tar.gz"
sh "[ -e ./graalvm-linux.tar.gz ] && tar -xzf ./graalvm-linux.tar.gz"
sh "./graalvm-*/bin/gu install native-image"
sh "JAVA_HOME=./graalvm-ce-java8-20.2.0 ./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
}
}*/
}
}
stage('Deploy to downloads.eclipse.org') {
when {
Expand Down

0 comments on commit 4caa870

Please sign in to comment.