Currently the tunnels for BrowserStack, LambdaTest, and SauceLabs are implemented using tasks, adding a dependsOn the tunnel opening task and a finalizedBy the tunnel closing task.
This has various drawbacks though, the most prominent one, that the tunnel is always opened, even if the actual task that needs it is up-to-date, skipped, or taking its result from the build cache.
The tunnels should instead be implemented as shared build services, as things like this are one of the main use-cases for shared build services.
With that, the tunnels will only be established when actually necessary and there is no need for the ramp-up and tear-down tasks