Deployment with multiple artifacts

Hi,
When using a server side API to create a deployment, by using a shell coding for instance like this example:

curl -vX POST https://hosted.mender.io/api/management/v1/deployments/deployments
-H “Content-Type: application/json”
-H “Accept: application/json”
-H “Authorization: Bearer ${TOKEN}”
-d ‘{
“name”: “update files v3.35”,
“artifact_name”: “update-files-3.35”
}’

is it possible to include more than one artifacts in the code above and in what order are they executed?

Or if I write a second curl deployment bloc like the example above and specify the same deployment name but a different artifact name, will this add a second artifact (in order of execution) to the existing deployment?

Thank you

No, it’s not possible, but you can schedule three separate deployments, and they are guaranteed to be installed in the order that you created them.

If the first deployment fails, the next ones will still be executed though. If you want to avoid that, you can create a dependency on the previous Artifact when you create it with mender-artifact, using -d artifact_name:<NAME_OF_PREVIOUS_ARTIFACT>. Chain them together by making each Artifact depend on the previous one (except for the first one). With this you are guaranteed that the Artifacts will be installed in order, and won’t continue if one fails to install.

If an Artifact fails, it will roll back to the previous successful Artifact though, not all the way back to the initial one.

Thank you kacf. This tip about making them dependent on previous successfully installed artifact is going to be helpful.