Take a look at the end of your stackoverflow link: You can use parallel inside a script block even in a post block. Just remember that inside a script block you need to use the scripted syntax, not the descriptive syntax.
[email protected] schrieb am Mittwoch, 21. Juli 2021 um 15:54:27 UTC+2: > I am building to 2 different environments in the same pipeline and I want > to make the cleanup for both environments in parallel. > > As I understood, parallel does not work inside the post step: post step > parallel > <https://stackoverflow.com/questions/44806231/how-can-i-use-parallel-option-in-jenkins-pipeline-in-the-post-section> > . > > Any suggestions? Example of my code: > post { > always { > script{ > cleanup(env1) > cleanup(env2) > } > } > } > > def cleanup(env) > { > withEnv(env) > { > sh "./cleanup.py" > } > } > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b7b96911-0b82-4e44-8234-a2feae2dc458n%40googlegroups.com.
