appveyor.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 - create a gist under the github_user (secret or not) and grab the id - https://gist.github.com/name/id
  27. # Optional, leave empty to create anonymous gist
  28. gist_id:
  29. # Chocolatey API key - to push updated packages
  30. api_key:
  31. secure: YOUR_CHOCO_API_KEY_HERE_ENCRYPTED_STRING # https://ci.appveyor.com/tools/encrypt
  32. init:
  33. - git config --global user.email "chocolatey@realdimensions.net"
  34. - git config --global user.name "Chocolatey"
  35. - git config --global core.safecrlf false
  36. install:
  37. - ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
  38. - ps: $PSVersionTable
  39. - ps: |
  40. $x=$null; $is_branch = ($Env:au_version -ne $null) -and ([version]::TryParse($Env:au_version, [ref]$x) -eq $false)
  41. if ($is_branch) {
  42. pushd ..
  43. git clone -q https://github.com/majkinetor/au.git
  44. cd au
  45. git fetch
  46. git checkout -q $Env:au_version
  47. ./build.ps1 -Install -NoChocoPackage
  48. popd
  49. } else {
  50. Install-PackageProvider -Name NuGet -Force
  51. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
  52. $params = @{ Name = 'au' }
  53. if ( $Env:au_version -ne $null ) { $params.MinimumVersion = $Env:au_version }
  54. Install-Module @params
  55. Get-Module au -ListAvailable | select Name, Version
  56. }
  57. build_script:
  58. - ps: |
  59. ./au/update_all.ps1
  60. #on_finish:
  61. #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
  62. artifacts:
  63. - path: au/update_info.xml
  64. - path: au/Update-AUPackages.md
  65. notifications:
  66. - provider: Email
  67. to: $(mail_user)
  68. on_build_success: false
  69. on_build_failure: true
  70. on_build_status_changed: true