eachBuild.getStepRuntimes().get(failed_step)).getErrorMessage();
return a truncated message. There is any way to get the full message or to load the build log to a String?
Thank you and best regards!
- solved #6
- replies 6
- views 1385
- stars 0
groovy:
import com.pmease.quickbuild.model.Build;
import com.pmease.quickbuild.entitymanager.ConfigurationManager;
import com.pmease.quickbuild.Quickbuild;
import com.pmease.quickbuild.util.MiscUtils;
logger.warn("AAS Inicio");
for (eachBuild in system.buildManager.getAll()) {
if ((eachBuild.id.toString() == "2442631")){
logger.error(eachBuild.renderLogAsText());
}
}
logger.warn("AAS Fim");
Executing pre-execute action...
Running step...
Checking step execute condition...
Step execute condition satisfied, executing...
Executing pre-execute action...
Running step...
AAS Inicio
AAS Fim
Executing post-execute action...
Executing post-execute action...
I am running this script at a step "Misc > Execute Script" using groovy language. The build "2442631" is not the current build. It is a finished build with a specific error. It shows me some files that had the error that I will analyse. I am using this static build only for test, but after I will look for all builds with this error. For this reason that I need to parse the build log.
Hi robinshen, thanks for your help. The problem was that I wasn't running it at the server node. I change it and now it is working fine. Thank you for your support!