Skip to content

Commit

Permalink
Merge pull request #44 from kubeslice/release-v0.2.2
Browse files Browse the repository at this point in the history
Release v0.2.2
  • Loading branch information
richiesebastian authored Nov 13, 2024
2 parents 2a9934f + 4acdee8 commit a5563cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@
#limitations under the License.
##########################################################

ARG PLATFORM
FROM golang:1.22.5 as gobuilder

ARG TARGETPLATFORM
ARG TARGETARCH

# Set the Go source path
WORKDIR /kubeslice/kubeslice-netops/
COPY go.mod go.sum ./
ADD vendor vendor
COPY . .
# Build the binary.esah
RUN go env -w GOPRIVATE=github.com/kubeslice && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -a -o bin/kubeslice-netops main.go
CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -mod=vendor -a -o bin/kubeslice-netops main.go

# Build reduced image from base alpine
FROM ${PLATFORM}/alpine:3.20
FROM alpine:3.20

# Add the necessary pakages:
# tc - is needed for traffic control and shaping on the kubeslice-netops. it is part of the iproute2
Expand Down
14 changes: 9 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
@Library('jenkins-library@opensource-release') _
@Library('jenkins-library@opensource-release-multiarch') _
dockerImagePipeline(
script: this,
service: 'netops',
dockerfile: 'Dockerfile',
buildContext: '.',
buildArguments: [PLATFORM:"amd64"]
services: ['netops'],
dockerfiles: ['Dockerfile'],
pushed: true,
buildArgumentsList: [
[ENV: 'production', PLATFORM: 'linux/arm64,linux/amd64']
]

)

0 comments on commit a5563cc

Please sign in to comment.