keycard-cli/_assets/ci/Jenkinsfile.pr
Jakub Sokołowski 9702bd8679 add Jenkinsfile and improve docker image creation
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-03-27 14:06:39 +01:00

54 lines
1.0 KiB
Promela

pipeline {
agent {
docker {
label 'linux'
image 'statusteam/keycard-cli-ci:latest'
args '--entrypoint=""' /* allows jenkins use cat */
}
}
options {
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
disableConcurrentBuilds()
/* Go requires a certain directory structure */
checkoutToSubdirectory('src/github.com/status-im/keycard-cli')
}
environment {
PROJECT = 'src/github.com/status-im/keycard-cli'
GOPATH = "${env.WORKSPACE}"
PATH = "${env.PATH}:${env.GOPATH}/bin"
GOCACHE = '/tmp/gocache'
}
stages {
stage('Prep') {
steps { dir(env.PROJECT) {
sh 'make deps'
} }
}
stage('Test') {
steps { dir(env.PROJECT) {
sh 'make test'
} }
}
stage('Build') {
steps { script { dir(env.PROJECT) {
sh 'make build'
} } }
}
stage('Archive') {
steps { dir(env.PROJECT) {
archiveArtifacts('build/bin/*')
} }
}
}
}