AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.06.2019, 16:19   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
jaestevan: Release your Dynamics 365 for Finance and Operation packages to LCS with Azure DevOps Pipelines [EN]
Источник: https://www.jaestevan.com/release-yo...-pipelines-en/
==============

The first automation task to close the continuous integration cycle in Dynamics 365 for Finance and Operations with Azure DevOps pipelines was released recently as described on the official announcement.

These are some high-level instructions to set it up while the official documentation is released:


Prerequisites

To keep things simple, these prerequisites should be prepared before starting this process:


Also prepare:


  • A user with enough permissions in your LCS project (you must know the user and password). Consider using a service account whose password does not expire and not using 2FA.
  • Access to the Azure Active Directory administration of your organization, with permissions to create the API connection (this needs to be done only once), as explained on the next step.

Register an Application in AAD

In order to authorize DevOps Pipelines to connect to the new Lifecycle Services (LCS) API, an application must be created in the Azure Active Directory of the organization. Elevated permissions are required for this operation.
  • Go to portal.azure.com and search or navigate to Azure Active Directory.
  • Navigate to the menu Manage > App registrations > New application registration.
    • Provide a name for the new application.
    • Select Application Type: Native.
    • Use any value as Redirect URI (for example: http://localhost).

  • Open the newly created app and click Settings.
  • Save the Application ID value, we will need it on the next steps.
  • Navigate to Required permissions > +Add.
  • Click Select an API and search for Dynamics Lifecycle services API, then Select and Done.
  • Click Grant permissions (this is a critical step, be sure you get a “Successfully granted permissions for application XXX” message or integration will not work).


More information about registering applications in AAD here:
And about permission consent here:

Create the Azure Release Pipeline

A release pipelines will be used to connect the Build output with the Asset Library in LCS. New build packages will be uploaded to LCS automatically through this pipeline.
  • Login to your organization’s Azure DevOps project and navigate to Pipelines > Releases.
  • Click New release pipeline (this is the only option if you don’t have any pipeline already created).
  • Select a template: Empty job.
  • Click on Artifacts > +Add an artifact (this will connect this release pipeline with our Build).

  • Select Build as Source type, and select your Project, Source and Default version (use Latest if this release will be executed automatically) and finally click Add.
  • If you want this release is executed immediately after the build finish (so the build output is uploaded to LCS each time) enable the Continuous Integration flag by using the small icon highlighted in blue in the next screenshot (C.I.).
  • Click on the Stage 1 or Tasks links o open the details.
  • Select the Agent job node and validate that Agent pool parameter is set to Hosted VS2017.
  • Click the [+] button on the Agent Job node.
  • Search for the Dynamics Lifecycle Services (LCS) Asset Upload task (it should be already installed or can be installed at this point, click Refresh if the task does not appear in the list) and finally click Add to add the task to the pipeline.

  • Fill these properties on the newly created Task:
    • LCS Connection: Select a connection or click [+New] if this is the first time
      • Connection name: use a descriptive name (in case you have multiple LCS projects).
      • Authentication Endpoint: let the default value
      • Lifecycle Services API Endpoint:
      • Username and Password: use the credentials (fully qualified user name and password) from a user with enough permissions to upload files to your LCS project
      • Application (Client) ID: use the guid of the Application created in AAD on the first step.
  • LCS Project Id: this is the numeric value included in your LCS project URL
  • Type of asset: Software Deployable Package
  • File to upload: click the […] button to select the AXDeployableRuntime_XXX_YYY file in the Packages folder of your Build artifacts.
    • This is the default configuration, you might want to select a different file if your build definition is customized, but it should be a deployable package and its name should include the build number.
    • Back in the Pipeline properties, replace the build number with the variable
      $(Build.BuildNumber)
      • Example, for the filename: $(System.DefaultWorkingDirectory)/_ Unified Operations platform – Build Main/Packages/AXDeployableRuntime_7.0.5126.35370_ 2019.1.29.1.zip
      • Use the property value: $(System.DefaultWorkingDirectory)/_ Unified Operations platform – Build Main/Packages/AXDeployableRuntime_7.0.5126.35370_$(Build.BuildNumber).zip
  • LCS Asset Name and LCS Asset Description: Use descriptive values to identify this package when uploaded to the LCS Asset Library.
    More information about Azure Pipeline variables on the docs
    here for the build
    and
    here for the release
    .
    • For example: $(Release.ReleaseName)_$(Build.BuildNumber)




Done! now what?

To test that the newly created release work, use the Create a release button to create a new release manually:



And, hopefully, results will look like that (otherwise check the logs to understand what’s happening, most common error so far is authentication with the AAD app):



And you should have a new file in the Software deployable package folder of the LCS Asset Library.



To get more information about this release and the setup process check the official announcement here and this blog post.

Hope these instructions are useful to understand how to setup this first automation task, that hopefully won’t be the last one. Check the documentation for upcoming changes regarding Developer tools and application lifecycle management.


This article was first published at “Dynamics AX in the Field”, the blog from the Premier Field Engineering team at Microsoft.





Источник: https://www.jaestevan.com/release-yo...-pipelines-en/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axinthefield: Release your Dynamics 365 for Finance and Operation packages to LCS with Azure DevOps Pipelines Blog bot DAX Blogs 0 10.02.2019 00:19
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 17 Blog bot Dynamics CRM: Blogs 0 10.05.2014 06:30
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 13 Blog bot Dynamics CRM: Blogs 0 27.03.2013 22:12
Platform updates overview - 3.70.B - NAV2009 R2 Blog bot Dynamics CRM: Blogs 0 07.02.2011 22:06

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 19:27.