@@ -38,7 +38,7 @@ MQ_ARCHIVE_DEV ?= $(MQ_VERSION)-IBM-MQ-Advanced-for-Developers-Non-Install-$(MQ_
3838# MQ_SDK_ARCHIVE specifies the archive to use for building the golang programs. Defaults vary on developer or advanced.
3939MQ_SDK_ARCHIVE ?= $(MQ_ARCHIVE_DEV_$(MQ_VERSION ) )
4040# Options to `go test` for the Docker tests
41- TEST_OPTS_DOCKER ?=
41+ TEST_OPTS_DOCKER ?=
4242# Timeout for the Docker tests
4343TEST_TIMEOUT_DOCKER ?= 30m
4444# MQ_IMAGE_ADVANCEDSERVER is the name of the built MQ Advanced image
@@ -113,7 +113,7 @@ endif
113113
114114# LTS_TAG is the tag modifier for an LTS container build
115115LTS_TAG =
116- ifeq "$(LTS ) " "true"
116+ ifeq "$(LTS ) " "true"
117117ifneq "$(LTS_TAG_OVERRIDE ) " "$(EMPTY ) "
118118 LTS_TAG=$(LTS_TAG_OVERRIDE)
119119else
@@ -201,18 +201,37 @@ incubating: build-explorer
201201downloads/$(MQ_ARCHIVE_DEV ) :
202202 $(info $(SPACER )$(shell printf $(TITLE ) "Downloading IBM MQ Advanced for Developers "$(MQ_VERSION )$(END ) ) )
203203 mkdir -p downloads
204+ ifneq "$(BUILD_RSYNC_SERVER ) " "$(EMPTY ) "
205+ # Use key which is not stored in the repository to fetch the files from the fileserver
206+ curl -L $(BUILD_RSYNC_ENCRYPTED_KEY_URL) -o ./host.key.gpg
207+ @echo $(BUILD_RSYNC_ENCRYPTION_PASSWORD)|gpg --passphrase-fd 0 ./host.key.gpg
208+ chmod 600 ./host.key
209+ rsync -rv -e "ssh -o BatchMode=yes -q -o StrictHostKeyChecking=no -i ./host.key" --include="*/" --include="*.tar.gz" --exclude="*" $(BUILD_RSYNC_USER)@$(BUILD_RSYNC_SERVER):"$(BUILD_RSYNC_PATH)" downloads/$(MQ_ARCHIVE_DEV)
210+ -@rm host.key.gpg host.key
211+ else
204212ifneq "$(MQ_ARCHIVE_REPOSITORY_DEV ) " "$(EMPTY ) "
205213 curl -u $(MQ_ARCHIVE_REPOSITORY_USER):$(MQ_ARCHIVE_REPOSITORY_CREDENTIAL) -X GET "$(MQ_ARCHIVE_REPOSITORY_DEV)" -o downloads/$(MQ_ARCHIVE_DEV)
206214else
207215 curl -L https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/$(MQ_ARCHIVE_DEV) -o downloads/$(MQ_ARCHIVE_DEV)
208216endif
217+ endif
209218
210219downloads/$(MQ_ARCHIVE ) :
211220 $(info $(SPACER )$(shell printf $(TITLE ) "Downloading IBM MQ Advanced "$(MQ_VERSION )$(END ) ) )
212221 mkdir -p downloads
222+ ifneq "$(BUILD_RSYNC_SERVER ) " "$(EMPTY ) "
223+ # Use key which is not stored in the repository to fetch the files from the fileserver
224+ -@rm host.key.gpg host.key
225+ curl -L $(BUILD_RSYNC_ENCRYPTED_KEY_URL) -o ./host.key.gpg
226+ @echo $(BUILD_RSYNC_ENCRYPTION_PASSWORD)|gpg --passphrase-fd 0 ./host.key.gpg
227+ chmod 600 ./host.key
228+ rsync -rv -e "ssh -o BatchMode=yes -q -o StrictHostKeyChecking=no -i ./host.key" --include="*/" --include="*.tar.gz" --exclude="*" $(BUILD_RSYNC_USER)@$(BUILD_RSYNC_SERVER):"$(BUILD_RSYNC_PATH)" downloads/$(MQ_ARCHIVE)
229+ -@rm host.key.gpg host.key
230+ else
213231ifneq "$(MQ_ARCHIVE_REPOSITORY ) " "$(EMPTY ) "
214232 curl -u $(MQ_ARCHIVE_REPOSITORY_USER):$(MQ_ARCHIVE_REPOSITORY_CREDENTIAL) -X GET "$(MQ_ARCHIVE_REPOSITORY)" -o downloads/$(MQ_ARCHIVE)
215233endif
234+ endif
216235
217236.PHONY : downloads
218237downloads : downloads/$(MQ_ARCHIVE_DEV ) downloads/$(MQ_SDK_ARCHIVE )
@@ -283,7 +302,7 @@ define build-mq
283302 $(COMMAND ) build \
284303 --tag $1:$2 \
285304 --file $3 \
286- $(EXTRA_ARGS ) \
305+ $(EXTRA_ARGS ) \
287306 --build-arg IMAGE_REVISION="$(IMAGE_REVISION ) " \
288307 --build-arg IMAGE_SOURCE="$(IMAGE_SOURCE ) " \
289308 --build-arg IMAGE_TAG="$1:$2" \
@@ -415,15 +434,15 @@ ifneq "$(LTS)" "true"
415434 $(eval MQ_IMAGE_DEVSERVER_S390X_DIGEST=$(shell $(COMMAND) run skopeo:latest --override-os linux inspect --creds $(MQ_ARCHIVE_REPOSITORY_USER):$(MQ_ARCHIVE_REPOSITORY_CREDENTIAL) docker://$(MQ_IMAGE_DEVSERVER_S390X) | jq -r .Digest))
416435 $(info $(shell printf "** Determined the built $(MQ_IMAGE_DEVSERVER_AMD64) has a digest of $(MQ_IMAGE_DEVSERVER_AMD64_DIGEST)**"$(END)))
417436 $(info $(shell printf "** Determined the built $(MQ_IMAGE_DEVSERVER_S390X) has a digest of $(MQ_IMAGE_DEVSERVER_S390X_DIGEST)**"$(END)))
418- endif
437+ endif
419438 $(eval MQ_IMAGE_ADVANCEDSERVER_AMD64_DIGEST=$(shell $(COMMAND) run skopeo:latest --override-os linux inspect --creds $(MQ_ARCHIVE_REPOSITORY_USER):$(MQ_ARCHIVE_REPOSITORY_CREDENTIAL) docker://$(MQ_IMAGE_ADVANCEDSERVER_AMD64) | jq -r .Digest))
420439 $(eval MQ_IMAGE_ADVANCEDSERVER_S390X_DIGEST=$(shell $(COMMAND) run skopeo:latest --override-os linux inspect --creds $(MQ_ARCHIVE_REPOSITORY_USER):$(MQ_ARCHIVE_REPOSITORY_CREDENTIAL) docker://$(MQ_IMAGE_ADVANCEDSERVER_S390X) | jq -r .Digest))
421440 $(info $(shell printf "** Determined the built $(MQ_IMAGE_ADVANCEDSERVER_AMD64) has a digest of $(MQ_IMAGE_ADVANCEDSERVER_AMD64_DIGEST)**"$(END)))
422441 $(info $(shell printf "** Determined the built $(MQ_IMAGE_ADVANCEDSERVER_S390X) has a digest of $(MQ_IMAGE_ADVANCEDSERVER_S390X_DIGEST)**"$(END)))
423- ifneq "$(LTS ) " "true"
442+ ifneq "$(LTS ) " "true"
424443 $(info $(shell printf "** Calling script to create fat-manifest for $(MQ_IMAGE_DEVSERVER_MANIFEST)**"$(END)))
425444 echo $(shell ./travis-build-scripts/create-manifest-list.sh -r $(MQ_DELIVERY_REGISTRY_HOSTNAME) -n $(MQ_DELIVERY_REGISTRY_NAMESPACE) -i $(MQ_IMAGE_DEVSERVER) -t $(MQ_MANIFEST_TAG) -u $(MQ_ARCHIVE_REPOSITORY_USER) -p $(MQ_ARCHIVE_REPOSITORY_CREDENTIAL) -d "$(MQ_IMAGE_DEVSERVER_AMD64_DIGEST) $(MQ_IMAGE_DEVSERVER_S390X_DIGEST)" $(END))
426- endif
445+ endif
427446 $(info $(shell printf "** Calling script to create fat-manifest for $(MQ_IMAGE_ADVANCEDSERVER_MANIFEST)**"$(END)))
428447 echo $(shell ./travis-build-scripts/create-manifest-list.sh -r $(MQ_DELIVERY_REGISTRY_HOSTNAME) -n $(MQ_DELIVERY_REGISTRY_NAMESPACE) -i $(MQ_IMAGE_ADVANCEDSERVER) -t $(MQ_MANIFEST_TAG) -u $(MQ_ARCHIVE_REPOSITORY_USER) -p $(MQ_ARCHIVE_REPOSITORY_CREDENTIAL) -d "$(MQ_IMAGE_ADVANCEDSERVER_AMD64_DIGEST) $(MQ_IMAGE_ADVANCEDSERVER_S390X_DIGEST)" $(END))
429448
0 commit comments