Skip to content

Commit

Permalink
chore(agent): go tooling update
Browse files Browse the repository at this point in the history
  • Loading branch information
nandor-magyar committed Apr 19, 2024
1 parent 2ccba46 commit e46f6ff
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/builder_image_golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
env:
GITHUB_REGISTRY: ghcr.io
BUILDER_IMAGE_NAME: dyrector-io/dyrectorio/builder-images/golang
VERSION: 2
VERSION: 3
jobs:
build:
runs-on: ubuntu-22.04
Expand All @@ -37,7 +37,7 @@ jobs:
push:
runs-on: ubuntu-22.04
needs: build
if: github.ref_name == 'develop'
#if: github.ref_name == 'develop'
environment: Workflow - Protected
steps:
- name: Artifact download
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/product_builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-22.04
container:
# yamlfmt resides here because alpine doesn't provide yamlfmt package
image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2
image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
runs-on: ubuntu-22.04
needs: gather_changes
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2
image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3
defaults:
run:
working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }}
Expand All @@ -139,7 +139,7 @@ jobs:
runs-on: ubuntu-22.04
needs: gather_changes
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2
image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3
defaults:
run:
working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }}
Expand All @@ -163,7 +163,7 @@ jobs:
runs-on: ubuntu-22.04
needs: gather_changes
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2
image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3
defaults:
run:
working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }}
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
runs-on: ubuntu-22.04
needs: gather_changes
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2
image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3
defaults:
run:
working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }}
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
- go_integration
- gather_changes
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2
image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3
defaults:
run:
working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }}
Expand Down Expand Up @@ -661,7 +661,7 @@ jobs:
packages: write
runs-on: ubuntu-22.04
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2
image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3
defaults:
run:
working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }}
Expand Down
15 changes: 6 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
run:
timeout: 5m
skip-dirs:
- internal/cache
linters-settings:
depguard:
rules:
Expand All @@ -19,8 +17,9 @@ linters-settings:
funlen:
lines: 100
statements: 50
gci:
local-prefixes: github.com/golangci/golangci-lint
# gci:
# sections:
# - "prefix()"
goconst:
min-len: 2
min-occurrences: 2
Expand Down Expand Up @@ -50,22 +49,18 @@ linters-settings:
- condition
- return
govet:
check-shadowing: true
enable-all: true
lll:
line-length: 140
maligned:
suggest-new: true
misspell:
locale: US
nolintlint:
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
tenv:
all: true
staticcheck:
go: "1.18"
checks:
- all
linters:
Expand Down Expand Up @@ -123,3 +118,5 @@ issues:
- path: _test\.go
linters:
- gomnd
exclude-dirs:
- internal/cache
10 changes: 5 additions & 5 deletions golang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ LDFLAGS := -ldflags "-X '${PACKAGE}/internal/version.BuildTimestamp=${BUILD_TIME
# default tag is latest for building
image_version ?= latest

GOAIR=v1.45.0
GOSEC=v2.17.0
GOLANGCI=v1.54.2
GOFUMPT=v0.5.0
YAMLFMT=v0.9.0
GOAIR=v1.51.0
GOSEC=v2.19.0
GOLANGCI=v1.57.2
GOFUMPT=v0.6.0
YAMLFMT=v0.11.0

# support for: linux darwin windows
GOOS?=linux
Expand Down
2 changes: 1 addition & 1 deletion images/builder-golang/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/golang:1.20-alpine3.18
FROM docker.io/library/golang:1.21-alpine3.19

ENV GOLANGCI_LINT_CACHE $GOPATH/cache
ENV GOCACHE $GOPATH/cache
Expand Down

0 comments on commit e46f6ff

Please sign in to comment.