forked from MicrosoftPremier/cwiTest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
44 lines (38 loc) · 1.08 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
trigger:
branches:
include:
- 'master'
tags:
include:
- '*'
pr:
branches:
include:
- 'master'
pool:
name: 'ReneSchu'
variables:
System.Debug: true
HTTP_PROXY: 'http://localhost:8888'
HTTPS_PROXY: 'http://localhost:8888'
NODE_TLS_REJECT_UNAUTHORIZED: '0'
steps:
- checkout: self
persistCredentials: true
- pwsh: if ((Get-Content ./file.txt) -contains "fail") { Write-Host "##vso[task.complete result=Failed;]Fail build" } else { Write-Host "Build will succeed" }
displayName: Fail build if needed
workingDirectory: $(build.sourcesDirectory)
- task: CreateWorkItem@1
displayName: 'Create a new work item if build fails'
condition: failed()
inputs:
workItemType: 'Task'
title: 'Platform Build Failure New Stack'
fieldMappings: |
Description=This item was automatically created by Azure Pipeline. Failed build is linked to this task.
associate: true
linkWorkItems: true
linkType: 'System.LinkTypes.Hierarchy-Reverse'
linkTarget: 'id'
targetId: '1735'
authToken: '$(AuthToken)'