Skip to content

Commit

Permalink
chore(deps): upgrade go version in dockerfile (#638)
Browse files Browse the repository at this point in the history
- [x] fix warnings about case of `as` to `AS` in Dockerfile
  - `FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)`
- [x] shorten go version in go.mod
- [x] update Dockerfile Go version from 1.17 to 1.22 to match go.mod
- [x] upgrade alipine/git image version to latest, current was 4 years old
  - -from alpine/git:v2.24.3 (4 years old) to alpine/git:v2.45.2
- [x] fix warning with linting
  - `WARN [config_reader] The configuration option 'run.skip-files' is deprecated, please use 'issues.exclude-files'`
- [x] add .tool-versions (asdf) to .gitignore

Signed-off-by: jmeridth <jmeridth@gmail.com>
  • Loading branch information
jmeridth authored Nov 26, 2024
1 parent 88c35a9 commit 0371401
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.vscode
.idea
coverage.out
vendor/
vendor/
.tool-versions
6 changes: 3 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
run:
skip-files:
- "pkg/diff/internal/fieldmanager/borrowed_.+\\.go$"
issues:
exclude-files:
- "pkg/diff/internal/fieldmanager/borrowed_.*\\.go$"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17 as builder
FROM golang:1.22 AS builder

WORKDIR /src

Expand All @@ -12,5 +12,5 @@ COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /dist/gitops ./agent


FROM alpine/git:v2.24.3
FROM alpine/git:v2.45.2
COPY --from=builder /dist/gitops /usr/local/bin/gitops

0 comments on commit 0371401

Please sign in to comment.