skip to Main Content

Setting IAM policy
Completed
Creating revision
Completed
Routing traffic
Completed
Creating Cloud Build trigger
Completed
Building and deploying from repository
Trigger execution failed: source code could not be built or deployed, no logs are found.

I am new in GCP and learning by myself. I am trying to connect my git project to cloud run which is successfully connected. I am trying to deploy on cloud run and getting error source code could not be built or deployed, no logs are found. I checked git and make sure have proper access, checked Dockerfile which contains all necessary information. I am not understanding what is causing this error. there is nothing in log error which say what is causing the error
Can anyone help me to understand this error

2

Answers


  1. There are a few possible reasons why you might be getting this error:

    • The Cloud Build service account does not have the necessary permissions to access your source code repository.
    • The Dockerfile in your repository is invalid or contains errors.
    • The build step in your Cloud Build configuration is not correctly configured.

    To troubleshoot this issue, you can try the following:

    • Verify that the Cloud Build service account has the Source Code Viewer role on your repository.
    • Validate your Dockerfile using the docker build command.
    • Check the logs for your Cloud Build build to see if there are any errors.

    If you are still unable to resolve the issue, you can create a support ticket with Google Cloud.

    Here are some additional tips for troubleshooting Cloud Build errors:

    • Make sure that your Cloud Build configuration is correct. For example, if you are using a gcr.io image, you must make sure that the _IMAGE substitution variable is set correctly.
    • If you are using a Cloud Build trigger, make sure that the trigger is configured correctly. For example, if you are using a push trigger, you must make sure that the branch and repo fields are set correctly.
    • If you are using a Cloud Build substitution variable, make sure that the variable is defined correctly. For example, if you are using the _PROJECT_ID substitution variable, you must make sure that the projectId field is set correctly in your Cloud Build configuration.

    I hope this helps! Let me know if you have any other questions.

    Login or Signup to reply.
  2. You need to enable Identity and Access Management (IAM) API for your project:
    https://console.cloud.google.com/apis/library/iam.googleapis.com

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search