forked from Azure/azure-functions-core-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
66 lines (61 loc) · 1.93 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: $(Build.SourceBranchName)_$(Build.Reason)_$(devops_buildNumber)
pr:
branches:
include:
- master
- dev
trigger:
branches:
include:
- dev
- master
pool:
vmImage: 'vs2017-win2016'
variables:
devops_buildNumber: $[counter(format(''), 1500)]
APPVEYOR_REPO_BRANCH: $[coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranchName'])]
APPVEYOR_REPO_COMMIT: $(Build.SourceVersion)
steps:
- pwsh: |
Write-Host "Target branch: '$(APPVEYOR_REPO_BRANCH)'"
- task: NodeTool@0
inputs:
versionSpec: '10.x'
- task: NuGetToolInstaller@1
inputs:
versionSpec:
- task: AzureCLI@2
displayName: Login via Azure CLI to acquire access token
inputs:
azureSubscription: $(E2ETestServiceConnectionName)
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
# acquire access token from Azure CLI and export it to AZURE_MANAGEMENT_ACCESS_TOKEN
$accessToken = (az account get-access-token --query "accessToken" | % { $_.Trim('"') })
echo "##vso[task.setvariable variable=azure_management_access_token]$accessToken"
- pwsh: |
.\build.ps1
env:
AzureBlobSigningConnectionString: $(AzureBlobSigningConnectionString)
BuildArtifactsStorage: $(BuildArtifactsStorage)
DURABLE_STORAGE_CONNECTION: $(DURABLE_STORAGE_CONNECTION)
TELEMETRY_INSTRUMENTATION_KEY: $(TELEMETRY_INSTRUMENTATION_KEY)
displayName: 'Executing build script'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/*.trx'
failTaskOnFailedTests: true
condition: succeededOrFailed()
- task: CopyFiles@2
inputs:
SourceFolder: '$(Build.Repository.LocalPath)\artifacts'
Contents: 'Azure.Functions.Cli.*'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'