status-go/_assets/ci/Jenkinsfile.linux

72 lines
1.6 KiB
Plaintext
Raw Normal View History

library 'status-jenkins-lib@v1.6.7'
2019-02-01 17:02:52 +00:00
pipeline {
2022-05-11 10:24:30 +00:00
agent { label 'linux && x86_64 && go-1.18' }
2019-02-01 17:02:52 +00:00
parameters {
string(
name: 'BRANCH',
defaultValue: 'develop',
description: 'Name of branch to build.'
)
booleanParam(
name: 'RELEASE',
defaultValue: false,
description: 'Enable to create build for release.',
)
}
2019-02-01 17:02:52 +00:00
options {
timestamps()
disableConcurrentBuilds()
2019-02-01 17:02:52 +00:00
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '5',
2019-02-01 17:02:52 +00:00
daysToKeepStr: '30',
))
}
environment {
TARGET = 'linux'
TMPDIR = "${WORKSPACE_TMP}"
GOPATH = "${WORKSPACE_TMP}/go"
PATH = "${PATH}:${GOPATH}/bin"
REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go"
ARTIFACT = utils.pkgFilename(name: "status-go", type: "desktop", ext: "zip", version: null)
2019-02-01 17:02:52 +00:00
}
stages {
stage('Setup') {
steps { /* Go needs to find status-go in GOPATH. */
sh "mkdir -p \$(dirname ${REPO_SRC})"
sh "ln -s ${WORKSPACE} ${REPO_SRC}"
}
}
2020-06-03 06:22:05 +00:00
/* Sanity-check C bindings */
stage('Bindings Check') {
steps {
sh 'make statusgo-library'
}
}
2019-02-01 17:02:52 +00:00
stage('Archive') {
steps {
sh "zip -q -r ${ARTIFACT} build/bin"
archiveArtifacts(ARTIFACT)
}
}
2019-02-01 17:02:52 +00:00
stage('Upload') {
steps { script {
env.PKG_URL = s3.uploadArtifact(ARTIFACT)
} }
}
2019-02-01 17:02:52 +00:00
} // stages
post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
cleanup { sh 'make clean' }
} // post
2019-02-01 17:02:52 +00:00
} // pipeline