Skip to content

Commit f0e681e

Browse files
authored
Merge pull request #150 from parrobe/master
Allow building of latest versions
2 parents 1800482 + 4b1b417 commit f0e681e

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

Makefile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@
2020
BASE_IMAGE ?= ubuntu:16.04
2121
# MQ_VERSION is the fully qualified MQ version number to build
2222
MQ_VERSION ?= 9.0.5.0
23-
MQ_SDK_VERSION ?= 9.0.5.0
2423
# MQ_ARCHIVE is the name of the file, under the downloads directory, from which MQ Advanced can
2524
# be installed. The default value is derived from MQ_VERSION, BASE_IMAGE and architecture
2625
# Does not apply to MQ Advanced for Developers.
2726
MQ_ARCHIVE ?= IBM_MQ_$(MQ_VERSION)_$(MQ_ARCHIVE_TYPE)_$(MQ_ARCHIVE_ARCH).tar.gz
2827
# MQ_ARCHIVE_DEV is the name of the file, under the downloads directory, from which MQ Advanced
2928
# for Developers can be installed
3029
MQ_ARCHIVE_DEV ?= $(MQ_ARCHIVE_DEV_$(MQ_VERSION))
31-
MQ_SDK_ARCHIVE ?= $(MQ_ARCHIVE_DEV_$(MQ_SDK_VERSION))
30+
# MQ_SDK_ARCHIVE specifies the archive to use for building the golang programs. Defaults vary on developer or advanced.
31+
MQ_SDK_ARCHIVE ?= $(MQ_ARCHIVE_DEV_$(MQ_VERSION))
3232
# Options to `go test` for the Docker tests
3333
TEST_OPTS_DOCKER ?=
3434
# MQ_IMAGE_ADVANCEDSERVER is the name and tag of the built MQ Advanced image
3535
MQ_IMAGE_ADVANCEDSERVER ?=mqadvanced-server:$(MQ_VERSION)-$(ARCH)-$(BASE_IMAGE_TAG)
3636
# MQ_IMAGE_DEVSERVER is the name and tag of the built MQ Advanced for Developers image
3737
MQ_IMAGE_DEVSERVER ?=mqadvanced-server-dev:$(MQ_VERSION)-$(ARCH)-$(BASE_IMAGE_TAG)
3838
# MQ_IMAGE_SDK is the name and tag of the built MQ Advanced for Developers SDK image
39-
MQ_IMAGE_SDK ?=mq-sdk:$(MQ_SDK_VERSION)-$(ARCH)-$(BASE_IMAGE_TAG)
39+
MQ_IMAGE_SDK ?=mq-sdk:$(MQ_VERSION)-$(ARCH)-$(BASE_IMAGE_TAG)
4040
# MQ_IMAGE_GOLANG_SDK is the name and tag of the built MQ Advanced for Developers SDK image, plus Go tools
41-
MQ_IMAGE_GOLANG_SDK ?=mq-golang-sdk:$(MQ_SDK_VERSION)-$(ARCH)-$(BASE_IMAGE_TAG)
41+
MQ_IMAGE_GOLANG_SDK ?=mq-golang-sdk:$(MQ_VERSION)-$(ARCH)-$(BASE_IMAGE_TAG)
4242
# DOCKER is the Docker command to run
4343
DOCKER ?= docker
4444
# MQ_PACKAGES specifies the MQ packages (.deb or .rpm) to install. Defaults vary on base image.
@@ -78,10 +78,13 @@ endif
7878
# Try to figure out which archive to use from the architecture
7979
ifeq "$(ARCH)" "x86_64"
8080
MQ_ARCHIVE_ARCH=X86-64
81+
MQ_DEV_ARCH=x86-64
8182
else ifeq "$(ARCH)" "ppc64le"
8283
MQ_ARCHIVE_ARCH=LE_POWER
84+
MQ_DEV_ARCH=ppcle
8385
else ifeq "$(ARCH)" "s390x"
8486
MQ_ARCHIVE_ARCH=SYSTEM_Z
87+
MQ_DEV_ARCH=s390x
8588
endif
8689
# Archive names for IBM MQ Advanced for Developers
8790
MQ_ARCHIVE_DEV_9.0.4.0=mqadv_dev904_$(MQ_ARCHIVE_DEV_PLATFORM)_x86-64.tar.gz
@@ -129,7 +132,7 @@ downloads/$(MQ_ARCHIVE_DEV):
129132
cd downloads; curl -LO https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/$(MQ_ARCHIVE_DEV)
130133

131134
downloads/$(MQ_SDK_ARCHIVE):
132-
$(info $(SPACER)$(shell printf $(TITLE)"Downloading IBM MQ Advanced for Developers "$(MQ_SDK_VERSION)$(END)))
135+
$(info $(SPACER)$(shell printf $(TITLE)"Downloading IBM MQ Advanced for Developers "$(MQ_VERSION)$(END)))
133136
mkdir -p downloads
134137
cd downloads; curl -LO https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/$(MQ_SDK_ARCHIVE)
135138

@@ -207,7 +210,7 @@ define docker-build-mq
207210
--volume $(DOWNLOADS_DIR):/usr/share/nginx/html:ro \
208211
--detach \
209212
nginx:alpine
210-
# Build the new image (use --pull to make sure we have the latest base image)
213+
# Build the new image
211214
$(DOCKER) build \
212215
--tag $1 \
213216
--file $2 \
@@ -230,6 +233,7 @@ docker-version:
230233
@test "$(word 1,$(subst ., ,$(DOCKER_SERVER_VERSION)))" -ge "17" || ("$(word 1,$(subst ., ,$(DOCKER_SERVER_VERSION)))" -eq "17" && "$(word 2,$(subst ., ,$(DOCKER_CLIENT_VERSION)))" -ge "05") || (echo "Error: Docker server 17.05 or greater is required" && exit 1)
231234

232235
.PHONY: build-advancedserver
236+
build-advancedserver: MQ_SDK_ARCHIVE=$(MQ_ARCHIVE)
233237
build-advancedserver: downloads/$(MQ_ARCHIVE) docker-version build-golang-sdk
234238
$(info $(SPACER)$(shell printf $(TITLE)"Build $(MQ_IMAGE_ADVANCEDSERVER)"$(END)))
235239
$(call docker-build-mq,$(MQ_IMAGE_ADVANCEDSERVER),Dockerfile-server,$(MQ_ARCHIVE),"4486e8c4cc9146fd9b3ce1f14a2dfc5b","IBM MQ Advanced",$(MQ_VERSION))
@@ -260,11 +264,11 @@ else
260264
build-sdk: MQ_PACKAGES=MQSeriesRuntime-*.rpm MQSeriesSDK-*.rpm MQSeriesSamples*.rpm
261265
endif
262266
build-sdk: downloads/$(MQ_SDK_ARCHIVE) docker-version docker-pull
263-
$(call docker-build-mq,$(MQ_IMAGE_SDK),incubating/mq-sdk/Dockerfile,$(MQ_SDK_ARCHIVE),"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers SDK (Non-Warranted)",$(MQ_SDK_VERSION))
267+
$(call docker-build-mq,$(MQ_IMAGE_SDK),incubating/mq-sdk/Dockerfile,$(MQ_SDK_ARCHIVE),"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers SDK (Non-Warranted)",$(MQ_VERSION))
264268

265269
build-golang-sdk: downloads/$(MQ_SDK_ARCHIVE) docker-version build-sdk
266270
$(DOCKER) build --build-arg BASE_IMAGE=$(MQ_IMAGE_SDK) -t $(MQ_IMAGE_GOLANG_SDK) -f incubating/mq-golang-sdk/Dockerfile .
267-
# $(call docker-build-mq,$(MQ_IMAGE_GOLANG_SDK),incubating/mq-golang-sdk/Dockerfile,$(MQ_IMAGE_SDK),"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers SDK (Non-Warranted)",$(MQ_SDK_VERSION))
271+
# $(call docker-build-mq,$(MQ_IMAGE_GOLANG_SDK),incubating/mq-golang-sdk/Dockerfile,$(MQ_IMAGE_SDK),"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers SDK (Non-Warranted)",$(MQ_VERSION))
268272

269273
docker-pull:
270274
$(DOCKER) pull $(BASE_IMAGE)

test/docker/devconfig_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ func TestDevWebDisabled(t *testing.T) {
123123
waitForReady(t, cli, id)
124124
t.Run("Web", func(t *testing.T) {
125125
_, dspmqweb := execContainer(t, cli, id, "mqm", []string{"dspmqweb"})
126-
if !strings.Contains(dspmqweb, "Server mqweb is not running.") {
127-
t.Errorf("Expected dspmqweb to say server is not running; got \"%v\"", dspmqweb)
126+
if !strings.Contains(dspmqweb, "Server mqweb is not running.") && !strings.Contains(dspmqweb, "MQWB1125I") {
127+
t.Errorf("Expected dspmqweb to say 'Server is not running' or 'MQWB1125I'; got \"%v\"", dspmqweb)
128128
}
129129
})
130130
t.Run("JMS", func(t *testing.T) {

0 commit comments

Comments
 (0)