Newer
Older
Code / Jenkinsfile
@John Ryland John Ryland on 6 Nov 2019 739 bytes all

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') {
            steps {
                echo 'Deploying....'
	        when {
                  expression {
                    currentBuild.result == null || currentBuild.result == 'SUCCESS' 
                  }
                }
                steps {
                    sh 'make publish'
                }
            }
        }
    }
}