diff --git a/Jenkinsfile b/Jenkinsfile index 346f526..4304973 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,74 +6,38 @@ stage('Build') { parallel { stage('Linux Build') { - // agent { - // docker { - // image 'linux-build-agent:latest' - // args '-u 0:0' - // } - // } agent { docker 'linux-build-agent:latest' } steps { echo 'Building..' - sh 'whoami || true' - sh 'which -a make || true' - sh 'make -v || true' - sh 'sh -c make build/hello-linux-64' + sh 'make build/hello-linux-64' archiveArtifacts artifacts: 'build/hello-linux-64', fingerprint: true } } stage('Windows Build') { - // agent { - // docker { - // image 'windows-build-agent:latest' - // args '-u 0:0' - // } - // } agent { docker 'windows-build-agent:latest' } steps { // echo 'Preparing..' // cleanWs() echo 'Building..' - sh 'whoami || true' - sh 'which -a make || true' - sh 'make -v || true' - sh 'sh -c make build/hello-win64.exe' + 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 { - // image 'macosx-build-agent:latest' - // args '-u 0:0' - // } - // } agent { docker 'macosx-build-agent:latest' } steps { echo 'Building..' - sh 'whoami || true' - sh 'which -a make || true' - sh 'make -v || true' - sh 'sh -c make build/hello-macosx.bin || true' + sh 'make build/hello-macosx.bin' archiveArtifacts artifacts: 'build/hello-macosx.bin', fingerprint: true } } stage('Linting') { - agent { - docker { - image 'lint-agent:latest' - args '-u 0:0' - } - } - // agent { docker 'lint-agent:latest' } + agent { docker 'lint-agent:latest' } steps { echo 'Linting..' - sh 'whoami' - sh 'which -a make || true' - sh 'make -v || true' - sh 'make tidy || true' + sh 'make tidy' // junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults: 'build/tidy.xml' sh 'true' } @@ -81,27 +45,15 @@ } } stage('Test') { - agent { - docker { - image 'linux-build-agent:latest' - args '-u 0:0' - } - } - // agent { docker 'linux-build-agent:latest' } + agent { docker 'linux-build-agent:latest' } steps { echo 'Testing..' - sh 'make test || true' + sh 'make test' junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults: 'build/tests.xml' } } stage('Deploy') { - agent { - docker { - image 'linux-build-agent:latest' - args '-u 0:0' - } - } - // agent { docker 'linux-build-agent:latest' } + agent { docker 'linux-build-agent:latest' } when { expression { currentBuild.result == null || currentBuild.result == 'SUCCESS' diff --git a/Jenkinsfile b/Jenkinsfile index 346f526..4304973 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,74 +6,38 @@ stage('Build') { parallel { stage('Linux Build') { - // agent { - // docker { - // image 'linux-build-agent:latest' - // args '-u 0:0' - // } - // } agent { docker 'linux-build-agent:latest' } steps { echo 'Building..' - sh 'whoami || true' - sh 'which -a make || true' - sh 'make -v || true' - sh 'sh -c make build/hello-linux-64' + sh 'make build/hello-linux-64' archiveArtifacts artifacts: 'build/hello-linux-64', fingerprint: true } } stage('Windows Build') { - // agent { - // docker { - // image 'windows-build-agent:latest' - // args '-u 0:0' - // } - // } agent { docker 'windows-build-agent:latest' } steps { // echo 'Preparing..' // cleanWs() echo 'Building..' - sh 'whoami || true' - sh 'which -a make || true' - sh 'make -v || true' - sh 'sh -c make build/hello-win64.exe' + 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 { - // image 'macosx-build-agent:latest' - // args '-u 0:0' - // } - // } agent { docker 'macosx-build-agent:latest' } steps { echo 'Building..' - sh 'whoami || true' - sh 'which -a make || true' - sh 'make -v || true' - sh 'sh -c make build/hello-macosx.bin || true' + sh 'make build/hello-macosx.bin' archiveArtifacts artifacts: 'build/hello-macosx.bin', fingerprint: true } } stage('Linting') { - agent { - docker { - image 'lint-agent:latest' - args '-u 0:0' - } - } - // agent { docker 'lint-agent:latest' } + agent { docker 'lint-agent:latest' } steps { echo 'Linting..' - sh 'whoami' - sh 'which -a make || true' - sh 'make -v || true' - sh 'make tidy || true' + sh 'make tidy' // junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults: 'build/tidy.xml' sh 'true' } @@ -81,27 +45,15 @@ } } stage('Test') { - agent { - docker { - image 'linux-build-agent:latest' - args '-u 0:0' - } - } - // agent { docker 'linux-build-agent:latest' } + agent { docker 'linux-build-agent:latest' } steps { echo 'Testing..' - sh 'make test || true' + sh 'make test' junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults: 'build/tests.xml' } } stage('Deploy') { - agent { - docker { - image 'linux-build-agent:latest' - args '-u 0:0' - } - } - // agent { docker 'linux-build-agent:latest' } + agent { docker 'linux-build-agent:latest' } when { expression { currentBuild.result == null || currentBuild.result == 'SUCCESS' diff --git a/Makefile b/Makefile index 7434164..8fb6205 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,7 @@ CXXFLAGS = -std=c++14 -WHICH_UNAME := $(shell which -a uname) -ifeq ($(WHICH_UNAME), /usr/bin/uname) UNAME := $(shell uname) -else -UNAME := Docker -TARGETS := docker -endif # LINUX version @@ -76,9 +70,6 @@ @echo '' >> $@ @echo '' >> $@ -docker: - @echo "Running in docker..." - publish: @echo "Publish..."