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>" # from https://ci.appveyor.com/api-token | |
$env:APPVEYOR_ACCOUNT_NAME = "<replace>" # from AppVeyor project URL | |
$env:APPVEYOR_PROJECT_SLUG = "<replace>" # from AppVeyor project URL | |
$env:CRONTAB_EXPRESSION = "<replace>" # e.g. "5 * * * *" | |
$headers = @{ | |
"Authorization" = "Bearer $env:API_TOKEN" | |
"Content-type" = "application/json" | |
} |
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
# use https://www.linqpad.net/lprun.aspx for C# scripting | |
install: | |
- choco install linqpad | |
- set path=C:\Program Files (x86)\LINQPad5\;%path% | |
build_script: | |
- ps: | | |
$program = @" | |
// C# script start <<<<<<<<<<<<<<<<<<<<<<<<< | |
for (int i = 0; i < 3; i++) |
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
$username = "token" | |
$password = "<VSTS_Token>" | |
$account = "<VSTS_account_name>" | |
$project = "<VSTS_project_name>" | |
$repository = "<VSTS_repository_name>" | |
$commitId = "<VSTS_commit_id >" | |
$b = [System.Text.Encoding]::ASCII.GetBytes($username + ":" + $password) | |
$p = [System.Convert]::ToBase64String($b) |
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 = "<replace>" | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
$orgs = Invoke-RestMethod -Uri "https://api.github.com/user/orgs" -Headers $headers -Method GET | |
$orgs | % {(Invoke-RestMethod -Uri "https://api.github.com/orgs/$($_.login)/teams" -Headers $headers -Method GET).name} |
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
#replace | |
$token = "" | |
$env:gh_user = "" | |
$env:gh_repo = "" | |
$env:tag_to_find = "" | |
#replace | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" |
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
#replace | |
$token = "" | |
$env:gh_user = "" | |
$env:gh_repo = "" | |
$tag_name = "" | |
$target_commitish = "" | |
$name = "" | |
$prerelease = $true/$false | |
body = "" | |
#end replace |
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="<your_api_key>" # use secure variable in case script runs from the build | |
$env:APPVEYOR_ACCOUNT_NAME="your_account_name" # no need to setup in case script runs from the build (default environment variable) | |
$env:APPVEYOR_PROJECT_SLUG="your_project_slug" # no need to setup in case script runs from the build (default environment variable) | |
$env:RECORDS_NUMBER=10 # build history depth to search | |
#!!! We assume that if build has artifacts, this file exist in artifacts list | |
$artifact_file_name = "db.zip" | |
$headers = @{ | |
"Authorization" = "Bearer $env:API_TOKEN" |
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_REPO_BRANCH -ne "master") { | |
$headers = @{ | |
"Authorization" = "Bearer $env:API_TOKEN" | |
"Content-type" = "application/json" | |
} | |
$apiURL = "https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG" | |
$s = Invoke-RestMethod -Uri "https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/settings" -Headers $headers -Method Get | |
$s.settings.nextBuildNumber = $s.settings.nextBuildNumber - 1 |
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 https://github.com/travis-ci/travis.rb#installation | |
# get API token according https://developer.travis-ci.com/authentication | |
$env:TRAVIS_API_TOKEN = "<replace>" # must be secure variable set in Environment tab or YAML section | |
$env:TimeOutMins = <replace> # how long to wait for Travis build to complete (set in Environment tab or YAML section) | |
$headers = @{ | |
"Authorization" = "token $env:TRAVIS_API_TOKEN" | |
"Travis-API-Version" = "3" | |
} |
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
PowerShell sample: | |
$token = "" # token from https://ci.appveyor.com/api-token | |
$accountName = "" # account name from project IRL (after project/") | |
$projectSlug = "" # project slug from project IRL (after account) | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} |