add desktop build step

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2018-12-06 13:22:18 +01:00 committed by Jakub
parent b676de9dac
commit 7d651afaae
2 changed files with 38 additions and 31 deletions

View File

@ -219,8 +219,8 @@ prepare-release: clean-release
mkdir -p $(RELEASE_DIRECTORY)
mv build/bin/statusgo-android-16.aar $(RELEASE_DIRECTORY)/status-go-android.aar
mv build/bin/statusgo-ios-9.3-framework/status-go-ios.zip $(RELEASE_DIRECTORY)/status-go-ios.zip
${MAKE} clean
zip -r $(RELEASE_DIRECTORY)/status-go-desktop.zip . -x *.git*
${MAKE} clean
clean-release:
rm -rf $(RELEASE_DIRECTORY)

View File

@ -30,8 +30,13 @@ pipeline {
stage('Prep') {
steps { script {
lib = load("${env.STATUS_PATH}/_assets/ci/lib.groovy")
version = readFile("${STATUS_PATH}/VERSION").trim()
println("Version: ${version}")
println("Git Branch: ${lib.gitBranch()}")
println("Git Commit: ${lib.gitCommit()}")
/* save and create a dir for artifacts */
dest = "${env.WORKSPACE}/pkg"
sh "mkdir -p ${dest}"
} }
}
stage('Setup') { steps { dir(env.STATUS_PATH) {
@ -47,19 +52,13 @@ pipeline {
stages {
stage('Compile') { steps { dir(env.STATUS_PATH) {
sh 'make statusgo-android'
sh "cp build/bin/statusgo-android-16.aar ${dest}/status-go-android-${lib.suffix()}.aar"
} } }
stage('Archive') { steps {
sh """
cp ${env.STATUS_PATH}/build/bin/statusgo-android-16.aar \
${env.WORKSPACE}/status-go-android-${lib.suffix()}.aar
"""
archiveArtifacts("status-go-android-${lib.suffix()}.aar")
archiveArtifacts("pkg/status-go-android-${lib.suffix()}.aar")
} }
stage('Upload') { steps { script {
lib.uploadArtifact("status-go-android-${lib.suffix()}.aar")
} } }
stage('Cleanup') { steps { script {
sh "rm -f ${env.WORKSPACE}/*.aar"
lib.uploadArtifact("pkg/status-go-android-${lib.suffix()}.aar")
} } }
}
}
@ -69,28 +68,34 @@ pipeline {
sh 'make statusgo-ios-simulator'
dir('build/bin/statusgo-ios-9.3-framework') {
sh 'zip -r status-go-ios.zip Statusgo.framework'
sh "cp status-go-ios.zip ${dest}/status-go-ios-${lib.suffix()}.zip"
}
} } }
stage('Archive') { steps {
sh """
cp ${env.STATUS_PATH}/build/bin/statusgo-ios-9.3-framework/status-go-ios.zip \
${env.WORKSPACE}/status-go-ios-${lib.suffix()}.zip
"""
archiveArtifacts("status-go-ios-${lib.suffix()}.zip")
archiveArtifacts("pkg/status-go-ios-${lib.suffix()}.zip")
} }
stage('Upload') { steps { script {
lib.uploadArtifact("status-go-ios-${lib.suffix()}.zip")
lib.uploadArtifact("pkg/status-go-ios-${lib.suffix()}.zip")
} } }
stage('Cleanup') { steps { script {
sh "rm -f ${env.WORKSPACE}/*.zip"
}
}
stage('Desktop') {
stages {
stage('Prepare') { steps { dir(env.STATUS_PATH) {
sh "zip -r ${dest}/status-go-desktop-${lib.suffix()}.zip . -x *.git"
} } }
stage('Archive') { steps {
archiveArtifacts("pkg/status-go-desktop-${lib.suffix()}.zip")
} }
stage('Upload') { steps { script {
lib.uploadArtifact("pkg/status-go-desktop-${lib.suffix()}.zip")
} } }
}
}
}
}
stage('Release') { when { expression { params.RELEASE == true } }
steps {
dir(env.STATUS_PATH) {
steps { dir(env.STATUS_PATH) {
sh 'make prepare-release'
withCredentials([[
$class: 'UsernamePasswordMultiBinding',
@ -101,8 +106,10 @@ pipeline {
sh "yes | make release RELEASE_BRANCH=${lib.gitBranch()}"
}
sh 'make clean-release'
} }
}
}
}
stage('Cleanup') { steps { script {
sh "rm -fr ${dest}"
} } }
}
}