I need to run set of code after the build is completed. I use groovy postbuild plugin(version2.2). I am new to jenkins and groovy. I tried simple println but it is not working. I tried something like this and its also not working. I dont even see error message if i make any syntax or something.
and i see this output
can anyone tell me how do i use groovy postbuild ?
Your groovy postbuild configuration and syntax look fine to me.
I assume you are experiencing this with a Build Flow type job. I can reproduce this behavior with a configuration similar to yours and I suspect that it is related to the build flow.
One solution that worked for me was to enable the
Flow run needs a workspace
checkbox in the Flow section of the job configuration and start a new build.