From 2bd3febb9093261706beac4f1c27b0030800d2cf Mon Sep 17 00:00:00 2001 From: Lyuben Penkovski <lyuben.penkovski@vereign.com> Date: Tue, 19 Dec 2023 12:17:44 +0200 Subject: [PATCH] Update Go to 1.21.5 and replace go-watcher with guard --- .gitlab-ci.yml | 4 ++-- .golangci.yml | 1 + deployment/ci/Dockerfile | 2 +- deployment/compose/Dockerfile | 10 +++------- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ba775a..c92e869 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ linters: - golangci-lint run unit tests: - image: golang:1.21.3 + image: golang:1.21.5 stage: test script: - go version @@ -23,7 +23,7 @@ unit tests: coverage: '/total:\s+\(statements\)\s+(\d+.\d+\%)/' govulncheck: - image: golang:1.21.3 + image: golang:1.21.5 stage: test script: - go version diff --git a/.golangci.yml b/.golangci.yml index a31b66b..bbcffe7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -27,3 +27,4 @@ linters: - misspell - staticcheck - unused + - gosimple diff --git a/deployment/ci/Dockerfile b/deployment/ci/Dockerfile index 80d6a86..d592467 100644 --- a/deployment/ci/Dockerfile +++ b/deployment/ci/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.3-alpine3.17 as builder +FROM golang:1.21.5-alpine3.17 as builder RUN apk add git diff --git a/deployment/compose/Dockerfile b/deployment/compose/Dockerfile index fbef388..ebc4977 100644 --- a/deployment/compose/Dockerfile +++ b/deployment/compose/Dockerfile @@ -1,15 +1,11 @@ -FROM golang:1.21.3 +FROM golang:1.21.5 -ENV GO111MODULE=on - -RUN go install github.com/canthefason/go-watcher/cmd/watcher@v0.2.4 +RUN go install github.com/ysmood/kit/cmd/guard@v0.25.11 ADD . /go/src/gitlab.eclipse.org/eclipse/xfsc/tsa/infohub WORKDIR /go/src/gitlab.eclipse.org/eclipse/xfsc/tsa/infohub -RUN go install -mod=vendor ./cmd/infohub/... - EXPOSE 8080 -ENTRYPOINT ["sh", "-c", "/go/bin/watcher -run gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/cmd/infohub -watch gitlab.eclipse.org/eclipse/xfsc/tsa/infohub"] +ENTRYPOINT ["sh", "-c", "/go/bin/guard -w '**/*.go' -- go run -mod=vendor ./cmd/infohub/..."] -- GitLab