{"action":"created","comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments/76694816","id":76694816,"diff_hunk":"@@ -0,0 +1,201 @@\n+$ErrorActionPreference = 'Stop'\n+$repoRoot = Join-Path $PSScriptRoot '..'\n+\n+Import-Module (Join-Path $repoRoot 'build.psm1')\n+\n+# Emulates running all of AppVeyor but locally\n+# should not be used on AppVeyor\n+function Invoke-AppVeyorFull\n+{\n+    Invoke-AppVeyorInstall\n+    Invoke-AppVeyorBuild\n+    Invoke-AppVeyorTest\n+    Invoke-AppveyorFinish\n+}\n+\n+# Implements the AppVeyor 'build_script' step\n+function Invoke-AppVeyorBuild\n+{\n+      # check to be sure our test tags are correct\n+      $result = Get-PesterTag\n+      if ( $result.Result -ne \"Pass\" ) {\n+        $result.Warnings\n+        throw \"Tags must be CI, Feature, Scenario, or Slow\"\n+      }\n+      Start-PSBuild -CrossGen -Configuration $buildConfiguration\n+      Start-PSBuild -FullCLR\n+}\n+\n+# Implements the AppVeyor 'install' step\n+function Invoke-AppVeyorInstall\n+{\n+    Start-PSBootstrap -Force\n+}\n+\n+# A wrapper to ensure that we upload test results\n+# and that if we are not able to that it does not fail\n+# the CI build\n+function Update-AppVeyorTestResults\n+{\n+    param(\n+        [string] $resultsFile\n+    )\n+\n+    if($env:Appveyor)\n+    {\n+        $retryCount = 0 \n+        $pushedResults = $false\n+        $pushedArtifacts = $false \n+        while( (!$pushedResults -or !$pushedResults) -and $retryCount -lt 3)\n+        {\n+            if($retryCount -gt 0)\n+            {\n+                Write-Verbose \"Retrying updating test artifacts...\"\n+            }\n+\n+            $retryCount++\n+            $resolvedResultsPath = (Resolve-Path $resultsFile)\n+            try {\n+                (New-Object 'System.Net.WebClient').UploadFile(\"https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)\", $resolvedResultsPath)\n+                $pushedResults = $true\n+            }\n+            catch {\n+                Write-Warning \"Pushing test result failed...\"\n+            }\n+\n+            try {\n+                Push-AppveyorArtifact $resolvedResultsPath\n+                $pushedArtifacts = $true\n+            }\n+            catch {\n+                Write-Warning \"Pushing test Artifact failed...\"\n+            }\n+        }\n+\n+        if(!$pushedResults -or !$pushedResults)\n+        {\n+            Write-Warning \"Failed to push all artifacts for $resultsFile\"\n+        }\n+    }\n+    else \n+    {\n+        Write-Warning \"Not running in appveyor, skipping upload of test results: $resultsFile\"\n+    }\n+}\n+\n+# Implement AppVeyor 'Test_script'\n+function Invoke-AppVeyorTest \n+{\n+    #\n+    # CoreCLR\n+    $env:CoreOutput = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish -Configuration $buildConfiguration))\n+    Write-Host -Foreground Green 'Run CoreCLR tests'\n+    $testResultsFile = \"$pwd\\TestsResults.xml\"\n+    if(!(Test-Path \"$env:CoreOutput\\powershell.exe\"))\n+    {\n+        throw \"CoreCL PowerShell.exe was not built\"\n+    }\n+    \n+    & (\"$env:CoreOutput\\powershell.exe\") -noprofile -noninteractive -c \"Set-ExecutionPolicy -Scope Process Unrestricted; Invoke-Pester test/powershell -Tag 'CI' -ExcludeTag 'Slow' -OutputFormat NUnitXml -OutputFile $testResultsFile\"\n+    Update-AppVeyorTestResults -resultsFile $testResultsFile\n+    \n+    #\n+    # FullCLR\n+    $env:FullOutput = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -FullCLR))\n+    Write-Host -Foreground Green 'Run FullCLR tests'\n+    $testResultsFileFullCLR = \"$pwd\\TestsResults.FullCLR.xml\"\n+    Start-DevPowerShell -FullCLR -NoNewWindow -ArgumentList '-noprofile', '-noninteractive' -Command \"Set-ExecutionPolicy -Scope Process Unrestricted; Invoke-Pester test/fullCLR -ExcludeTag 'Slow' -OutputFormat NUnitXml -OutputFile $testResultsFileFullCLR\"\n+    Update-AppVeyorTestResults -resultsFile $testResultsFileFullCLR\n+ \n+\n+    #\n+    # Fail the build, if tests failed\n+    Write-Host -Foreground Green 'Upload CoreCLR test results'\n+    $x = [xml](cat -raw $testResultsFile)\n+    if ([int]$x.'test-results'.failures -gt 0)\n+    {\n+    throw \"$($x.'test-results'.failures) tests in test/powershell failed\"\n+    }\n+\n+    Write-Host -Foreground Green 'Upload FullCLR test results'\n+    $x = [xml](cat -raw $testResultsFileFullCLR)\n+\n+    if ([int]$x.'test-results'.failures -gt 0)\n+    {\n+        throw \"$($x.'test-results'.failures) tests in test/fullCLR failed\"","path":"tools/appveyor.psm1","position":125,"original_position":125,"commit_id":"67ef752efb5f12097d16b096f10b934f72f6f7da","original_commit_id":"67ef752efb5f12097d16b096f10b934f72f6f7da","user":{"login":"TravisEz13","id":10873629,"avatar_url":"https://avatars.githubusercontent.com/u/10873629?v=3","gravatar_id":"","url":"https://api.github.com/users/TravisEz13","html_url":"https://github.com/TravisEz13","followers_url":"https://api.github.com/users/TravisEz13/followers","following_url":"https://api.github.com/users/TravisEz13/following{/other_user}","gists_url":"https://api.github.com/users/TravisEz13/gists{/gist_id}","starred_url":"https://api.github.com/users/TravisEz13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TravisEz13/subscriptions","organizations_url":"https://api.github.com/users/TravisEz13/orgs","repos_url":"https://api.github.com/users/TravisEz13/repos","events_url":"https://api.github.com/users/TravisEz13/events{/privacy}","received_events_url":"https://api.github.com/users/TravisEz13/received_events","type":"User","site_admin":false},"body":"I don't see a difference\r\n\r\n---\r\nIn reply to: [76693531](https://github.com/PowerShell/PowerShell/pull/2121#discussion_r76693531) [](ancestors = 76693531)","created_at":"2016-08-29T21:52:12Z","updated_at":"2016-08-29T21:52:12Z","html_url":"https://github.com/PowerShell/PowerShell/pull/2121#discussion_r76694816","pull_request_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2121","_links":{"self":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments/76694816"},"html":{"href":"https://github.com/PowerShell/PowerShell/pull/2121#discussion_r76694816"},"pull_request":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2121"}}},"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2121","id":83168858,"html_url":"https://github.com/PowerShell/PowerShell/pull/2121","diff_url":"https://github.com/PowerShell/PowerShell/pull/2121.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/2121.patch","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2121","number":2121,"state":"open","locked":false,"title":"Refactor PowerShell code from AppVeyor.yml to AppVeyor.psm1","user":{"login":"TravisEz13","id":10873629,"avatar_url":"https://avatars.githubusercontent.com/u/10873629?v=3","gravatar_id":"","url":"https://api.github.com/users/TravisEz13","html_url":"https://github.com/TravisEz13","followers_url":"https://api.github.com/users/TravisEz13/followers","following_url":"https://api.github.com/users/TravisEz13/following{/other_user}","gists_url":"https://api.github.com/users/TravisEz13/gists{/gist_id}","starred_url":"https://api.github.com/users/TravisEz13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TravisEz13/subscriptions","organizations_url":"https://api.github.com/users/TravisEz13/orgs","repos_url":"https://api.github.com/users/TravisEz13/repos","events_url":"https://api.github.com/users/TravisEz13/events{/privacy}","received_events_url":"https://api.github.com/users/TravisEz13/received_events","type":"User","site_admin":false},"body":"Added image requirement to appveyor.yml to make it easier to run on your own AppVeyor instance.\r\nHandle error and retry test results Push\r\n\r\nFirst step of issue #1646 \r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/powershell/powershell/2121)\r\n<!-- Reviewable:end -->\r\n","created_at":"2016-08-29T21:14:20Z","updated_at":"2016-08-29T21:52:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e04c1279964e25a94e5301e2052eb530783fe260","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2121/commits","review_comments_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2121/comments","review_comment_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2121/comments","statuses_url":"https://api.github.com/repos/PowerShell/PowerShell/statuses/67ef752efb5f12097d16b096f10b934f72f6f7da","head":{"label":"TravisEz13:AddDailyBuild","ref":"AddDailyBuild","sha":"67ef752efb5f12097d16b096f10b934f72f6f7da","user":{"login":"TravisEz13","id":10873629,"avatar_url":"https://avatars.githubusercontent.com/u/10873629?v=3","gravatar_id":"","url":"https://api.github.com/users/TravisEz13","html_url":"https://github.com/TravisEz13","followers_url":"https://api.github.com/users/TravisEz13/followers","following_url":"https://api.github.com/users/TravisEz13/following{/other_user}","gists_url":"https://api.github.com/users/TravisEz13/gists{/gist_id}","starred_url":"https://api.github.com/users/TravisEz13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TravisEz13/subscriptions","organizations_url":"https://api.github.com/users/TravisEz13/orgs","repos_url":"https://api.github.com/users/TravisEz13/repos","events_url":"https://api.github.com/users/TravisEz13/events{/privacy}","received_events_url":"https://api.github.com/users/TravisEz13/received_events","type":"User","site_admin":false},"repo":{"id":66029400,"name":"PowerShell","full_name":"TravisEz13/PowerShell","owner":{"login":"TravisEz13","id":10873629,"avatar_url":"https://avatars.githubusercontent.com/u/10873629?v=3","gravatar_id":"","url":"https://api.github.com/users/TravisEz13","html_url":"https://github.com/TravisEz13","followers_url":"https://api.github.com/users/TravisEz13/followers","following_url":"https://api.github.com/users/TravisEz13/following{/other_user}","gists_url":"https://api.github.com/users/TravisEz13/gists{/gist_id}","starred_url":"https://api.github.com/users/TravisEz13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TravisEz13/subscriptions","organizations_url":"https://api.github.com/users/TravisEz13/orgs","repos_url":"https://api.github.com/users/TravisEz13/repos","events_url":"https://api.github.com/users/TravisEz13/events{/privacy}","received_events_url":"https://api.github.com/users/TravisEz13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TravisEz13/PowerShell","description":"PowerShell for every system!","fork":true,"url":"https://api.github.com/repos/TravisEz13/PowerShell","forks_url":"https://api.github.com/repos/TravisEz13/PowerShell/forks","keys_url":"https://api.github.com/repos/TravisEz13/PowerShell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TravisEz13/PowerShell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TravisEz13/PowerShell/teams","hooks_url":"https://api.github.com/repos/TravisEz13/PowerShell/hooks","issue_events_url":"https://api.github.com/repos/TravisEz13/PowerShell/issues/events{/number}","events_url":"https://api.github.com/repos/TravisEz13/PowerShell/events","assignees_url":"https://api.github.com/repos/TravisEz13/PowerShell/assignees{/user}","branches_url":"https://api.github.com/repos/TravisEz13/PowerShell/branches{/branch}","tags_url":"https://api.github.com/repos/TravisEz13/PowerShell/tags","blobs_url":"https://api.github.com/repos/TravisEz13/PowerShell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TravisEz13/PowerShell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TravisEz13/PowerShell/git/refs{/sha}","trees_url":"https://api.github.com/repos/TravisEz13/PowerShell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TravisEz13/PowerShell/statuses/{sha}","languages_url":"https://api.github.com/repos/TravisEz13/PowerShell/languages","stargazers_url":"https://api.github.com/repos/TravisEz13/PowerShell/stargazers","contributors_url":"https://api.github.com/repos/TravisEz13/PowerShell/contributors","subscribers_url":"https://api.github.com/repos/TravisEz13/PowerShell/subscribers","subscription_url":"https://api.github.com/repos/TravisEz13/PowerShell/subscription","commits_url":"https://api.github.com/repos/TravisEz13/PowerShell/commits{/sha}","git_commits_url":"https://api.github.com/repos/TravisEz13/PowerShell/git/commits{/sha}","comments_url":"https://api.github.com/repos/TravisEz13/PowerShell/comments{/number}","issue_comment_url":"https://api.github.com/repos/TravisEz13/PowerShell/issues/comments{/number}","contents_url":"https://api.github.com/repos/TravisEz13/PowerShell/contents/{+path}","compare_url":"https://api.github.com/repos/TravisEz13/PowerShell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TravisEz13/PowerShell/merges","archive_url":"https://api.github.com/repos/TravisEz13/PowerShell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TravisEz13/PowerShell/downloads","issues_url":"https://api.github.com/repos/TravisEz13/PowerShell/issues{/number}","pulls_url":"https://api.github.com/repos/TravisEz13/PowerShell/pulls{/number}","milestones_url":"https://api.github.com/repos/TravisEz13/PowerShell/milestones{/number}","notifications_url":"https://api.github.com/repos/TravisEz13/PowerShell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TravisEz13/PowerShell/labels{/name}","releases_url":"https://api.github.com/repos/TravisEz13/PowerShell/releases{/id}","deployments_url":"https://api.github.com/repos/TravisEz13/PowerShell/deployments","created_at":"2016-08-18T20:43:34Z","updated_at":"2016-08-18T20:43:43Z","pushed_at":"2016-08-29T21:21:52Z","git_url":"git://github.com/TravisEz13/PowerShell.git","ssh_url":"git@github.com:TravisEz13/PowerShell.git","clone_url":"https://github.com/TravisEz13/PowerShell.git","svn_url":"https://github.com/TravisEz13/PowerShell","homepage":"https://microsoft.com/powershell","size":17223,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PowerShell:master","ref":"master","sha":"d59b3220321476da774f3fc52911d859c2bfc35e","user":{"login":"PowerShell","id":11524380,"avatar_url":"https://avatars.githubusercontent.com/u/11524380?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShell","html_url":"https://github.com/PowerShell","followers_url":"https://api.github.com/users/PowerShell/followers","following_url":"https://api.github.com/users/PowerShell/following{/other_user}","gists_url":"https://api.github.com/users/PowerShell/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShell/subscriptions","organizations_url":"https://api.github.com/users/PowerShell/orgs","repos_url":"https://api.github.com/users/PowerShell/repos","events_url":"https://api.github.com/users/PowerShell/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShell/received_events","type":"Organization","site_admin":false},"repo":{"id":49609581,"name":"PowerShell","full_name":"PowerShell/PowerShell","owner":{"login":"PowerShell","id":11524380,"avatar_url":"https://avatars.githubusercontent.com/u/11524380?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShell","html_url":"https://github.com/PowerShell","followers_url":"https://api.github.com/users/PowerShell/followers","following_url":"https://api.github.com/users/PowerShell/following{/other_user}","gists_url":"https://api.github.com/users/PowerShell/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShell/subscriptions","organizations_url":"https://api.github.com/users/PowerShell/orgs","repos_url":"https://api.github.com/users/PowerShell/repos","events_url":"https://api.github.com/users/PowerShell/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PowerShell/PowerShell","description":"PowerShell for every system!","fork":false,"url":"https://api.github.com/repos/PowerShell/PowerShell","forks_url":"https://api.github.com/repos/PowerShell/PowerShell/forks","keys_url":"https://api.github.com/repos/PowerShell/PowerShell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PowerShell/PowerShell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PowerShell/PowerShell/teams","hooks_url":"https://api.github.com/repos/PowerShell/PowerShell/hooks","issue_events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/events{/number}","events_url":"https://api.github.com/repos/PowerShell/PowerShell/events","assignees_url":"https://api.github.com/repos/PowerShell/PowerShell/assignees{/user}","branches_url":"https://api.github.com/repos/PowerShell/PowerShell/branches{/branch}","tags_url":"https://api.github.com/repos/PowerShell/PowerShell/tags","blobs_url":"https://api.github.com/repos/PowerShell/PowerShell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PowerShell/PowerShell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PowerShell/PowerShell/git/refs{/sha}","trees_url":"https://api.github.com/repos/PowerShell/PowerShell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PowerShell/PowerShell/statuses/{sha}","languages_url":"https://api.github.com/repos/PowerShell/PowerShell/languages","stargazers_url":"https://api.github.com/repos/PowerShell/PowerShell/stargazers","contributors_url":"https://api.github.com/repos/PowerShell/PowerShell/contributors","subscribers_url":"https://api.github.com/repos/PowerShell/PowerShell/subscribers","subscription_url":"https://api.github.com/repos/PowerShell/PowerShell/subscription","commits_url":"https://api.github.com/repos/PowerShell/PowerShell/commits{/sha}","git_commits_url":"https://api.github.com/repos/PowerShell/PowerShell/git/commits{/sha}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/comments{/number}","issue_comment_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments{/number}","contents_url":"https://api.github.com/repos/PowerShell/PowerShell/contents/{+path}","compare_url":"https://api.github.com/repos/PowerShell/PowerShell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PowerShell/PowerShell/merges","archive_url":"https://api.github.com/repos/PowerShell/PowerShell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PowerShell/PowerShell/downloads","issues_url":"https://api.github.com/repos/PowerShell/PowerShell/issues{/number}","pulls_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls{/number}","milestones_url":"https://api.github.com/repos/PowerShell/PowerShell/milestones{/number}","notifications_url":"https://api.github.com/repos/PowerShell/PowerShell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/labels{/name}","releases_url":"https://api.github.com/repos/PowerShell/PowerShell/releases{/id}","deployments_url":"https://api.github.com/repos/PowerShell/PowerShell/deployments","created_at":"2016-01-13T23:41:35Z","updated_at":"2016-08-29T20:53:19Z","pushed_at":"2016-08-29T21:41:56Z","git_url":"git://github.com/PowerShell/PowerShell.git","ssh_url":"git@github.com:PowerShell/PowerShell.git","clone_url":"https://github.com/PowerShell/PowerShell.git","svn_url":"https://github.com/PowerShell/PowerShell","homepage":"https://microsoft.com/powershell","size":23444,"stargazers_count":4752,"watchers_count":4752,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":462,"mirror_url":null,"open_issues_count":381,"forks":462,"open_issues":381,"watchers":4752,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2121"},"html":{"href":"https://github.com/PowerShell/PowerShell/pull/2121"},"issue":{"href":"https://api.github.com/repos/PowerShell/PowerShell/issues/2121"},"comments":{"href":"https://api.github.com/repos/PowerShell/PowerShell/issues/2121/comments"},"review_comments":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2121/comments"},"review_comment":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2121/commits"},"statuses":{"href":"https://api.github.com/repos/PowerShell/PowerShell/statuses/67ef752efb5f12097d16b096f10b934f72f6f7da"}}}}
{"actor":{"display_login":"TravisEz13"}}