Today we are happy to announce the release of our second Azure DevOps task in the marketplace, which allows you to deploy code from the asset library into a cloud test and sandbox environment. This completes are first version of end-to-end CI/CD automation for Dynamics 365 for Finance and Operations. If you already have the extension enabled in your Azure DevOps account, the update upload task and new deploy task should be available without any action needed. Search for "LCS" when adding new tasks to your release pipeline and you will find the new Asset Deployment task. We are also actively working on official documentation on the usage and setup of the tasks, so stay tuned for that.
As outlined in our original post when we released the asset library upload task, you will need to perform some setup around Azure Active Directory to create a Dynamics Lifecycle Services (LCS) connection in Azure DevOps. If you've already performed this setup previously, you can re-use the same connection for this new task.
With this release, there are a few notes to make.
For the upload task:
- The existing upload task has remove the option to upload a database, as there were some issues around this feature that are currently unresolved. However, new asset types are now available for upload, including the much requested model and data package types.
- The existing upload task has a new parameter called Wait for Validation, which is enabled by default, which will make the task wait for validation of the asset. This is necessary for a release pipeline where the software deployable package type will be deployed after uploading - it needs to be validated before it can deployed. For situations where you're not deploying you can turn this option off.
- The upload task now has an output variable. This returns the ID (guid) of the asset in the asset library. This ID is needed to tell the deploy task which asset to deploy. Under "Output Variables" you will find the list of variables. Enter a Reference Name, for example "Upload", and you will notice the list of variables will show "Upload.FileAssetId". This means in subsequent tasks such as the deploy task, you can use $(Upload.FileAssetId) to retrieve the ID returned by the upload task.
For the new deploy task:
- You can (should) reuse the same connection setup for the upload task.
- You can use the upload task's output variable for the asset ID. If the reference name you entered in the Output Variables section of the upload task is "Upload", then use $(Upload.FileAssetId) .
- The LCS Environment Id to deploy to is the GUID identifying your environment in LCS. You can find this on the environment details page of your environment in the top section named Environment Details which lists the Environment Id.
- The deploy task also has a Wait for Completion checkbox that is turned on by default. You can decide to wait for the deployment to succeed or fail (and succeed/fail the release) or decide to trigger the deployment and end the release (the release could still fail if the deployment couldn't be started, for example if an existing servicing request will still going on). This provides some flexibility in use cases.
- LIMITATIONS: The deployment task currently only supports traditional cloud hosted environments on private or on the Microsoft subscription. It currently does not support on-premise or the newer self-service environments. This is planned for a future release.
- The task will not allow you to deploy to production environments. This is a deliberate design choice and we have no plans to remove this limitation at this point. You can deploy to any tier1 and tier2+. Deploying a software deployable package to a build environment is also blocked, which is consistent with the experience from the LCS portal itself.
- There is a known issue with a wrong error message. When trying to deploy an incompatible version to an environment (eg, a software deployable package build on a more recent platform version than the environment supports) the task will return an error that says there is already "an operation in progress" - which is the same message returned when an environment is not in a state where it can be serviced. We are working on fixing the error message in one of the upcoming updates.
We are excited about these first steps in our CI/CD story and are looking forward to your feedback.
*This post is locked for comments