summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-15 19:01:25 +0100
committerGitHub <noreply@github.com>2020-01-15 19:01:25 +0100
commit34429f3b534960d2505789fcb0ac0278fc4aa4c0 (patch)
tree6c3d94e119422661a37db1a5e0b9b511cc5124c4
parent974373f2b3202b93e33251dcc5b14f3274cc0796 (diff)
parentb830d3eb07e163864048fb6b4d0873cb61965dd0 (diff)
downloadpodman-34429f3b534960d2505789fcb0ac0278fc4aa4c0.tar.gz
podman-34429f3b534960d2505789fcb0ac0278fc4aa4c0.tar.bz2
podman-34429f3b534960d2505789fcb0ac0278fc4aa4c0.zip
Merge pull request #4870 from vrothberg/gating-dockerfile
Gating dockerfile
-rw-r--r--Makefile15
-rw-r--r--contrib/gate/Dockerfile4
-rw-r--r--hack/install_golangci.sh5
3 files changed, 8 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 06b6fd03d..a02706eaf 100644
--- a/Makefile
+++ b/Makefile
@@ -481,7 +481,7 @@ uninstall:
GIT_CHECK_EXCLUDE="./vendor:docs/make.bat" $(GOBIN)/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
.PHONY: install.tools
-install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ginkgo .install.golangci-lint ## Install needed tools
+install.tools: .install.gitvalidation .install.md2man .install.ginkgo .install.golangci-lint ## Install needed tools
define go-get
env GO111MODULE=off \
@@ -498,19 +498,8 @@ endef
$(call go-get,github.com/vbatts/git-validation); \
fi
-.install.gometalinter: .gopathok
- if [ ! -x "$(GOBIN)/gometalinter" ]; then \
- $(call go-get,github.com/alecthomas/gometalinter); \
- cd $(FIRST_GOPATH)/src/github.com/alecthomas/gometalinter; \
- git checkout --detach e8d801238da6f0dfd14078d68f9b53fa50a7eeb5; \
- $(GO) install github.com/alecthomas/gometalinter; \
- $(GOBIN)/gometalinter --install; \
- fi
-
.install.golangci-lint: .gopathok
- if [ ! -x "$(GOBIN)/golangci-lint" ]; then \
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOBIN)/ v1.18.0; \
- fi
+ VERSION=1.18.0 GOBIN=$(GOBIN) sh ./hack/install_golangci.sh
.install.md2man: .gopathok
if [ ! -x "$(GOMD2MAN)" ]; then \
diff --git a/contrib/gate/Dockerfile b/contrib/gate/Dockerfile
index 1939d7ad1..c6aacead5 100644
--- a/contrib/gate/Dockerfile
+++ b/contrib/gate/Dockerfile
@@ -1,6 +1,5 @@
-FROM fedora:30
+FROM fedora:31
RUN dnf -y install \
- atomic-registries \
btrfs-progs-devel \
bzip2 \
container-selinux \
@@ -46,7 +45,6 @@ WORKDIR $GOSRC
# Install dependencies
RUN set -x && \
- make install.tools && \
install -D -m 755 $GOSRC/contrib/gate/entrypoint.sh /usr/local/bin/ && \
rm -rf "$GOSRC"
diff --git a/hack/install_golangci.sh b/hack/install_golangci.sh
new file mode 100644
index 000000000..9d23bbd31
--- /dev/null
+++ b/hack/install_golangci.sh
@@ -0,0 +1,5 @@
+#!/bin/bash -e
+$GOBIN/golangci-lint --version | grep $VERSION
+if [ $? -ne 0 ]; then
+ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOBIN v$VERSION
+fi