Rollux/Jenkinsfile
Ådne E. Moldesæter 83f9d30c20 Updated jenkins file
2020-08-27 22:40:58 +02:00

30 lines
520 B
Groovy

pipeline {
agent any
stages {
stage('build') {
agent {
docker {
image 'rust'
reuseNode true
}
}
steps {
sh 'cargo build --release'
stash includes: 'target/release/rollux', name: 'app'
}
}
stage('docker build') {
steps {
unstash 'app'
echo 'Starting docker image build'
script {
docker.withRegistry("https://pkg.northcode.no", 'docker-login') {
def image = docker.build("pkg.northcode.no/rollux")
image.push()
}
}
}
}
}
}