diff --git a/resources/io/jenkins/infra/docker/Makefile b/resources/io/jenkins/infra/docker/Makefile index 713e7731e..a39b86602 100644 --- a/resources/io/jenkins/infra/docker/Makefile +++ b/resources/io/jenkins/infra/docker/Makefile @@ -12,13 +12,17 @@ IMAGE_NAME ?= helloworld IMAGE_DEPLOY_NAME ?= "$(IMAGE_NAME)" BUILD_TARGETPLATFORM ?= linux/amd64 # Paths -# need absolute path for docker bake -ifeq ($(IMAGE_DOCKERFILE),) - IMAGE_DOCKERFILE := $(abspath $(PWD)/Dockerfile) +# Detect Windows (only OS separating paths in $PATH with ";") to set specific absolute paths for linux (bake) only +ifeq '$(findstring ;,$(PATH))' ';' + IMAGE_DOCKERFILE ?= "$(IMAGE_DIR)"/Dockerfile else - IMAGE_DOCKERFILE := $(abspath $(PWD)/$(IMAGE_DOCKERFILE)) + # need absolute path for docker bake + ifeq ($(IMAGE_DOCKERFILE),) + IMAGE_DOCKERFILE := $(abspath $(PWD)/Dockerfile) + else + IMAGE_DOCKERFILE := $(abspath $(PWD)/$(IMAGE_DOCKERFILE)) + endif endif - HADOLINT_REPORT ?= "$(IMAGE_DIR)"/hadolint.json TEST_HARNESS ?= "$(IMAGE_DIR)"/cst.yml DOCKER_BAKE_FILE ?= "$(IMAGE_DIR)"/docker-bake.hcl diff --git a/vars/buildDockerAndPublishImage.groovy b/vars/buildDockerAndPublishImage.groovy index c45a05468..b0abaf4bb 100644 --- a/vars/buildDockerAndPublishImage.groovy +++ b/vars/buildDockerAndPublishImage.groovy @@ -187,8 +187,6 @@ def call(String imageShortName, Map userConfig=[:]) { if (isUnix()) { sh 'make lint' } else { - powershell "$pwd" - powershell 'dir c:\\maven\\jdk11' powershell 'make lint' } } finally {