dev-resources.site
for different kinds of informations.
[Cloud Build] Failed to trigger build: generic::invalid_argument: invalid build: invalid image name
Published at
8/11/2022
Categories
googlecloud
cloudbuild
Author
ku6ryo
Author
6 person written this
ku6ryo
open
TL;DR If you see the error message in this article title when you run Cloud Build trigger, the Docker image name is too long to handle for GCP.
Details
The default inline cloudbuild.yaml
which is auto-generated when we create Cloud Run service, defines docker image names as like the following.
$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
However, the image name can be so long like
asia.gcr.io/your-long-project-id/repository-name/service-name:87caefacca50d6d64288732070b522a92690dde0
Seems like GCP has the limit for handling Docker image name and it is 100 characters at max. So, if the default definition does not work for your case, you can remove an element from the template like $REPO_NAME
. If the Docker image name gets shorter than 100, the build pipeline should work.
Hope this shorten your debug time !
cloudbuild Article's
17 articles in total
Pushing Python Packages to Artifact Registry Using Cloud Build
read article
How to Create a Cloud Build to Allow Docker to Download Python Packages from Artifact Registry
read article
Multiple Cloud Build Triggers in One Github Repo
read article
Cloud Build Setup with Private Github Repos and Submodules
read article
Codegolf: Build a container in Cloud Build
read article
[Cloud Build] Failed to trigger build: generic::invalid_argument: invalid build: invalid image name
currently reading
Automating multi-arch container images builds (we used Google Cloud Build but GitHub Actions would also work)
read article
Granting Access to Cloud Build - Predefined Roles
read article
Granting Access to Cloud Build - Impersonating a Service Account
read article
Granting Access to Cloud Build - Custom Roles
read article
Granting Access to Cloud Build - Intro
read article
Automated deployments for GCP Cloud Functions
read article
Improving Cloud Build pipeline with dependencies cache on Cloud Storage
read article
Continuous Deployment on Firebase using Cloud Build
read article
Continuous Deployment pipeline with Cloud Build on Cloud Run
read article
Cloudbuild with Android - Using Encrypted Environment Variables
read article
Cloud Build Dependency Graph
read article
Featured ones: