Skip to content

Commit

Permalink
upgrade to go1.23.1
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <[email protected]>
  • Loading branch information
cpanato committed Sep 6, 2024
1 parent 5237979 commit ea12fec
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
steps:
- name: Check Signature
run: |
cosign verify ghcr.io/gythialy/golang-cross:v1.22.6-0@sha256:34ba9945085680b8966b78929e3520478ec9ea38a315fa13d8d5e0ce6355d0d2 \
cosign verify ghcr.io/gythialy/golang-cross:v1.23.1-0@sha256:08c0c74e318141737b9da97e3b110417a5d898eef617802706b725ef926497ff \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity "https://github.com/gythialy/golang-cross/.github/workflows/release-golang-cross.yml@refs/tags/v1.22.6-0"
--certificate-identity "https://github.com/gythialy/golang-cross/.github/workflows/release-golang-cross.yml@refs/tags/v1.23.1-0"
env:
TUF_ROOT: /tmp

Expand All @@ -44,7 +44,7 @@ jobs:
needs:
- check-signature
container:
image: ghcr.io/gythialy/golang-cross:v1.22.6-0@sha256:34ba9945085680b8966b78929e3520478ec9ea38a315fa13d8d5e0ce6355d0d2
image: ghcr.io/gythialy/golang-cross:v1.23.1-0@sha256:08c0c74e318141737b9da97e3b110417a5d898eef617802706b725ef926497ff

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ jobs:

- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
timeout-minutes: 10
with:
version: v1.59
version: v1.60

oidc-config:
name: oidc-config
Expand Down
47 changes: 26 additions & 21 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,36 @@

linters:
enable:
- unused
- errcheck
- gofmt
- goimports
- gosec
- gocritic
- misspell
- revive
- unused
- errcheck
- gofmt
- goimports
- gosec
- gocritic
- misspell
- revive
linters-settings:
gosec:
excludes:
- G115 # integer overflow conversion int -> uint32
- G602 # slice index out of range
output:
uniq-by-line: false
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
# the following section is due to the legacy API being deprecated
- path: pkg/server/legacy_server.go
linters:
- staticcheck
text: SA1019
- path: pkg/ca/tinkca/signer.go
linters:
- staticcheck
text: SA1019
- path: _test\.go
linters:
- errcheck
- gosec
# the following section is due to the legacy API being deprecated
- path: pkg/server/legacy_server.go
linters:
- staticcheck
text: SA1019
- path: pkg/ca/tinkca/signer.go
linters:
- staticcheck
text: SA1019
max-issues-per-linter: 0
max-same-issues: 0
run:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.22.6@sha256:2bd56f00ff47baf33e64eae7996b65846c7cb5e0a46e0a882ef179fd89654afa AS builder
FROM golang:1.23.0@sha256:613a108a4a4b1dfb6923305db791a19d088f77632317cfc3446825c54fb862cd AS builder
ENV APP_ROOT=/opt/app-root
ENV GOPATH=$APP_ROOT

Expand All @@ -28,7 +28,7 @@ RUN go build -o server main.go
RUN CGO_ENABLED=1 go build -gcflags "all=-N -l" -o server_debug main.go

# Multi-Stage production build
FROM golang:1.22.6@sha256:2bd56f00ff47baf33e64eae7996b65846c7cb5e0a46e0a882ef179fd89654afa AS deploy
FROM golang:1.23.0@sha256:613a108a4a4b1dfb6923305db791a19d088f77632317cfc3446825c54fb862cd AS deploy

# Retrieve the binary from the previous stage
COPY --from=builder /opt/app-root/src/server /usr/local/bin/fulcio-server
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ctfe_init
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.22.6@sha256:2bd56f00ff47baf33e64eae7996b65846c7cb5e0a46e0a882ef179fd89654afa AS builder
FROM golang:1.23.0@sha256:613a108a4a4b1dfb6923305db791a19d088f77632317cfc3446825c54fb862cd AS builder

WORKDIR /root/

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/sigstore/fulcio

go 1.22.6
go 1.23.1

require (
chainguard.dev/go-grpc-kit v0.17.5
Expand Down
2 changes: 1 addition & 1 deletion pkg/ca/googleca/v1/googleca.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func getPubKeyFormat(pemBytes []byte) (privatecapb.PublicKey_KeyFormat, error) {
block, _ := pem.Decode(pemBytes)
pub, err := x509.ParsePKIXPublicKey(block.Bytes)
if err != nil {
return 0, fmt.Errorf("failed to parse public key: " + err.Error())
return 0, fmt.Errorf("failed to parse public key: %w", err)
}
switch pub := pub.(type) {
case *rsa.PublicKey, *ecdsa.PublicKey:
Expand Down
8 changes: 4 additions & 4 deletions release/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ steps:
- TUF_ROOT=/tmp
args:
- 'verify'
- 'ghcr.io/gythialy/golang-cross:v1.22.6-0@sha256:34ba9945085680b8966b78929e3520478ec9ea38a315fa13d8d5e0ce6355d0d2'
- 'ghcr.io/gythialy/golang-cross:v1.23.1-0@sha256:08c0c74e318141737b9da97e3b110417a5d898eef617802706b725ef926497ff'
- '--certificate-oidc-issuer'
- "https://token.actions.githubusercontent.com"
- '--certificate-identity'
- "https://github.com/gythialy/golang-cross/.github/workflows/release-golang-cross.yml@refs/tags/v1.22.6-0"
- "https://github.com/gythialy/golang-cross/.github/workflows/release-golang-cross.yml@refs/tags/v1.23.1-0"

- name: ghcr.io/gythialy/golang-cross:v1.22.6-0@sha256:34ba9945085680b8966b78929e3520478ec9ea38a315fa13d8d5e0ce6355d0d2
- name: ghcr.io/gythialy/golang-cross:v1.23.1-0@sha256:08c0c74e318141737b9da97e3b110417a5d898eef617802706b725ef926497ff
entrypoint: /bin/sh
dir: "go/src/sigstore/fulcio"
env:
Expand All @@ -67,7 +67,7 @@ steps:
gcloud auth configure-docker \
&& make release
- name: ghcr.io/gythialy/golang-cross:v1.22.6-0@sha256:34ba9945085680b8966b78929e3520478ec9ea38a315fa13d8d5e0ce6355d0d2
- name: ghcr.io/gythialy/golang-cross:v1.23.1-0@sha256:08c0c74e318141737b9da97e3b110417a5d898eef617802706b725ef926497ff
entrypoint: 'bash'
dir: "go/src/sigstore/fulcio"
env:
Expand Down

0 comments on commit ea12fec

Please sign in to comment.