diff --git a/Jenkinsfile b/Jenkinsfile index 7e106b5..ab6cc1d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,9 @@ agent { docker 'linux-build-agent:latest' } steps { echo 'Building..' - sh 'whoami' + sh 'whoami || true' + sh 'which -a uname || true' + sh 'uname || true' sh 'make build/hello-linux-64' archiveArtifacts artifacts: 'build/hello-linux-64', fingerprint: true } @@ -32,7 +34,9 @@ // echo 'Preparing..' // cleanWs() echo 'Building..' - sh 'whoami' + sh 'whoami || true' + sh 'which -a uname || true' + sh 'uname || true' sh 'make build/hello-win64.exe' archiveArtifacts artifacts: 'build/hello-win64.exe', fingerprint: true // echo 'Cleaning..' @@ -49,7 +53,9 @@ agent { docker 'macosx-build-agent:latest' } steps { echo 'Building..' - sh 'whoami' + sh 'whoami || true' + sh 'which -a uname || true' + sh 'uname || true' sh 'make build/hello-macosx.bin' archiveArtifacts artifacts: 'build/hello-macosx.bin', fingerprint: true } @@ -65,6 +71,8 @@ steps { echo 'Linting..' sh 'whoami' + sh 'which -a uname || true' + sh 'uname || true' sh 'make tidy || true' // junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults: 'build/tidy.xml' sh 'true' diff --git a/Jenkinsfile b/Jenkinsfile index 7e106b5..ab6cc1d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,9 @@ agent { docker 'linux-build-agent:latest' } steps { echo 'Building..' - sh 'whoami' + sh 'whoami || true' + sh 'which -a uname || true' + sh 'uname || true' sh 'make build/hello-linux-64' archiveArtifacts artifacts: 'build/hello-linux-64', fingerprint: true } @@ -32,7 +34,9 @@ // echo 'Preparing..' // cleanWs() echo 'Building..' - sh 'whoami' + sh 'whoami || true' + sh 'which -a uname || true' + sh 'uname || true' sh 'make build/hello-win64.exe' archiveArtifacts artifacts: 'build/hello-win64.exe', fingerprint: true // echo 'Cleaning..' @@ -49,7 +53,9 @@ agent { docker 'macosx-build-agent:latest' } steps { echo 'Building..' - sh 'whoami' + sh 'whoami || true' + sh 'which -a uname || true' + sh 'uname || true' sh 'make build/hello-macosx.bin' archiveArtifacts artifacts: 'build/hello-macosx.bin', fingerprint: true } @@ -65,6 +71,8 @@ steps { echo 'Linting..' sh 'whoami' + sh 'which -a uname || true' + sh 'uname || true' sh 'make tidy || true' // junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults: 'build/tidy.xml' sh 'true' diff --git a/Makefile b/Makefile index 8fb6205..7434164 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,13 @@ 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 @@ -70,6 +76,9 @@ @echo '' >> $@ @echo '' >> $@ +docker: + @echo "Running in docker..." + publish: @echo "Publish..."