Skip to content

Commit

Permalink
Merge pull request #10 from kubeslice/release-v1.0.6
Browse files Browse the repository at this point in the history
Release v1.0.6
  • Loading branch information
richiesebastian authored Nov 13, 2024
2 parents b3f4787 + 84d627f commit 0537b1a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
#limitations under the License.
##########################################################

FROM amd64/golang:1.22.5-alpine3.20 AS gobuilder
FROM golang:1.22.5-alpine3.20 AS gobuilder

# Install git.

# Git is required for fetching the dependencies.

RUN apk update && apk add --no-cache git make build-base

ARG TARGETPLATFORM
ARG TARGETARCH

# Set the Go source path

WORKDIR /
Expand All @@ -35,12 +38,12 @@ COPY . .

RUN go mod download &&\
go env -w GOPRIVATE=github.com/kubeslice && \
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o bin/kubeslice-gateway-edge main.go
CGO_ENABLED=1 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o bin/kubeslice-gateway-edge main.go


# Build reduced image from base alpine

FROM amd64/alpine:3.20.1
FROM alpine:3.20.1

# tc - is needed for traffic control and shaping on the sidecar. it is part of the iproute2

Expand All @@ -60,4 +63,4 @@ EXPOSE 8080

# Or could be CMD

ENTRYPOINT ["./kubeslice-gateway-edge"]
ENTRYPOINT ["./kubeslice-gateway-edge"]
15 changes: 8 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@Library('jenkins-library@opensource-helm-pipeline-release') _
dockerbuildtestPipeline(
@Library('jenkins-library@opensource-release-multiarch') _
dockerImagePipeline(
script: this,
service: 'slicegw-edge',
buildArguments: [PLATFORM:"amd64"],
run_unit_tests: 'false'

services: ['slicegw-edge'],
dockerfiles: ['Dockerfile'],
pushed: true,
buildArgumentsList: [
[ENV: 'production', PLATFORM: 'linux/arm64,linux/amd64']
]
)

0 comments on commit 0537b1a

Please sign in to comment.