47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
|
pipeline {
|
||
|
agent { label 'linux' }
|
||
|
|
||
|
options {
|
||
|
/* Go requires a certain directory structure */
|
||
|
checkoutToSubdirectory('src/github.com/status-im/status-go')
|
||
|
/* manage how many builds we keep */
|
||
|
buildDiscarder(logRotator(
|
||
|
numToKeepStr: '30',
|
||
|
daysToKeepStr: '30',
|
||
|
))
|
||
|
}
|
||
|
|
||
|
environment {
|
||
|
STATUS_PATH = 'src/github.com/status-im/status-go'
|
||
|
GOPATH = "${env.WORKSPACE}"
|
||
|
PATH = "${env.PATH}:${env.GOPATH}/bin"
|
||
|
}
|
||
|
|
||
|
stages {
|
||
|
stage('Prep') { steps { script {
|
||
|
lib = load("${env.STATUS_PATH}/_assets/ci/lib.groovy")
|
||
|
/* clarify what we're building */
|
||
|
println("Version: ${lib.getVersion()}")
|
||
|
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}"
|
||
|
/* for easier reuse */
|
||
|
artifact = "status-go-desktop-${lib.suffix()}.zip"
|
||
|
} } }
|
||
|
|
||
|
stage('Compress') { steps { dir(env.STATUS_PATH) {
|
||
|
sh "zip -q -r ${dest}/${artifact} . -x *.git"
|
||
|
} } }
|
||
|
|
||
|
stage('Archive') { steps {
|
||
|
archiveArtifacts("pkg/${artifact}")
|
||
|
} }
|
||
|
|
||
|
stage('Upload') { steps { script {
|
||
|
lib.uploadArtifact("pkg/${artifact}")
|
||
|
} } }
|
||
|
} // stages
|
||
|
} // pipeline
|