branches: except: - live environment: op_build_user: "OpenPublishBuild" op_build_user_email: "vscopbld@microsoft.com" access_token: secure: JWSy9tPo2eoTYpPQplvokf4IiVk6onNBbWwAs6nNWWyQ2JaO+MRAg/QzbJnTjpUm access_token_vso: secure: M8RI24Z17hgtKhopSoSf+SRRc4Rj9nHWXac7O0wswHz2oYfmP7BOGvIPR3rsZeaATTfYTOHdn0W2aYimt/eHog== install: - git checkout %APPVEYOR_REPO_BRANCH% before_build: - ps: | if($env:APPVEYOR_SCHEDULED_BUILD -or ($env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL -ne $env:op_build_user_email) -or $env:APPVEYOR_FORCED_BUILD) { $env:is_ci_build_enabled=$true echo "CI build is enabled" } if($env:is_ci_build_enabled) { git config --global credential.helper store Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" Add-Content "$env:USERPROFILE\.git-credentials" "https://name:$($env:access_token_vso)@msazure.visualstudio.com`n" git config --global user.email $env:op_build_user_email git config --global user.name $env:op_build_user scripts\UpdateSrcRepo.ps1 } build_script: - ps: if($env:is_ci_build_enabled) { scripts\build.ps1 } test: assemblies: on_success: - cmd: if "%is_ci_build_enabled%" == "True" ( scripts\OnSuccess.cmd ) #on_finish: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))