diff --git a/Jenkinsfile b/Jenkinsfile index 01f62d9..248b92a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,67 +1,31 @@ pipeline { - agent none + agent any stages { stage('Build') { - parallel { - stage('Linux Build') { - agent { docker 'linux-build-agent:latest' } - steps { - echo 'Building..' - sh 'make build/hello-linux-64' - archiveArtifacts artifacts: 'build/hello-linux-64', fingerprint: true - } - } - stage('Windows Build') { - agent { docker 'windows-build-agent:latest' } - steps { - // echo 'Preparing..' - // cleanWs() - echo 'Building..' - sh 'make build/hello-win64.exe' - archiveArtifacts artifacts: 'build/hello-win64.exe', fingerprint: true - // echo 'Cleaning..' - // cleanWs cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false - } - } - stage('MacOSX Build') { - agent { docker 'macosx-build-agent:latest' } - steps { - echo 'Building..' - sh 'make build/hello-macosx.bin' - archiveArtifacts artifacts: 'build/hello-macosx.bin', fingerprint: true - } - } - stage('Linting') { - agent { docker 'lint-agent:latest' } - steps { - echo 'Linting..' - sh 'make tidy || true' - // junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults: 'build/tidy.xml' - sh 'true' - } - } - } + steps { + echo 'Building..' + sh './build.sh' + archiveArtifacts artifacts: 'build/hello*', fingerprint: true + } } stage('Test') { - agent { docker 'linux-build-agent:latest' } steps { - echo 'Testing..' - sh 'make test || true' - junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults: 'build/tests.xml' + echo 'Testing..' + sh 'make test || true' + junit 'build/*.xml' } } stage('Deploy') { - agent { docker 'linux-build-agent:latest' } - when { + when { expression { currentBuild.result == null || currentBuild.result == 'SUCCESS' } } steps { - echo 'Deploying....' - sh 'make publish' + echo 'Deploying....' + sh 'make publish' } } }