Skip to content

Commit

Permalink
Merge pull request #16 from kubescape/fixarm
Browse files Browse the repository at this point in the history
fix arm64 build, bump go 1.22
  • Loading branch information
matthyx committed Jun 24, 2024
2 parents eeba767 + 864083e commit 19f44f1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr-created.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- 'main'
paths-ignore:
- '*.md'
- '*.md'
- '*.yaml'
- '.github/workflows/*'

Expand All @@ -20,6 +20,6 @@ jobs:
security-events: write
uses: kubescape/workflows/.github/workflows/incluster-comp-pr-created.yaml@main
with:
GO_VERSION: "1.21"
GO_VERSION: "1.22"
CGO_ENABLED: 0
secrets: inherit
secrets: inherit
8 changes: 4 additions & 4 deletions .github/workflows/pr-merged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: pr-merged
on:
pull_request_target:
types: [closed]
branches:
branches:
- 'main'
paths-ignore:
- '**.md' ### Ignore running when README.MD changed.
- '**.yaml' ### Ignore running when YAML files changed.
- '.github/workflows/*' ### Ignore running when files under path: .github/workflows/* changed.

jobs:
pr-merged:
if: ${{ github.event.pull_request.merged == true }}
Expand All @@ -25,8 +25,8 @@ jobs:
CGO_ENABLED: 0
GO111MODULE: "on"
BUILD_PLATFORM: linux/amd64,linux/arm64
GO_VERSION: "1.21"
GO_VERSION: "1.22"
REQUIRED_TESTS: '[]'
COSIGN: true
HELM_E2E_TEST: true
secrets: inherit
secrets: inherit
19 changes: 10 additions & 9 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM --platform=$BUILDPLATFORM golang:1.21-bullseye as builder
FROM --platform=$BUILDPLATFORM golang:1.22-bullseye as builder

ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOPROXY=https://proxy.golang.org,direct

# Set the working directory inside the container
ENV GO111MODULE=on CGO_ENABLED=0
WORKDIR /work
ARG TARGETOS TARGETARCH

RUN --mount=target=. \
--mount=type=cache,target=/root/.cache/go-build \
Expand All @@ -14,8 +11,12 @@ RUN --mount=target=. \

FROM gcr.io/distroless/static-debian11:nonroot

# Copy the Pre-built binary file from the previous stage
USER nonroot
WORKDIR /home/nonroot/

COPY --from=builder /out/prometheus-exporter /usr/bin/prometheus-exporter

# Entry Point
ENTRYPOINT [ "prometheus-exporter" ]
ARG image_version
ENV RELEASE=$image_version

ENTRYPOINT ["prometheus-exporter"]
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/kubescape/prometheus-exporter

go 1.21.3
go 1.22.4

require (
github.com/kubescape/go-logger v0.0.22
Expand Down

0 comments on commit 19f44f1

Please sign in to comment.