Skip to content

Cloud Build doesn't hydrate the BUILDPLATFORM env #2984

@bourgeoisor

Description

@bourgeoisor

Since #2589 was introduced, it broke the releasing process, though I just noticed now trying to perform a release.

The release build fails with errors like:

Step 1/14 : FROM --platform=$BUILDPLATFORM eclipse-temurin:21.0.5_11-jdk@sha256:a20cfa6afdbf57ff2c4de77ae2d0e3725a6349f1936b5ad7c3d1b06f6d1b840a AS builder
failed to parse platform : "" is an invalid component of "": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument

It looks like Cloud Build may support BuildKit but I was not successful in finding a solution to enable BuildKit via gcloud builds submit, which is what the releasing process does: https://github.com/GoogleCloudPlatform/microservices-demo/blob/main/docs/releasing/make-docker-images.sh#L43

As a temporary workaround, to be able to do the latest release (#2983) I had to git revert (and then subsequently git cherry-pick) the commit introducing BUILDPLATFORM (916eeac)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions