2019-05-13 18:24:15 +00:00
|
|
|
pipeline {
|
2019-05-13 20:05:55 +00:00
|
|
|
agent any
|
2019-05-13 18:24:15 +00:00
|
|
|
stages {
|
|
|
|
|
stage('build') {
|
2019-05-13 19:47:49 +00:00
|
|
|
agent {
|
|
|
|
|
docker {
|
|
|
|
|
image 'rust'
|
|
|
|
|
reuseNode true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
steps {
|
2019-05-13 20:01:20 +00:00
|
|
|
sh 'cargo build --release'
|
|
|
|
|
stash includes: 'target/release/telegram-leetbot', name: 'app'
|
2019-05-13 18:24:15 +00:00
|
|
|
}
|
|
|
|
|
}
|
2019-05-13 20:15:24 +00:00
|
|
|
stage('docker build') {
|
|
|
|
|
steps {
|
|
|
|
|
unstash 'app'
|
|
|
|
|
|
|
|
|
|
echo 'Starting docker image build'
|
|
|
|
|
script {
|
2019-05-14 13:21:26 +00:00
|
|
|
docker.withRegistry("https://pkg.northcode.no", 'docker-login') {
|
2019-05-14 13:08:21 +00:00
|
|
|
def image = docker.build("pkg.northcode.no/telegram-leetbot")
|
|
|
|
|
image.push()
|
|
|
|
|
}
|
2019-05-13 20:15:24 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-05-13 18:24:15 +00:00
|
|
|
}
|
2019-05-13 18:29:12 +00:00
|
|
|
|
|
|
|
|
post {
|
|
|
|
|
success {
|
2019-05-13 20:01:20 +00:00
|
|
|
unstash 'app'
|
|
|
|
|
|
2019-05-13 18:29:12 +00:00
|
|
|
archiveArtifacts artifacts: 'target/debug/telegram-leetbot', fingerprint: true
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-05-13 18:24:15 +00:00
|
|
|
}
|