diff --git a/Jenkinsfile b/Jenkinsfile index f35ca79..719e5df 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,29 +3,37 @@ agent none stages { - stage('Build') { - agent { - docker { - image 'jenkins-build-agent:latest' - } - } + stage('Linux Build') { + agent { docker 'linux-build-agent:latest' } steps { - echo 'Preparing..' + 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 './build.sh' - archiveArtifacts artifacts: 'build/hello*', fingerprint: true - echo 'Cleaning..' + 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' } + environment { PATH = "/osxcross/bin:$PATH" } + steps { + echo 'Building..' + sh 'make build/hello-macosx.bin' + archiveArtifacts artifacts: 'build/hello-macosx.bin', fingerprint: true + } + } stage('Linting') { - agent { - dockerfile { - filename 'Dockerfile.lint' - reuseNode true - } - } + agent { docker 'lint-agent:latest' } steps { echo 'Linting..' sh 'make tidy || true' @@ -34,7 +42,7 @@ } } stage('Test') { - agent { docker 'jenkins-build-agent:latest' } + agent { docker 'linux-build-agent:latest' } steps { echo 'Testing..' sh 'make test || true' @@ -42,7 +50,7 @@ } } stage('Deploy') { - agent { docker 'jenkins-build-agent:latest' } + agent { docker 'linux-build-agent:latest' } when { expression { currentBuild.result == null || currentBuild.result == 'SUCCESS' diff --git a/Jenkinsfile b/Jenkinsfile index f35ca79..719e5df 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,29 +3,37 @@ agent none stages { - stage('Build') { - agent { - docker { - image 'jenkins-build-agent:latest' - } - } + stage('Linux Build') { + agent { docker 'linux-build-agent:latest' } steps { - echo 'Preparing..' + 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 './build.sh' - archiveArtifacts artifacts: 'build/hello*', fingerprint: true - echo 'Cleaning..' + 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' } + environment { PATH = "/osxcross/bin:$PATH" } + steps { + echo 'Building..' + sh 'make build/hello-macosx.bin' + archiveArtifacts artifacts: 'build/hello-macosx.bin', fingerprint: true + } + } stage('Linting') { - agent { - dockerfile { - filename 'Dockerfile.lint' - reuseNode true - } - } + agent { docker 'lint-agent:latest' } steps { echo 'Linting..' sh 'make tidy || true' @@ -34,7 +42,7 @@ } } stage('Test') { - agent { docker 'jenkins-build-agent:latest' } + agent { docker 'linux-build-agent:latest' } steps { echo 'Testing..' sh 'make test || true' @@ -42,7 +50,7 @@ } } stage('Deploy') { - agent { docker 'jenkins-build-agent:latest' } + agent { docker 'linux-build-agent:latest' } when { expression { currentBuild.result == null || currentBuild.result == 'SUCCESS' diff --git a/build.sh b/build.sh deleted file mode 100755 index 13674d2..0000000 --- a/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export PATH=/home/jryland/CrossCompilers/osxcross/target/bin:$PATH -make -