Created
July 23, 2015 04:27
-
-
Save sbosell/be6b0ce6f9acbfb577e3 to your computer and use it in GitHub Desktop.
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
# This script will clone the settings from one project to another via an exported YAML | |
$apiUrl = 'https://ci.appveyor.com/api' | |
$token = '[your token]' | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
$accountName = '[account name]' | |
$projectSlug = '[project slug]' | |
$downloadLocation = 'c:\temp' | |
# Get the YAML export from project settings export. Copy and paste it works fine | |
$project = Invoke-RestMethod -Method Put -Uri "$apiUrl/projects/$accountName/$projectSlug/settings/yaml" -Headers $headers -Body "[paste your yaml export here the entire body" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment