This will add text to the specific job on the summary page of the classic UI. The text does not show up on the BlueOcean UI.

script {
   manager.addShortText("Some text")
   manager.addShortText("\ntext")
   manager.addShortText("same line", "black", "lightgreen", "0px", "white")
}

For the manager object to exists we need to install the Groovy Postbuild Plugin