How to use an Azure Devops Release task to execute a Azure Pipeline

Hey guys please I have a Azure Devops Pipeline configured. I need to create a Azure DevOps Release to run this pipeline… which kind of task should I choose from the list?

I’ve created a Azure DevOps Release but I cannot find the appropriate task to link to my existing Pipeline

0

In the release pipeline, you can use the Invoke REST API task to call the REST API “Runs – Run Pipeline” to trigger a YAML pipeline or classic build pipeline.

  1. Go to Project Settings > Service connections to create a Generic service connection.

    • Server URL: The prefix of the REST API URI. You can set it as “https://dev.azure.com/{organization}“. Replace {organization} with the actual name of your Azure DevOps organization.

    • Service connection name: Enter a custom name of the service connection.

  2. Go the release pipeline, add the following things.

    • Add an Agentless job. You can set condition on this job so that the job can run only when the condition is met.

    • Add an Invoke REST API task in the Agentless job.

  3. On the Invoke REST API task, set the following configurations.

    • Display name: You can set a custom name of the step.

    • Connection type: Generic

    • Generic service connection: The name of the Generic service connection created previously.

    • Method: POST

    • Headers: A JSON content to set the request headers of the API call.

      {
      "Content-Type":"application/json", 
      "Authorization": "Bearer $(system.AccessToken)"
      }
      
    • Body: A JSON content to set the Request Body of the API call. For example.

      // Overwrite the default values of a parameter and a pipeline variable when triggering the pipeline.
      
      {
          "variables": {
              "myVar02": {
                  "value": "4444"
              }
          },
          "templateParameters": {
              "myPara01": "1111"
          }
      }
      
    • URL suffix and parameters: The suffix of the REST API URI. It will combine with the prefix set in the service connection to get the full REST API URI. You can set it as “/{project}/_apis/pipelines/{pipelineId}/runs?api-version=7.0“. Replace {project} and {pipelineId} with you actual values.

With this method, you do not need an agent jobs to trigger the pipeline. So, do not need to wait an available agent in your Azure DevOps organization. The Agentless job can run more quickly than the agent job.


1

Few options:

  • Install a free marketplace extension Trigger Azure DevOps Pipeline

  • Add a script task and use the Azure DevOps REST API to trigger your pipeline.

1

Just a suggestion, not sure if they need to be seperate as I am more leaning towards using yaml templates for everything (combining both your CI and CD into a single yaml can be done).

As well as bryanbcook said, there are third party marketplace extensions that do that.

You can also use REST calls from Azure DevOps and write a small powershell script (or any language) to create a release. I believe this may be the call (assuming Azure DevOps Services) to create a new release.

https://learn.microsoft.com/en-us/rest/api/azure/devops/release/releases/create?view=azure-devops-rest-7.1&tabs=HTTP

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật