Skip to content

Commit 0c4ebbd

Browse files
bhavyahemGitHub Enterprise
authored andcommitted
Temp fix for the build issue (#790)
* Temp fix for the build issue * Give executable permission
1 parent afb70d9 commit 0c4ebbd

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
dist: bionic
1616
group: beta
1717
sudo: required
18-
language: go
1918

2019
go:
2120
- "1.22.7"
@@ -29,6 +28,7 @@ env:
2928
- TAGCACHE_FILE=tagcache
3029
- RELEASE=r1
3130
- BASE_MQ_LOCKED=false
31+
- GO_VERSION="1.22.7"
3232

3333
go_import_path: "github.com/ibm-messaging/mq-container"
3434

@@ -174,9 +174,16 @@ jobs:
174174

175175

176176
before_install:
177+
- make go-install
178+
- curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/urfave/gimme/main/gimme
179+
- chmod +x ~/bin/gimme
180+
- gimme version
181+
- eval "$(gimme "$GO_VERSION")"
182+
- go env
177183
- make install-build-deps
178184
- make install-credential-helper
179185

186+
180187
install:
181188
- echo nothing
182189

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ cache-mq-tag:
300300

301301
# Vendor Go dependencies for the Container tests
302302
test/container/vendor:
303-
cd test/container && go mod vendor
303+
cd test/container && /usr/local/go/bin/go mod vendor
304304

305305
# Shortcut to just run the unit tests
306306
.PHONY: test-unit
@@ -315,7 +315,7 @@ endef
315315
test-advancedserver: test/container/vendor
316316
$(info $(SPACER)$(shell printf $(TITLE)"Test $(MQ_IMAGE_ADVANCEDSERVER):$(MQ_TAG) on $(shell $(COMMAND) --version)"$(END)))
317317
$(call inspect-image,$(MQ_IMAGE_ADVANCEDSERVER),$(MQ_TAG))
318-
cd test/container && TEST_IMAGE=$(MQ_IMAGE_ADVANCEDSERVER):$(MQ_TAG) EXPECTED_LICENSE=Production DOCKER_API_VERSION=$(DOCKER_API_VERSION) COMMAND=$(COMMAND) go test -parallel $(NUM_CPU) -timeout $(TEST_TIMEOUT_CONTAINER) $(TEST_OPTS_CONTAINER)
318+
cd test/container && TEST_IMAGE=$(MQ_IMAGE_ADVANCEDSERVER):$(MQ_TAG) EXPECTED_LICENSE=Production DOCKER_API_VERSION=$(DOCKER_API_VERSION) COMMAND=$(COMMAND) /usr/local/go/bin/go test -parallel $(NUM_CPU) -timeout $(TEST_TIMEOUT_CONTAINER) $(TEST_OPTS_CONTAINER)
319319

320320
.PHONY: build-devjmstest
321321
build-devjmstest:
@@ -326,7 +326,7 @@ build-devjmstest:
326326
test-devserver: test/container/vendor
327327
$(info $(SPACER)$(shell printf $(TITLE)"Test $(MQ_IMAGE_DEVSERVER):$(MQ_TAG) on $(shell $(COMMAND) --version)"$(END)))
328328
$(call inspect-image,$(MQ_IMAGE_DEVSERVER),$(MQ_TAG))
329-
cd test/container && TEST_IMAGE=$(MQ_IMAGE_DEVSERVER):$(MQ_TAG) EXPECTED_LICENSE=Developer DEV_JMS_IMAGE=$(DEV_JMS_IMAGE) IBMJRE=false DOCKER_API_VERSION=$(DOCKER_API_VERSION) COMMAND=$(COMMAND) go test -parallel $(NUM_CPU) -timeout $(TEST_TIMEOUT_CONTAINER) -tags mqdev $(TEST_OPTS_CONTAINER)
329+
cd test/container && TEST_IMAGE=$(MQ_IMAGE_DEVSERVER):$(MQ_TAG) EXPECTED_LICENSE=Developer DEV_JMS_IMAGE=$(DEV_JMS_IMAGE) IBMJRE=false DOCKER_API_VERSION=$(DOCKER_API_VERSION) COMMAND=$(COMMAND) /usr/local/go/bin/go test -parallel $(NUM_CPU) -timeout $(TEST_TIMEOUT_CONTAINER) -tags mqdev $(TEST_OPTS_CONTAINER)
330330

331331
.PHONY: coverage
332332
coverage:
@@ -520,7 +520,7 @@ build-manifest: build-skopeo-container
520520
$(info $(shell printf "** Determined the built $(MQ_IMAGE_DEVSERVER_AMD64) has a digest of $(MQ_IMAGE_DEVSERVER_AMD64_DIGEST)**"$(END)))
521521
$(info $(shell printf "** Determined the built $(MQ_IMAGE_DEVSERVER_S390X) has a digest of $(MQ_IMAGE_DEVSERVER_S390X_DIGEST)**"$(END)))
522522
$(info $(shell printf "** Determined the built $(MQ_IMAGE_DEVSERVER_PPC64LE) has a digest of $(MQ_IMAGE_DEVSERVER_PPC64LE_DIGEST)**"$(END)))
523-
523+
524524
$(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))
525525
$(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))
526526
$(eval MQ_IMAGE_ADVANCEDSERVER_PPC64LE_DIGEST=$(shell $(COMMAND) run skopeo:latest --override-os linux inspect --creds $(MQ_ARCHIVE_REPOSITORY_USER):$(MQ_ARCHIVE_REPOSITORY_CREDENTIAL) docker://$(MQ_IMAGE_ADVANCEDSERVER_PPC64LE) | jq -r .Digest))
@@ -548,6 +548,10 @@ clean:
548548
rm -rf ./build
549549
rm -rf ./deps
550550

551+
.PHONY: go-install
552+
go-install:
553+
GO_VERSION=$(GO_VERSION) ARCH=$(ARCH) ./go-install.sh
554+
551555
.PHONY: install-build-deps
552556
install-build-deps:
553557
ARCH=$(ARCH) ./install-build-deps.sh

go-install.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
# -*- mode: sh -*-
3+
# © Copyright IBM Corporation 2015, 2019
4+
#
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
# Install Docker and dep, required by build (assumes Ubuntu host, as used by Travis build)
19+
20+
set -ex
21+
22+
sudo rm -rf /usr/local/go;
23+
DOWNLOAD_URL="https://go.dev/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz"
24+
curl -fLo go.tar.gz "${DOWNLOAD_URL}"
25+
sudo tar -C /usr/local -xzf go.tar.gz
26+
export PATH=$PATH:/usr/local/go/bin
27+
go version

0 commit comments

Comments
 (0)