Skip to content

Instantly share code, notes, and snippets.

@sbosell
Created July 23, 2015 04:27
Show Gist options
  • Save sbosell/be6b0ce6f9acbfb577e3 to your computer and use it in GitHub Desktop.
Save sbosell/be6b0ce6f9acbfb577e3 to your computer and use it in GitHub Desktop.
# 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