appveyor.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. version: '{build}'
  2. max_jobs: 1
  3. image: WMF 5
  4. branches:
  5. only:
  6. - master
  7. #build:
  8. # verbosity: minimal
  9. environment:
  10. #Set au version to use or omit to use the latest. Specify branch name to use development version from Github
  11. au_version:
  12. au_push: true
  13. #Github token to commit pushed packages to repository
  14. github_user_repo: {github_user}/{repository}
  15. github_api_key:
  16. secure: YOUR_GITHUB_API_KEY_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
  17. #Gmail credentials - for error notifications
  18. mail_user:
  19. secure: YOUR_EMAIL_ACCOUNT_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
  20. mail_pass:
  21. secure: YOUR_EMAIL_PASSWORD_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
  22. #ID of the gist used to save run results
  23. gist_id:
  24. #Chocolatey API key - to push updated packages
  25. api_key:
  26. secure: YOUR_CHOCO_API_KEY_HERE_ENCRYPTED_STRING # https://ci.appveyor.com/tools/encrypt
  27. init:
  28. - git config --global user.email "chocolatey@realdimensions.net"
  29. - git config --global user.name "Chocolatey AU"
  30. - git config --global core.safecrlf false
  31. install:
  32. - ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
  33. - ps: $PSVersionTable
  34. - ps: |
  35. $x=$null; $is_branch = ($Env:au_version -ne $null) -and ([version]::TryParse($Env:au_version, [ref]$x) -eq $false)
  36. if ($is_branch) {
  37. pushd ..
  38. git clone -q https://github.com/majkinetor/au.git
  39. cd au
  40. git fetch
  41. git checkout -q $Env:au_version
  42. ./build.ps1 -Install -NoChocoPackage
  43. popd
  44. } else {
  45. Install-PackageProvider -Name NuGet -Force
  46. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
  47. $params = @{ Name = 'au' }
  48. if ( $Env:au_version -ne $null ) { $params.Version = $Env:au_version }
  49. Install-Module @params
  50. Get-Module au -ListAvailable | select Name, Version
  51. }
  52. build_script:
  53. - ps: |
  54. ./update_all.ps1
  55. #on_finish:
  56. #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
  57. artifacts:
  58. - path: update_info.xml
  59. - path: Update-AUPackages.md
  60. notifications:
  61. - provider: Email
  62. to: $(mail_user)
  63. on_build_success: false
  64. on_build_failure: true
  65. on_build_status_changed: true