From 7d8ce547dabb83563bd23dfcec105288ed699a38 Mon Sep 17 00:00:00 2001 From: Alex Mirski-Fitton Date: Thu, 11 Nov 2021 11:27:02 +0000 Subject: [PATCH 1/3] Update go-toolset, and UBI --- Dockerfile-server | 5 +++-- install-build-deps.sh | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile-server b/Dockerfile-server index dc6229c..a09c801 100644 --- a/Dockerfile-server +++ b/Dockerfile-server @@ -13,9 +13,9 @@ # limitations under the License. ARG BASE_IMAGE=registry.redhat.io/ubi8/ubi-minimal -ARG BASE_TAG=8.4-212 +ARG BASE_TAG=8.5-204 ARG BUILDER_IMAGE=registry.redhat.io/ubi8/go-toolset -ARG BUILDER_TAG=1.15.14-18 +ARG BUILDER_TAG=1.16.7-5 ARG GO_WORKDIR=/opt/app-root/src/go/src/github.com/ibm-messaging/mq-container ARG MQ_URL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/9.2.0.4-IBM-MQ-Advanced-for-Developers-Non-Install-LinuxX64.tar.gz" ############################################################################### @@ -37,6 +37,7 @@ RUN mkdir /opt/mqm \ && INSTALL_SDK=1 install-mq.sh \ && chown -R 1001:root /opt/mqm/* WORKDIR $GO_WORKDIR/ +COPY go.mod go.sum ./ COPY cmd/ ./cmd COPY internal/ ./internal COPY pkg/ ./pkg diff --git a/install-build-deps.sh b/install-build-deps.sh index 8168d6c..3c8ac44 100755 --- a/install-build-deps.sh +++ b/install-build-deps.sh @@ -22,5 +22,8 @@ set -ex sudo curl -Lo /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-$ARCH sudo chmod +x /usr/local/bin/dep -go get -u golang.org/x/lint/golint +( + cd "$(mktemp -d)" + go get -u golang.org/x/lint/golint +) curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $GOPATH/bin 2.0.0 || echo "Gosec not installed. Platform may not be supported." From ddfe933f4977c590b2d9b1f77fd45a35eb441fe6 Mon Sep 17 00:00:00 2001 From: Alex Mirski-Fitton Date: Thu, 11 Nov 2021 15:10:42 +0000 Subject: [PATCH 2/3] Allow longer for webserver to respond --- test/docker/devconfig_test_util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/docker/devconfig_test_util.go b/test/docker/devconfig_test_util.go index 6b13579..7cdbae5 100644 --- a/test/docker/devconfig_test_util.go +++ b/test/docker/devconfig_test_util.go @@ -1,7 +1,8 @@ +//go:build mqdev // +build mqdev /* -© Copyright IBM Corporation 2018, 2019 +© Copyright IBM Corporation 2018, 2021 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -49,7 +50,7 @@ var insecureTLSConfig *tls.Config = &tls.Config{ func waitForWebReady(t *testing.T, cli *client.Client, ID string, tlsConfig *tls.Config) { httpClient := http.Client{ - Timeout: time.Duration(3 * time.Second), + Timeout: time.Duration(10 * time.Second), Transport: &http.Transport{ TLSClientConfig: tlsConfig, }, From 09bc87d6d3f3fea990984232a9f4cb9187cc40bf Mon Sep 17 00:00:00 2001 From: Alex Mirski-Fitton Date: Fri, 12 Nov 2021 12:59:51 +0000 Subject: [PATCH 3/3] Only log in if user defined --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 408dcd8..be431c2 100644 --- a/Makefile +++ b/Makefile @@ -376,7 +376,9 @@ endif .PHONY: docker-login docker-login: +ifneq ($(DOCKER_USER),) docker login -u $(DOCKER_USER) -p $(DOCKER_PASS) +endif .PHONY: log-build-env log-build-vars: