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

Commit

Permalink
Merge pull request #801 from silvin-lubecki/bump-golang
Browse files Browse the repository at this point in the history
Bump golang, alpine and CI tools
  • Loading branch information
silvin-lubecki authored Apr 21, 2020
2 parents 2d284bf + 32732b3 commit 1183b98
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
linters:
run:
concurrency: 2
modules-download-mode: vendor
skip-dirs:
- vendor
enable-all: false
disable-all: true
enable:
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM dockercore/golang-cross:1.12.9@sha256:3ea9dcef4dd2c46d80445c0b22d6177817f4cfce22c523cc12a5a1091cb37705 AS cli-build
FROM dockercore/golang-cross:1.13.10@sha256:ad2725ac9af0273f1de9bb85e166084d5e8d915df334154fe9c8bd9af912a90d AS cli-build
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
ARG CLI_CHANNEL=stable
ARG CLI_VERSION=19.03.5
ARG CLI_VERSION=19.03.8

RUN apt-get install -y -q --no-install-recommends \
RUN apt-get update && apt-get install -y -q --no-install-recommends \
coreutils \
util-linux \
uuid-runtime
Expand All @@ -21,7 +21,7 @@ ARG GOPROXY
RUN make binary-windows

# main dev image
FROM golang:1.13.3 AS dev
FROM golang:1.13.10 AS dev

RUN apt-get update && apt-get install -y -q --no-install-recommends \
coreutils \
Expand All @@ -35,7 +35,7 @@ ENV PATH=${PATH}:/go/src/github.com/docker/app/bin/
ARG DEP_VERSION=v0.5.4
RUN curl -o /usr/bin/dep -L https://github.com/golang/dep/releases/download/${DEP_VERSION}/dep-linux-amd64 && \
chmod +x /usr/bin/dep
ARG GOTESTSUM_VERSION=v0.3.4
ARG GOTESTSUM_VERSION=v0.4.2
ARG GOPROXY
RUN mkdir $GOPATH/src/gotest.tools && \
git clone -q https://github.com/gotestyourself/gotestsum $GOPATH/src/gotest.tools/gotestsum && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.invocation-image
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG ALPINE_VERSION=3.10.3
ARG ALPINE_VERSION=3.11.5

FROM golang:1.13.2 AS build
FROM golang:1.13.10 AS build

RUN apt-get update -qq && apt-get install -y -q --no-install-recommends \
coreutils \
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile.lint
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
ARG ALPINE_VERSION=3.10
ARG GO_VERSION=1.12.9
ARG ALPINE_VERSION=3.11
ARG GO_VERSION=1.13.10

FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION}
RUN apk add --no-cache \
curl \
git \
make \
coreutils
coreutils \
build-base

RUN GO111MODULE=on go get \
github.com/golangci/golangci-lint/cmd/golangci-lint@v1.16.0 \
github.com/golangci/golangci-lint/cmd/golangci-lint@v1.23.0 \
&& rm -rf /go/src/* /go/pkg/*

WORKDIR /go/src/github.com/docker/app
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test: test-unit test-e2e ## run all tests

lint: ## run linter(s)
@echo "Linting..."
@golangci-lint run ./...
golangci-lint run --verbose --print-resources-usage --timeout 10m0s ./...

test-e2e: bin/$(BIN_NAME) ## run end-to-end tests
@echo "Running e2e tests..."
Expand Down
2 changes: 1 addition & 1 deletion docs/yaml/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12-alpine AS base
FROM golang:1.13-alpine AS base

ARG PROJECT=github.com/docker/app
ARG PROJECT_PATH=/go/src/${PROJECT}
Expand Down
5 changes: 2 additions & 3 deletions e2e/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,13 @@ func runWithDindSwarmAndRegistry(t *testing.T, todo func(dindSwarmAndRegistryInf
todo(runner)
}

func build(t *testing.T, cmd icmd.Cmd, dockerCli dockerCliCommand, ref, path string) string {
func build(t *testing.T, cmd icmd.Cmd, dockerCli dockerCliCommand, ref, path string) {
iidfile := fs.NewFile(t, "iid")
defer iidfile.Remove()
cmd.Command = dockerCli.Command("app", "build", "--iidfile", iidfile.Path(), "-t", ref, path)
icmd.RunCmd(cmd).Assert(t, icmd.Success)
bytes, err := ioutil.ReadFile(iidfile.Path())
_, err := ioutil.ReadFile(iidfile.Path())
assert.NilError(t, err)
return string(bytes)
}

// Container represents a docker container
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/cnab-parameters/cnab/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ALPINE_VERSION=3.10.3
ARG ALPINE_VERSION=3.11.5

FROM alpine:${ALPINE_VERSION}

Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/cnab-with-docker-status/cnab/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ALPINE_VERSION=3.10.3
ARG ALPINE_VERSION=3.11.5

FROM alpine:${ALPINE_VERSION}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ALPINE_VERSION=3.10.3
ARG ALPINE_VERSION=3.11.5

FROM alpine:${ALPINE_VERSION}

Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/cnab-without-status/cnab/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ALPINE_VERSION=3.10.1
ARG ALPINE_VERSION=3.11.5

FROM alpine:${ALPINE_VERSION}

Expand Down
2 changes: 1 addition & 1 deletion internal/commands/image/tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestInvalidDestinationReference(t *testing.T) {

err := runTag(mockedImageStore, "ref", badRef)

assert.ErrorContains(t, err, fmt.Sprintf("invalid reference format"))
assert.ErrorContains(t, err, "invalid reference format")
}

func TestBundleNotStored(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestLoadFromDirectory(t *testing.T) {
app, err := LoadFromDirectory(dir.Path())
assert.NilError(t, err)
assert.Assert(t, app != nil)
assert.Assert(t, is.Equal(app.Path, dir.Path()))
assert.Assert(t, is.Equal(app.Path, dir.Path())) //nolint:staticcheck
assertAppContent(t, app)
}

Expand All @@ -62,7 +62,7 @@ func TestLoadFromTar(t *testing.T) {
app, err := LoadFromTar(myapp.Path())
assert.NilError(t, err)
assert.Assert(t, app != nil)
assert.Assert(t, is.Equal(app.Path, myapp.Path()))
assert.Assert(t, is.Equal(app.Path, myapp.Path())) //nolint:staticcheck
assertAppContent(t, app)
}

Expand Down
2 changes: 1 addition & 1 deletion vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PKG_NAME := github.com/docker/app
BIN_NAME ?= docker-app
E2E_NAME := $(BIN_NAME)-e2e

ALPINE_VERSION=3.10.3
ALPINE_VERSION=3.11.5

# Failing to resolve sh.exe to a full path denotes a windows vanilla shell.
# Although 'simple' commands are still exec'ed, 'complex' ones are batch'ed instead of sh'ed.
Expand Down

0 comments on commit 1183b98

Please sign in to comment.