Add Jenkinsfile to enable Jenkins build
This commit is contained in:
parent
14ed5a5020
commit
aff6bf1fff
1 changed files with 29 additions and 0 deletions
29
Jenkinsfile
vendored
Normal file
29
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#!groovy
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
environment {
|
||||||
|
GOPATH = "${pwd()}/gocode"
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Fetch go dependencies') {
|
||||||
|
steps {
|
||||||
|
sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'"
|
||||||
|
sh "ln -s '${pwd()}' '${GOPATH}/src/git.cacert.org/cacert-boardvoting'"
|
||||||
|
sh "cd '${GOPATH}/src/git.cacert.org/cacert-boardvoting' ; go get"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'make clean'
|
||||||
|
sh 'make'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Create build output') {
|
||||||
|
steps {
|
||||||
|
archiveArtifacts artifacts: 'cacert-boardvoting,templates/**,db/**,config.yaml.example,static/**'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue