Newer
Older
Code / Jenkinsfile
@John Ryland John Ryland on 14 Dec 2019 720 bytes indentation

pipeline {
    agent any

    stages {
        stage('Build') {
            steps {
              echo 'Building..'
              sh './build.sh'
              archiveArtifacts artifacts: 'build/hello*', fingerprint: true
            }
        }
        stage('Test') {
            steps {
              echo 'Testing..'
              sh 'make test || true'
              junit 'build/*.xml'
            }
        }
        stage('Deploy') {
            when {
              expression {
                currentBuild.result == null || currentBuild.result == 'SUCCESS' 
              }
            }
            steps {
              echo 'Deploying....'
              sh 'make publish'
            }
        }
    }
}