forked from Azure/azure-webjobs-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
90 lines (78 loc) · 4.13 KB
/
appveyor.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '{build}'
pull_requests:
do_not_increment_build_number: true
branches:
only:
- dev
- master
- next
image: Visual Studio 2015
configuration: Release
platform: x86
clone_folder: c:\projects\azure-webjobs-sdk
environment:
IncludeBuildNumberInVersion: 1
install:
- ps: >-
$isPr = Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER
if (-not $isPr) {
$ctx = New-AzureStorageContext $env:FILES_ACCOUNT_NAME $env:FILES_ACCOUNT_KEY
$queue = Get-AzureStorageQueue "jenkins" -Context $ctx
$messageBody = "$env:APPVEYOR_BUILD_VERSION;$env:APPVEYOR_REPO_COMMIT;$env:IncludeBuildNumberInVersion"
$message = New-Object -TypeName Microsoft.WindowsAzure.Storage.Queue.CloudQueueMessage -ArgumentList $messageBody
$queue.CloudQueue.AddMessage($message)
"jenkins signed build: https://zenkins.redmond.corp.microsoft.com/view/Functions/job/Functions_webjobs_sdk/' build #appveyor $env:APPVEYOR_BUILD_VERSION"
"artifacts azure files: https://$env:FILES_ACCOUNT_NAME.file.core.windows.net/jenkins/builds/$env:APPVEYOR_BUILD_VERSION"
"signed build onenote: https://microsoft.sharepoint.com/teams/AzureWebjobs/_layouts/OneNote.aspx?id=%2Fteams%2FAzureWebjobs%2FSiteAssets%2FAzureWebjobs%20Notebook&wd=target%28Signed%20Sdk%20Build.one%7C0C569AE2-E052-428D-B3C1-8421ED9B1CF8%2F%29"
}
build_script:
- cmd: msbuild "WebJobs.proj" /t:BuildTestBinaries /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release;Platform=AnyCPU;OutputPath=%APPVEYOR_BUILD_FOLDER%\bin
test_script:
- cmd: "vstest.console /logger:Appveyor /TestAdapterPath:bin bin/Microsoft.Azure.WebJobs.Host.UnitTests.dll bin/Microsoft.Azure.WebJobs.Host.FunctionalTests.dll bin/Microsoft.Azure.WebJobs.ServiceBus.UnitTests.dll bin/Dashboard.UnitTests.dll \n\nvstest.console /logger:Appveyor /TestAdapterPath:bin bin/Microsoft.Azure.WebJobs.Host.EndToEndTests.dll"
artifacts:
- path: bin\Binaries\*.*
name: Binaries
on_finish:
- ps: >-
$isPr = Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER
if (-not $isPr) {
Disable-NetFirewallRule -DisplayName 'File and Printer Sharing (SMB-Out)'
net use J: \\$env:FILES_ACCOUNT_NAME.file.core.windows.net\jenkins /u:AZURE\$env:FILES_ACCOUNT_NAME $env:FILES_ACCOUNT_KEY
$timeout = new-timespan -Minutes 2
$sw = [diagnostics.stopwatch]::StartNew();
$polling = $true;
while ($sw.elapsed -lt $timeout -and $polling) {
"Polling..."
if (test-path "J:/builds/$env:APPVEYOR_BUILD_VERSION/done.txt") {
"Jenkins artifacts found"
$polling = $false;
}
Start-Sleep -Seconds 5
}
if ($polling) {
"No jenkins artifacts found, investigate job at https://zenkins.redmond.corp.microsoft.com/view/Functions/job/Functions_webjobs_sdk/"
exit(1);
}
$success = $true;
Get-ChildItem "J:/builds/$env:APPVEYOR_BUILD_VERSION/Packages" | % {
Push-AppveyorArtifact $_.FullName
}
Get-ChildItem "J:/builds/$env:APPVEYOR_BUILD_VERSION/SiteExtensions" | % {
Push-AppveyorArtifact $_.FullName
}
Get-ChildItem "J:/builds/$env:APPVEYOR_BUILD_VERSION" | % {
if (-not $_.PSIsContainer -and $_.Name -ne "done.txt") {
Push-AppveyorArtifact $_.FullName
$success = $false;
if ($_.Extension -eq ".err") {
Get-Content $_.FullName | % { Write-Output $_ }
}
}
}
"jenkins signed build: https://zenkins.redmond.corp.microsoft.com/view/Functions/job/Functions_webjobs_sdk/' build #'appveyor $env:APPVEYOR_BUILD_VERSION'"
"artifacts azure files: https://$env:FILES_ACCOUNT_NAME.file.core.windows.net/jenkins/builds/$env:APPVEYOR_BUILD_VERSION"
"signed build onenote: https://microsoft.sharepoint.com/teams/AzureWebjobs/_layouts/OneNote.aspx?id=%2Fteams%2FAzureWebjobs%2FSiteAssets%2FAzureWebjobs%20Notebook&wd=target%28Signed%20Sdk%20Build.one%7C0C569AE2-E052-428D-B3C1-8421ED9B1CF8%2F%29"
if (-not $success) {
exit(1)
}
}