Skip to content

Commit

Permalink
Test Konflux pipeline to Multi-arch
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan-biswas committed Nov 4, 2024
1 parent 59c663a commit a4c3958
Show file tree
Hide file tree
Showing 5 changed files with 3,843 additions and 1,761 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
!go.mod
!go.sum
!LICENSE
!/cmd
!/pkg
!/vendor
!/version
24 changes: 4 additions & 20 deletions .konflux/git-cloner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
# --- start build stage #1
FROM registry.access.redhat.com/ubi9/go-toolset:1.21.11-7@sha256:d128c3d36878251f039606f144ef2608746c3203708b722295e6c571df1d8613 AS builder
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:97e30a01caeece72ee967013e7c7af777ea4ee93840681ddcfe38a87eb4c084a AS builder

# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY . .

# This are vendors dependencies. Copy this layer first to take advantage of cache hits.
COPY vendor/ vendor/
RUN CGO_ENABLED=0 GO111MODULE=on go build -a -mod=vendor -ldflags="-s -w" -o openshift-builds-git-cloner ./cmd/git

# Copy the go source
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY version/ version/

RUN go version

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -mod=vendor -ldflags="-s -w" -o openshift-builds-git-cloner ./cmd/git

# --- start build stage #2
# RPM dependencies can't be fetched hermetically with Cachi2
# Using UBI 9 which already includes necessary tar package
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4@sha256:73f7dcacb460dad137a58f24668470a5a2e47378838a0190eef0ab532c6e8998
FROM registry.access.redhat.com/ubi9-minimal@sha256:c0e70387664f30cd9cf2795b547e4a9a51002c44a4a86aa9335ab030134bf392

RUN \
microdnf --assumeyes --nodocs install git git-lfs && \
Expand Down
Loading

0 comments on commit a4c3958

Please sign in to comment.