diff --git a/Jenkinsfile b/Jenkinsfile index 4af8abf37..90874bf94 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -68,7 +68,7 @@ pipeline { dir('src/github.com/docker/app') { checkout scm sh 'make -f docker.Makefile save-invocation-image' - stash name: 'invocation-image', includes: 'invocation-image.tar' + stash name: 'invocation-image', includes: './_build/invocation-image.tar' } } post { diff --git a/Jenkinsfile.baguette b/Jenkinsfile.baguette index 4d5d1753f..f60fb855c 100644 --- a/Jenkinsfile.baguette +++ b/Jenkinsfile.baguette @@ -62,8 +62,8 @@ pipeline { sh 'make -f docker.Makefile save-invocation-image' } dir('/tmp') { - stash name: 'invocation-image', includes: 'invocation-image-*.tar' - archiveArtifacts 'invocation-image-*.tar' + stash name: 'invocation-image', includes: './_build/invocation-image-*.tar' + archiveArtifacts './_build/invocation-image-*.tar' } dir('src/github.com/docker/app') { sh 'make -f docker.Makefile clean-invocation-image' diff --git a/docker.Makefile b/docker.Makefile index 123247054..3c2581fa4 100644 --- a/docker.Makefile +++ b/docker.Makefile @@ -13,17 +13,16 @@ E2E_CROSS_CTNR_NAME := $(BIN_NAME)-e2e-cross-$(TAG) COV_CTNR_NAME := $(BIN_NAME)-cov-$(TAG) SCHEMAS_CTNR_NAME := $(BIN_NAME)-schemas-$(TAG) - BUILD_ARGS=--build-arg=EXPERIMENTAL=$(EXPERIMENTAL) --build-arg=TAG=$(TAG) --build-arg=COMMIT=$(COMMIT) PKG_PATH := /go/src/$(PKG_NAME) CNAB_BASE_INVOCATION_IMAGE_NAME := docker/cnab-app-base:$(TAG) -CNAB_BASE_INVOCATION_IMAGE_PATH := /tmp/invocation-image-$(TAG).tar +CNAB_BASE_INVOCATION_IMAGE_PATH := ./_build/invocation-image-$(TAG).tar RM := rm ifeq ($(OS),Windows_NT) - CNAB_BASE_INVOCATION_IMAGE_PATH := c:\tmp\invocation-image-$(TAG).tar + CNAB_BASE_INVOCATION_IMAGE_PATH := .\_build\invocation-image-$(TAG).tar RM := del endif @@ -109,9 +108,11 @@ invocation-image: docker build $(BUILD_ARGS) --target=invocation -t $(CNAB_BASE_INVOCATION_IMAGE_NAME) . save-invocation-image: invocation-image + @$(call mkdir,_build) docker save $(CNAB_BASE_INVOCATION_IMAGE_NAME) -o $(CNAB_BASE_INVOCATION_IMAGE_PATH) load-invocation-image: + @$(call mkdir,_build) docker load -i $(CNAB_BASE_INVOCATION_IMAGE_PATH) $(RM) $(CNAB_BASE_INVOCATION_IMAGE_PATH)