View StartBuildSpecificCommit.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$token = '<API_Token>' | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
$body = @{ | |
accountName="<Your_account>" | |
projectSlug="<Your_project_slug>" |
View InstallVs2010_Shell.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -eq "Microsoft Visual Studio 2010 Shell (Isolated) - ENU"}) -ne $null) | |
{ | |
Write-Host "Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package already installed." | |
} | |
else | |
{ | |
Measure-command { | |
Write-Host "Downloading Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package..." | |
$exePath = "$($env:USERPROFILE)\VSIsoShell.exe" | |
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/1/9/3/1939AD78-F8E8-4336-83F3-E2470F422C62/VSIsoShell.exe', $exePath) |
View clone-environment.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$token = '<API_TOKEN>' | |
$sourceEnvironmentName = '<SOURCE_ENVIRONMENT_NAME>' | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
# get source environment ID | |
$sourceEnvironmentId = ((Invoke-RestMethod -Uri "https://ci.appveyor.com/api/environments" -Headers $headers -Method Get) | where {$_.name -eq $sourceEnvironmentName}).deploymentEnvironmentId |
View google-storage-upload.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Preparation steps: | |
# On local machine (or you can use https://www.appveyor.com/docs/how-to/rdp-to-build-worker/ instead): | |
# Install https://pub.storage.googleapis.com/gsutil.zip | |
# Run gsutil config and complete authentication and configuration | |
# Check that "$env:USERPROFILE\.boto" created | |
# Optionally cleanup "$env:USERPROFILE\.boto" (remove comments) and add some additional configuration if needed | |
# Encode .boto file as a Base64 string (PowerShell sample): | |
# $bytes = [System.IO.File]::ReadAllBytes("$env:USERPROFILE\.boto") | |
# [System.Convert]::ToBase64String($bytes) | |
# Encrypt result with https://ci.appveyor.com/tools/encrypt |
View clone-project.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$token = '<API_TOKEN>' # account-level API token | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
# create new project | |
$body = @{ | |
repositoryProvider="gitHub" | |
repositoryName="<githib_user_name>/<github_repo_name>" |
View resharper-clt.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install: | |
- cmd: choco install resharper-clt | |
after_build: | |
- cmd: InspectCode.exe -o=resharper-clt-output.xml src\ProjectA.sln | |
- ps: $result = [xml](Get-Content .\resharper-clt-output.xml) | |
- ps: $result.Report.Issues.ChildNodes | ForEach-Object {$project = $_.Name; $_.ChildNodes | ForEach-Object {Add-AppveyorCompilationMessage -Message $_.Message -Line $_.Line -FileName $_.File -ProjectName $project}} |
View TestSlackNotification.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$token = "<clear_text_api_token>" | |
$Channel = "<channel>" | |
$Message = "test from ps" | |
$body = @{ | |
token = $token | |
channel = $Channel | |
text = $Message | |
} | |
View FirstJobWaitForOthers.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($env:APPVEYOR_JOB_NUMBER -ne 1) {return} | |
write-host "Waiting for other jobs to complete" | |
$headers = @{ | |
"Authorization" = "Bearer $ApiKey" | |
"Content-type" = "application/json" | |
} | |
[datetime]$stop = ([datetime]::Now).AddMinutes($env:TimeOutMins) |
View BulkCancelDeleteQueuedBuilds.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$env:API_TOKEN="<replace>" # https://ci.appveyor.com/api-keys | |
$env:APPVEYOR_ACCOUNT_NAME="<replace>" # from AppVeyor URL (after "project/") | |
$env:APPVEYOR_PROJECT_SLUG="<replace>" # from AppVeyor URL (after account name) | |
$env:recordsNumber = 20 | |
$headers = @{ | |
"Authorization" = "Bearer $env:API_TOKEN" | |
"Content-type" = "application/json" | |
} |
NewerOlder