1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/Jenkinsfile
2018-03-21 08:10:50 +01:00

56 lines
1.5 KiB
Groovy

#!/usr/bin/env groovy
pipeline {
agent any
stages {
stage('Build') {
steps {
withDockerContainer('kyroy/zokrates-test') {
sh 'RUSTFLAGS="-D warnings" cargo build'
}
}
}
stage('Test') {
steps {
withDockerContainer('kyroy/zokrates-test') {
sh 'RUSTFLAGS="-D warnings" cargo test'
}
}
}
stage('Integration Test') {
when {
expression { env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'develop' }
}
steps {
withDockerContainer('kyroy/zokrates-test') {
sh 'RUSTFLAGS="-D warnings" cargo test -- --ignored'
}
}
}
stage('Docker Build & Push') {
when {
expression { env.BRANCH_NAME == 'master' }
}
steps {
script {
def dockerImage = docker.build("kyroy/zokrates")
docker.withRegistry('https://registry.hub.docker.com', 'dockerhub-kyroy') {
dockerImage.push("latest")
}
}
}
}
}
post {
always {
// junit allowEmptyResults: true, testResults: '*test.xml'
deleteDir()
}
changed {
notifyStatusChange notificationRecipients: 'mail@kyroy.com', componentName: 'ZoKrates'
}
}
}