Make log explorer show build errors

260 views
Skip to first unread message

Aliane Abdenour

unread,
Jul 4, 2021, 11:42:03 AM7/4/21
to Google Cloud Developers
How to show build error, since they are easily caught by the build os (stderr),
I cant find it in the new UI or the legacy one
Do I need to install an agent in the container ?
dfdg.pnglegacy.png

Fady (Google Cloud Platform)

unread,
Jul 8, 2021, 11:21:09 AM7/8/21
to Google Cloud Developers

Generally, if you would like to verify the Cloud build results, this can be viewed in the “Build History” page in the console.

If you would like the build logs to show in Cloud Logging, this might have to be configured explicitly in the build config file and per both documents [1] [2] such as if you want it Logged only in Cloud Logging you may set the LoggingMode to CLOUD_LOGGING_ONLY. 

If you meant that Logs are showing, but the “Error” severity is not properly filtered in Cloud Logging, this might be worth investigating as a defect report on issuetracker and per the instructions in this document. Going this route, please provide reproduction steps and a description on how the product should behave. This should assist us with the investigation and in notifying the proper teams.

As for the container statement it is not really clear. My understanding of Cloud build is that it will import your source code and build (produce) artifacts such as Docker containers or java archives. Hence, if you would like Cloud Logging to display Logs from the produced container, then this should be done on the deployed solution. For example, if the container is running in GKE nodes/pods, enabling Cloud Logging (Cloud operations for GKE) in the cluster should be enough (built-in solution) to parse the logs from the container level to Cloud Logging. 

I hope the above is helpful.


Aliane Abdenour

unread,
Jul 8, 2021, 11:08:54 PM7/8/21
to Google Cloud Developers
Hi,
So I must install the agent because it seems this is a blackbox monitoring, as the issue was in the script I was using with Cloud Repository (chmod mistake i did), cloud build only reports an error but no other information, I will try again with the agent installed
Best regards,
Reply all
Reply to author
Forward
0 new messages