PublishToAzureServiceBus@0 - Azure Service Bus v0 작업에 게시
이 작업을 사용하여 서비스 연결을 사용하여 Azure Service Bus에 메시지를 보냅니다(에이전트 필요 없음).
구문론
# Publish To Azure Service Bus v0
# Sends a message to azure service bus using a service connection (no agent required).
- task: PublishToAzureServiceBus@0
inputs:
azureSubscription: # string. Alias: connectedServiceName. Required. Azure service bus connection.
messageBody: '{"JobId": "$(system.jobId)", "PlanId": "$(system.planId)", "TimelineId": "$(system.timelineId)", "ProjectId": "$(system.teamProjectId)", "VstsUrl": "$(system.CollectionUri)","AuthToken": "$(system.AccessToken)"}' # string. Required. Message body. Default: {"JobId": "$(system.jobId)", "PlanId": "$(system.planId)", "TimelineId": "$(system.timelineId)", "ProjectId": "$(system.teamProjectId)", "VstsUrl": "$(system.CollectionUri)","AuthToken": "$(system.AccessToken)"}.
#waitForCompletion: false # boolean. Wait for task completion. Default: false.
입력
Azure Service Bus 연결azureSubscription
-
입력 별칭: connectedServiceName
.
string
; 필수 사항입니다.
Azure Service Bus 연결을 지정합니다.
messageBody
-
메시지 본문
string
; 필수 사항입니다. 기본값은 {"JobId": "$(system.jobId)", "PlanId": "$(system.planId)", "TimelineId": "$(system.timelineId)", "ProjectId": "$(system.teamProjectId)", "VstsUrl": "$(system.CollectionUri)","AuthToken": "$(system.AccessToken)"}
입니다.
JSON messageBody
지정합니다.
waitForCompletion
-
작업 완료 기다립니다.
boolean
; 기본값은 false
입니다.
true
설정하면 이 작업은 TaskCompleted 이벤트가 지정된 작업 시간 제한에 대해 대기합니다.
작업 제어 옵션
모든 작업에는 작업 입력 외에 제어 옵션이 있습니다. 자세한 내용은 컨트롤 옵션 및 일반적인 작업 속성참조하세요.
출력 변수
없음.
비고
릴리스 파이프라인의 에이전트 없는 작업 이 작업을 사용하여 서비스 연결을 사용하여 Azure Service Bus에 메시지를 보냅니다(에이전트를 사용하지 않고).
비고
릴리스 파이프라인의 에이전트 없는 작업만 사용할 수 있습니다.
작업 신호 완료 위치는 어디인가요?
완료를 알리기 위해 외부 서비스는 다음 파이프라인 REST 엔드포인트에 완료 데이터를 POST해야 합니다.
{planUri}/{projectId}/_apis/distributedtask/hubs/{hubName}/plans/{planId}/events?api-version=2.0-preview.1
**Request Body**
{ "name": "TaskCompleted", "taskId": "taskInstanceId", "jobId": "jobId", "result": "succeeded" }
자세한 내용은 이 간단한 cmdline 애플리케이션 참조하세요.
또한 C# 도우미 라이브러리를 사용하여 라이브 로깅을 사용하도록 설정하고 에이전트 없는 작업에 대한 작업 상태를 관리할 수 있습니다. 비동기 HTTP 에이전트 없는 작업 대해 자세히 알아봅니다.