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

Use golang from epel repo #28

Merged
merged 6 commits into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,26 @@ ENV LANG=en_US.utf8
ARG USE_GO_VERSION_FROM_WEBSITE=0

# Some packages might seem weird but they are required by the RVM installer.
RUN yum --enablerepo=centosplus install -y --quiet \
RUN yum install epel-release -y && \
yum --enablerepo=centosplus --enablerepo=epel install -y \
findutils \
git \
$(test -z $USE_GO_VERSION_FROM_WEBSITE && echo "golang") \
$(test "$USE_GO_VERSION_FROM_WEBSITE" != 1 && echo "golang") \
make \
procps-ng \
tar \
wget \
which \
&& yum clean all

RUN test -n $USE_GO_VERSION_FROM_WEBSITE \
&& cd /tmp \
&& wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz \
&& echo "b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 go1.10.linux-amd64.tar.gz" > checksum \
RUN echo $USE_GO_VERSION_FROM_WEBSITE
RUN if [[ "$USE_GO_VERSION_FROM_WEBSITE" == 1 ]]; then cd /tmp \
&& wget https://dl.google.com/go/go1.11.3.linux-amd64.tar.gz \
&& echo "b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 go1.11.3.linux-amd64.tar.gz" > checksum \
&& sha256sum -c checksum \
&& tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz \
&& rm -f go1.10.linux-amd64.tar.gz
&& tar -C /usr/local -xzf go1.11.3.linux-amd64.tar.gz \
&& rm -f go1.11.3.linux-amd64.tar.gz; \
fi
ENV PATH=$PATH:/usr/local/go/bin

# Get dep for Go package management and make sure the directory has full rwz permissions for non-root users
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ SOURCES := $(shell find $(SOURCE_DIR) -path $(SOURCE_DIR)/vendor -prune -o -name
DESIGN_DIR=design
DESIGNS := $(shell find $(SOURCE_DIR)/$(DESIGN_DIR) -path $(SOURCE_DIR)/vendor -prune -o -name '*.go' -print)

# This pattern excludes the listed folders while running tests
TEST_PKGS_EXCLUDE_PATTERN = "vendor|app|tool\/build-tool-detector-cli|design|client|test"

include ./.make/docker.mk
ifeq ($(OS),Windows_NT)
include ./.make/Makefile.win
else
include ./.make/Makefile.lnx
endif




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

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

.PHONY: format ## Removes unneeded imports and formats source code
format:
Expand Down