I'd like to run a Task (or create a new Task and run it) whom execution will trigger deployment and execution of a specified (on task level) version of the linked application. I don't find how to do, i thought that i could use the TaskBuilder.definition() method and formulate a specific definition including version number. But i'm unable to find documentation about the DSL that's consummed by the builder and if it allows to specifiy a specific application version.
More accurate, my final objective is to be able to launch different version of the same application on the same scdf server instance (in order to mutualize multiples environment on the same scdf instance, to save resources and no more run as many scdf servers as environnements).
Yes, you can do this through dataflow. First, register the versions of the application as shown here: https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#spring-cloud-dataflow-stream-lifecycle.
Note: It discusses streams but the same application registration steps are the same for streams and tasks.
Then at the time you launch your task, look for the version
property under Application Properties
on the launch page. Select the version you want to launch.
Added issue to SCDF to enhance the docs to discuss this: https://github.com/spring-cloud/spring-cloud-dataflow/issues/5464