library 'status-jenkins-lib@v1.2.17' pipeline { agent { label 'linux' } parameters { string( name: 'BRANCH', defaultValue: 'develop', description: 'Name of branch to build.' ) booleanParam( name: 'RELEASE', defaultValue: false, description: 'Enable to create build for release.', ) } options { timestamps() disableConcurrentBuilds() /* Go requires a certain directory structure */ checkoutToSubdirectory('src/github.com/status-im/status-go') /* manage how many builds we keep */ buildDiscarder(logRotator( numToKeepStr: '5', daysToKeepStr: '30', )) } environment { TARGET = 'linux' STATUS_PATH = "${env.WORKSPACE}/src/github.com/status-im/status-go" GOPATH = "${env.WORKSPACE}" ARTIFACT = "${env.WORKSPACE}/status-go-desktop-${utils.timestamp()}-${utils.gitCommit()}.zip" PATH = "/usr/local/go/bin:${env.PATH}:${env.GOPATH}/bin" } stages { stage('Prep') { steps { dir(env.STATUS_PATH) { script { println("Version: ${utils.getVersion()}") println("Git Branch: ${utils.branchName()}") println("Git Commit: ${utils.gitCommit()}") } } } } stage('Setup') { steps { dir(env.STATUS_PATH) { sh 'make setup-build' } } } /* Sanity-check C bindings */ stage('Sanity check bindings') { steps { dir(env.STATUS_PATH) { sh 'make statusgo-library' } } } stage('Compress') { steps { dir(env.STATUS_PATH) { sh "zip -q -r ${env.ARTIFACT} . -x *.git" } } } stage('Archive') { steps { archiveArtifacts(env.ARTIFACT.minus("${env.WORKSPACE}/")) } } stage('Upload') { steps { script { env.PKG_URL = s3.uploadArtifact(env.ARTIFACT) } } } } // stages post { success { script { github.notifyPR(true) } } failure { script { github.notifyPR(false) } } always { dir(env.STATUS_PATH) { sh 'make clean' } } } // post } // pipeline