Skip to content

Commit 5f87121

Browse files
committed
CORS-3418: images: move installer images to static builds
The baremetal-installer/libvirt-installer images continue being dynamically built for FIPS support. For that reason it cannot reuse the existing `terraform-providers` image. All other images will be statically built.
1 parent 6372dde commit 5f87121

File tree

8 files changed

+20
-6
lines changed

8 files changed

+20
-6
lines changed

images/baremetal/Dockerfile.ci

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
# This Dockerfile is a used by CI to publish an installer image
22
# It builds an image containing openshift-install.
33

4-
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers AS providers
5-
64
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
75
ARG TAGS="libvirt baremetal"
86
WORKDIR /go/src/github.com/openshift/installer
97
COPY . .
10-
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/ terraform/bin/
118
RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
129

1310

images/infrastructure-providers/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1+
# FIPS support is offered via the baremetal-installer image
2+
13
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macbuilder
4+
ENV GO_COMPLIANCE_EXCLUDE=".*"
25
WORKDIR /go/src/github.com/openshift/installer
36
COPY . .
47
RUN CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 make -C terraform
58

69
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macarmbuilder
10+
ENV GO_COMPLIANCE_EXCLUDE=".*"
711
WORKDIR /go/src/github.com/openshift/installer
812
COPY . .
913
RUN CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 make -C terraform
1014

1115
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxbuilder
16+
ENV GO_COMPLIANCE_EXCLUDE=".*"
1217
WORKDIR /go/src/github.com/openshift/installer
1318
COPY . .
1419
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make -C terraform
1520

1621
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxarmbuilder
22+
ENV GO_COMPLIANCE_EXCLUDE=".*"
1723
WORKDIR /go/src/github.com/openshift/installer
1824
COPY . .
1925
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 make -C terraform

images/installer-altinfra/Dockerfile.ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# not be needed.
99

1010
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
11+
# FIPS support is offered via the baremetal-installer image
12+
ENV GO_COMPLIANCE_EXCLUDE=".*"
1113
ARG TAGS="altinfra"
1214
ARG OPENSHIFT_INSTALL_CLUSTER_API=""
1315
WORKDIR /go/src/github.com/openshift/installer

images/installer-artifacts/Dockerfile.rhel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,34 @@
33

44
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers AS providers
55

6+
# FIPS support is offered via the baremetal-installer image
7+
68
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macbuilder
9+
ENV GO_COMPLIANCE_EXCLUDE=".*"
710
ARG TAGS=""
811
WORKDIR /go/src/github.com/openshift/installer
912
COPY . .
1013
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/darwin_amd64 terraform/bin/darwin_amd64
1114
RUN GOOS=darwin GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
1215

1316
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macarmbuilder
17+
ENV GO_COMPLIANCE_EXCLUDE=".*"
1418
ARG TAGS=""
1519
WORKDIR /go/src/github.com/openshift/installer
1620
COPY . .
1721
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/darwin_arm64 terraform/bin/darwin_arm64
1822
RUN GOOS=darwin GOARCH=arm64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
1923

2024
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxbuilder
25+
ENV GO_COMPLIANCE_EXCLUDE=".*"
2126
ARG TAGS=""
2227
WORKDIR /go/src/github.com/openshift/installer
2328
COPY . .
2429
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/linux_amd64 terraform/bin/linux_amd64
2530
RUN GOOS=linux GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
2631

2732
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxarmbuilder
33+
ENV GO_COMPLIANCE_EXCLUDE=".*"
2834
ARG TAGS=""
2935
WORKDIR /go/src/github.com/openshift/installer
3036
COPY . .

images/installer/Dockerfile.ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers AS providers
55

66
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
7+
# FIPS support is offered via the baremetal-installer image
8+
ENV GO_COMPLIANCE_EXCLUDE=".*"
79
ARG TAGS=""
810
WORKDIR /go/src/github.com/openshift/installer
911
COPY . .

images/installer/Dockerfile.upi.ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers as providers
66

77
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
8+
# FIPS support is offered via the baremetal-installer image
9+
ENV GO_COMPLIANCE_EXCLUDE=".*"
810
ARG TAGS=""
911
WORKDIR /go/src/github.com/openshift/installer
1012
COPY . .

images/libvirt/Dockerfile.ci

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
# It builds an image containing openshift-install and nss-wrapper for remote deployments, as well as the google cloud-sdk for nested GCE environments and
33
# oc for getting assets from an existing cluster to spin up multi-architecture compute clusters on libvirt.
44

5-
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers as providers
6-
75
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
86
ARG TAGS="libvirt"
97
WORKDIR /go/src/github.com/openshift/installer
108
COPY . .
11-
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/ terraform/bin/
129
RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
1310

1411
FROM registry.ci.openshift.org/ocp/4.16:cli as cli

images/openstack/Dockerfile.ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers as providers
44

55
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
6+
# FIPS support is offered via the baremetal-installer image
7+
ENV GO_COMPLIANCE_EXCLUDE=".*"
68
ARG TAGS=""
79
WORKDIR /go/src/github.com/openshift/installer
810
COPY . .

0 commit comments

Comments
 (0)