forked from Azure/azure-functions-powershell-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
69 lines (58 loc) · 2.47 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
69 lines (58 loc) · 2.47 KB
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
67
68
69
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
#trigger:
#- master
#- dev
pool:
vmImage: 'vs2017-win2016'
variables:
Configuration: Release
buildNumber: $[ counter('build', 400) ] # Start higher than our AppVeyor versions. Every build (pr or branch) will increment.
steps:
- pwsh: ./build.ps1 -NoBuild -Bootstrap
displayName: 'Running ./build.ps1 -NoBuild -Bootstrap'
- pwsh: |
$ErrorActionPreference = "Stop"
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)"
displayName: 'Build worker code'
- pwsh: ./build.ps1 -NoBuild -Test
displayName: 'Running UnitTest'
- pwsh: ./test/E2E/Start-E2ETest.ps1
env:
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
FUNCTIONS_WORKER_RUNTIME : "powershell"
displayName: 'Running E2ETest'
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/testResults'
Contents: '*.trx'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
displayName: 'Copying test result file for artifacts'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
displayName: 'Publishing build and test result artifacts'
- pwsh: |
$sourcePath = (ls package/**/*/Microsoft.Azure.Functions.PowerShellWorker*.nupkg).FullName
if (-not (test-path $sourcePath))
{
throw 'Unable to find Microsoft.Azure.Functions.PowerShellWorker*.nupkg at ./package'
}
Copy-Item -Path $sourcePath -Destination $(Build.ArtifactStagingDirectory) -ErrorAction Stop -Verbose -Force
displayName: 'Copy package to ArtifactStagingDirectory'
- task: NuGetCommand@2
condition: and(ne(variables['Build.Reason'], 'PullRequest'), in(variables['Build.SourceBranch'], 'refs/heads/v3.x/ps7', 'refs/heads/v3.x/ps6', 'refs/heads/v2.x'))
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'e6a70c92-4128-439f-8012-382fe78d6396/c0493cce-bc63-4e11-9fc9-e7c45291f151'
allowPackageConflicts: true
displayName: 'Push NuGet package'