Skip to content

Commit

Permalink
Merge pull request #432 from jenkins-x-plugins/go1-22
Browse files Browse the repository at this point in the history
chore: upgrade to go 1.22
  • Loading branch information
jenkins-x-bot authored Jul 2, 2024
2 parents b9f23ca + 94aca01 commit 6249a6b
Show file tree
Hide file tree
Showing 21 changed files with 1,321 additions and 1,615 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/jenkins-x-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: jx-variables
uses: docker://ghcr.io/jenkins-x/jx-boot:3.2.157
with:
args: gitops variables
entrypoint: jx
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: build-make-linux
uses: docker://golang:1.19.5
uses: docker://golang:1.22.3
with:
args: -c "make linux"
entrypoint: /bin/sh
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: build-make-test
uses: docker://golang:1.19.5
uses: docker://golang:1.22.3
with:
args: -c "make test"
entrypoint: /bin/sh
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/jenkins-x-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
VERSION: ${{ steps.prep.outputs.version }}
name: release-binary
uses: docker://golang:1.19.5
uses: docker://golang:1.22.3
with:
args: -c "make release"
entrypoint: bash
Expand All @@ -31,15 +31,15 @@ jobs:
REPO_NAME: ${{ github.event.repository.name }}
VERSION: ${{ steps.prep.outputs.version }}
name: changelog
uses: docker://ghcr.io/jenkins-x/jx-changelog:0.0.43
uses: docker://ghcr.io/jenkins-x/jx-boot:3.10.150
with:
entrypoint: .github/workflows/jenkins-x/changelog.sh
- env:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
REPOSITORY: ${{ github.repository }}
VERSION: ${{ steps.prep.outputs.version }}
name: upload-binaries
uses: docker://goreleaser/goreleaser:v1.8.3
uses: docker://ghcr.io/jenkins-x/jx-goreleaser-image:0.2.2@sha256:77a7c9b281e8dba01f77d0d46c5bd9834a7bd435570f3396a03bfe63554f03f0
with:
entrypoint: .github/workflows/jenkins-x/upload-binaries.sh
- name: Set up QEMU
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
VERSION: ${{ steps.prep.outputs.version }}
XDG_CONFIG_HOME: /github/home/.config
name: promote-release
uses: docker://ghcr.io/jenkins-x/jx-updatebot:0.0.84
uses: docker://ghcr.io/jenkins-x/jx-updatebot:0.4.22
with:
entrypoint: jx-updatebot
args: pr --git-credentials
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/jenkins-x/upload-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ git push origin v$VERSION
export BRANCH=$(git rev-parse --abbrev-ref HEAD)
export BUILDDATE=$(date)
export REV=$(git rev-parse HEAD)
export GOVERSION="1.17.9"
export GOVERSION="1.22.3"
export ROOTPACKAGE="github.com/$REPOSITORY"

# Install syft in this script
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | \
sh -s -- -b /usr/local/bin v0.54.0
chmod +x /usr/local/bin/syft

goreleaser release
57 changes: 18 additions & 39 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
linters-settings:
depguard:
list-type: blacklist
packages:
- github.com/jenkins-x/jx/v2/pkg/log/
- github.com/satori/go.uuid
- github.com/pborman/uuid
packages-with-error-message:
- github.com/jenkins-x/jx/v2/pkg/log/: "use jenkins-x/jx-logging instead"
- github.com/satori/go.uuid: "use github.com/google/uuid instead"
- github.com/pborman/uuid: "use github.com/google/uuid instead"
rules:
# Name of a rule.
Main:
list-mode: lax
deny:
- pkg: github.com/jenkins-x/jx/v2/pkg/log/
desc: "use jenkins-x/jx-logging instead"
- pkg: github.com/satori/go.uuid
desc: "use github.com/google/uuid instead"
- pkg: github.com/pborman/uuid
desc: "use github.com/google/uuid instead"
dupl:
threshold: 100
exhaustive:
Expand Down Expand Up @@ -37,17 +39,14 @@ linters-settings:
gocyclo:
min-complexity: 15
goimports: {}
golint:
min-confidence: 0
revive:
confidence: 0
gofmt:
simplify: true
gomnd:
settings:
mnd:
# don't include the "operation" and "assign"
checks: [argument, case, condition, return]
mnd:
# don't include the "operation" and "assign"
checks: [argument, case, condition, return]
govet:
check-shadowing: true
settings:
printf:
funcs:
Expand All @@ -58,11 +57,8 @@ linters-settings:
- (github.com/jenkins-x/jx-logging/v3/pkg/log/Logger()).Fatalf
lll:
line-length: 140
maligned:
suggest-new: true
misspell: {}
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
Expand Down Expand Up @@ -93,26 +89,9 @@ linters:
- gocritic
- govet
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# - path: _test\.go
# linters:
# - gomnd
# https://github.com/go-critic/go-critic/issues/926
- linters:
- gocritic
text: "unnecessaryDefer:"
exclude:
- 'shadow: declaration of "err" shadows declaration at'
max-same-issues: 0

exclude-dirs:
- cmd/docs
run:
timeout: 30m
skip-dirs:
- cmd/docs
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.42.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
2 changes: 1 addition & 1 deletion Dockerfile-preview
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM ghcr.io/jenkins-x/jx-boot:3.2.199
FROM ghcr.io/jenkins-x/jx-boot:latest

COPY ./build/linux/jx-promote /usr/bin/jx-promote
Loading

0 comments on commit 6249a6b

Please sign in to comment.