Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit b106da1

Browse files
jarifibrahimcorinnekrych
authored andcommitted
Use golang from epel repo (#28)
* Use golang from epel * Use golang from website * Set USE_GO_VERSION_FROM_WEBSITE in makefile * fixup * Fix exclude pattern regex * Use extended grep regex pattern
1 parent 1308214 commit b106da1

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

Dockerfile.builder

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,26 @@ ENV LANG=en_US.utf8
55
ARG USE_GO_VERSION_FROM_WEBSITE=0
66

77
# Some packages might seem weird but they are required by the RVM installer.
8-
RUN yum --enablerepo=centosplus install -y --quiet \
8+
RUN yum install epel-release -y && \
9+
yum --enablerepo=centosplus --enablerepo=epel install -y \
910
findutils \
1011
git \
11-
$(test -z $USE_GO_VERSION_FROM_WEBSITE && echo "golang") \
12+
$(test "$USE_GO_VERSION_FROM_WEBSITE" != 1 && echo "golang") \
1213
make \
1314
procps-ng \
1415
tar \
1516
wget \
1617
which \
1718
&& yum clean all
1819

19-
RUN test -n $USE_GO_VERSION_FROM_WEBSITE \
20-
&& cd /tmp \
21-
&& wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz \
22-
&& echo "b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 go1.10.linux-amd64.tar.gz" > checksum \
20+
RUN echo $USE_GO_VERSION_FROM_WEBSITE
21+
RUN if [[ "$USE_GO_VERSION_FROM_WEBSITE" == 1 ]]; then cd /tmp \
22+
&& wget https://dl.google.com/go/go1.11.3.linux-amd64.tar.gz \
23+
&& echo "b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 go1.11.3.linux-amd64.tar.gz" > checksum \
2324
&& sha256sum -c checksum \
24-
&& tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz \
25-
&& rm -f go1.10.linux-amd64.tar.gz
25+
&& tar -C /usr/local -xzf go1.11.3.linux-amd64.tar.gz \
26+
&& rm -f go1.11.3.linux-amd64.tar.gz; \
27+
fi
2628
ENV PATH=$PATH:/usr/local/go/bin
2729

2830
# Get dep for Go package management and make sure the directory has full rwz permissions for non-root users

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ SOURCES := $(shell find $(SOURCE_DIR) -path $(SOURCE_DIR)/vendor -prune -o -name
99
DESIGN_DIR=design
1010
DESIGNS := $(shell find $(SOURCE_DIR)/$(DESIGN_DIR) -path $(SOURCE_DIR)/vendor -prune -o -name '*.go' -print)
1111

12+
# This pattern excludes the listed folders while running tests
13+
TEST_PKGS_EXCLUDE_PATTERN = "vendor|app|tool\/build-tool-detector-cli|design|client|test"
14+
1215
include ./.make/docker.mk
1316
ifeq ($(OS),Windows_NT)
1417
include ./.make/Makefile.win
1518
else
1619
include ./.make/Makefile.lnx
1720
endif
1821

19-
20-
21-
2222
# This is a fix for a non-existing user in passwd file when running in a docker
2323
# container and trying to clone repos of dependencies
2424
GIT_COMMITTER_NAME ?= "user"
@@ -177,7 +177,8 @@ generate: prebuild-check $(DESIGNS) $(GOAGEN_BIN) $(VENDOR_DIR) ## Generate GOA
177177

178178
.PHONY: test
179179
test: test-deps ## Executes all tests
180-
$(GINKGO_BIN) -r
180+
$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v -E $(TEST_PKGS_EXCLUDE_PATTERN)))
181+
go test -vet off $(TEST_PACKAGES) -v
181182

182183
.PHONY: format ## Removes unneeded imports and formats source code
183184
format:

0 commit comments

Comments
 (0)