draught/.jenkins/jenkinsfile

34 lines
672 B
Plaintext

pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'cargo build'
}
}
stage('Test') {
steps {
sh 'cargo test'
}
}
stage('Deploy') {
when { branch 'master' }
steps {
script {
docker.withRegistry('https://registry.sarsoo.xyz', 'git-registry-creds')
{
docker.build("sarsoo/draught:latest").push()
}
}
}
}
}
post {
always {
cleanWs()
}
}
}