Scenario

Building a Source Code Based or a Docker Project based container fails with the error "BUILD_ARTIFACT :  failed on executing prebuild/build script". This error happens if the pre-build or build script execution failed. 

Solution

In order to debug the failure, you can add some instrumentation or run the commands in verbose mode.
For example, you can pre-build and build scripts as below:

set -x
go build main.go


Rebuild the container again and you find additional build logs in the Build Logs section.

Did this answer your question?