griddynamics / mpl

[IT-36925] Jenkins Shared Modular Pipeline Library
https://blog.griddynamics.com/developing-a-modular-pipeline-library-to-improve-devops-collaboration/
Apache License 2.0
157 stars 97 forks source link

MPL-28 Fixed issue with stacktraces & other small fixes #29

Closed sparshev closed 5 years ago

sparshev commented 5 years ago

A couple of fixes to simplify debug & improve unit test example

fixes #28

sparshev commented 5 years ago

Possible displaying of lines will work only with not complicated module schema... For example 2 modules from different libs could have the same name and call of the overridden module will show the same line number for both modules...

Unfortunately it's quite unclear how to determine the proper file path instead of the available file name. Need additional testing.

sparshev commented 5 years ago

That's how MPL error is look like, when I added asdasd into the module logic.

new-stacktrace
sparshev commented 5 years ago

Hmmm, seems like the old logic is working correctly when the exception was threw from a pipeline step (vars/*)... Need to check the different locations of errors...

sparshev commented 5 years ago

I added additional feature - to be able to use env, props & currentConfig in the MPLPipelineConfig closure body - no more weird defaults & functions inside the pipeline.

Also finally decided to leave the old logic of the stacktrace cutting - it's quite useful sometimes to determine what's actually wrong.

sparshev commented 5 years ago

Tested on jenkins pipeline - looks good.