Skip to content

Commit 540876a

Browse files
stuggiclaude
andcommitted
Remove go.work before container build
The go.work file is generated by the CI environment which may have a higher Go version than the build image (go-toolset). This causes build failures when go.work references a Go version that the build image does not provide. Since the Dockerfile builds a single module, go.work is not needed and can be safely removed before building. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent de19661 commit 540876a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ WORKDIR $REMOTE_SOURCE_DIR/$REMOTE_SOURCE_SUBDIR
2222
USER root
2323
RUN mkdir -p ${DEST_ROOT}/usr/local/bin/
2424

25+
# Remove go.work - not needed for the build and may reference a Go version
26+
# from the CI environment that is higher than the build image provides
27+
RUN rm -f go.work go.work.sum
28+
2529
# cache deps before building and copying source so that we don't need to re-download as much
2630
# and so that source changes don't invalidate our downloaded layer
2731
RUN if [ ! -f $CACHITO_ENV_FILE ]; then go mod download ; fi

config/operator/manager_operator_images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
- name: RELATED_IMAGE_DESIGNATE_OPERATOR_MANAGER_IMAGE_URL
2121
value: quay.io/openstack-k8s-operators/designate-operator@sha256:ef6e455e925ef06fbd12062c577193f25067ef80d128fc958613ed378a1f3563
2222
- name: RELATED_IMAGE_GLANCE_OPERATOR_MANAGER_IMAGE_URL
23-
value: quay.io/openstack-k8s-operators/glance-operator:v0.0.1
23+
value: quay.io/openstack-k8s-operators/glance-operator@sha256:73b39f9ed0920ae594f493d8c5c9e03a5f4b76e3c592c0854a9abdbd7e2813ed
2424
- name: RELATED_IMAGE_HEAT_OPERATOR_MANAGER_IMAGE_URL
2525
value: quay.io/openstack-k8s-operators/heat-operator@sha256:4e9f35bbd71d8477929c20643303737ccfb8542cd8d92b764d01595051df520f
2626
- name: RELATED_IMAGE_HORIZON_OPERATOR_MANAGER_IMAGE_URL

hack/export_operator_related_images.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
export RELATED_IMAGE_BARBICAN_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/barbican-operator@sha256:9e31729c86468d77817369acfb447b54f41ead34f44e035def53636504de1eeb
44
export RELATED_IMAGE_CINDER_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/cinder-operator@sha256:f34e57a702ca9750f51a0785856eae922442c121b04228d646dad95e4e663e05
55
export RELATED_IMAGE_DESIGNATE_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/designate-operator@sha256:ef6e455e925ef06fbd12062c577193f25067ef80d128fc958613ed378a1f3563
6-
export RELATED_IMAGE_GLANCE_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/glance-operator:v0.0.1
6+
export RELATED_IMAGE_GLANCE_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/glance-operator@sha256:73b39f9ed0920ae594f493d8c5c9e03a5f4b76e3c592c0854a9abdbd7e2813ed
77
export RELATED_IMAGE_HEAT_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/heat-operator@sha256:4e9f35bbd71d8477929c20643303737ccfb8542cd8d92b764d01595051df520f
88
export RELATED_IMAGE_HORIZON_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/horizon-operator@sha256:3e7876e1cfc1575e1a17ce06cb20a4d0fa182e4e57721a60f575ede3b59acd5d
99
export RELATED_IMAGE_INFRA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/infra-operator@sha256:f58cdc6f0e9457f3cb5f80eb667f290f04d8576b2839cba6845b82b529c88bc9

0 commit comments

Comments
 (0)