Skip to content

Instantly share code, notes, and snippets.

@alexjebens
Last active June 1, 2017 10:45
Show Gist options
  • Save alexjebens/0f7d3007ecaab3e9c02f8bf33635052c to your computer and use it in GitHub Desktop.
Save alexjebens/0f7d3007ecaab3e9c02f8bf33635052c to your computer and use it in GitHub Desktop.
Azure Function C# Project AppVeyor yml
image: Visual Studio 2017
configuration: Release
before_build:
- cmd: nuget restore
after_build:
- cmd: 7z a myapp.zip %APPVEYOR_BUILD_FOLDER%\com.aboersch.PostProxy\bin\Release\net461\*
artifacts:
- path: myapp.zip
name: app
deploy:
- provider: WebDeploy
server: https://post-proxy.scm.azurewebsites.net:443/msdeploy.axd?site=post-proxy
website: post-proxy
username: $post-proxy
password:
secure: Y+DtdyBvdsOrb+ZKMr8bJ+xUvkTu+kmljQ0fqmSuC/r9HaeJLxn0AzN6fL8zLcgtDZ7fm0c+leNE964py9bCwQ==
remove_files: false
app_offline: false
ntlm: false
artifact: app
after_deploy:
- ps: |
$baseUrl = "https://post-proxy.azurewebsites.net/api"
$escapedTestPostUrl = [Uri]::EscapeDataString("$baseUrl/TestPost")
$testUrl = "$baseUrl/PostProxy?url=$escapedTestPostUrl&name=Test"
$webRequest = Invoke-WebRequest -Uri "$testurl"
if(!$webRequest.Content.Equals('"\"Hello Test\""'))
{
throw "Smoke Test Failed"
}
# IMPORTANT: Leave an empty line at the end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment