Closed senn closed 1 year ago
Would it be possible for you to use the always
selector? As an example, checkout https://github.com/valtech/aem-easy-content-upgrade/blob/develop/examples-cloud/src/main/content/jcr_root/apps/aecu-scripts/aecu-examples/3_end.always.groovy
Our scenario is already using .always scripts. On deploys we execute a lot of .always scripts (in multiple locations) and we’re looking for a way to create a post script that executes after all the rest has finished (or failed).
Are scripts executed in a structured order?Alphabetical by path perhaps? On phone, can’t easily check right now. If so, we could create a ZZZZZ_post.always.groovy.
Hi @senn Yes, the scripts in a folder are sorted alphabetically, this is the code doing so: https://github.com/valtech/aem-easy-content-upgrade/blob/b6e323b61e7ef6f5a484ae85b34518fc30a7a2ff/core/src/main/java/de/valtech/aecu/core/service/AecuServiceImpl.java#L125
@senn did the naming tip worked for you?
@nhirrle Sorry for late reply... holidays 😅 I haven't tested it yet, but I have passed on the suggestion to my colleague
Closing this for now. Will re-open if needed.
Similarly to the
prechecks
mechanism, it would be handy to have apost
mechnism that is triggered after a script or after all scripts have finished.Use case: we for example want to trigger a specific service (once) after all scripts have been executed.
If there is a workaround using the current toolset, please let me know