appveyor.yml 2.4 KB

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