appveyor.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. # au job parameters
  12. au_timeout: 100
  13. au_threads: 10
  14. au_push: true
  15. au_force: false
  16. # Github credentials - used to save result to gist and to commit pushed packages to the git repository
  17. github_user: YOUR_USER_NAME_HERE
  18. github_pass:
  19. secure: YOUR_PASSWORD_OR_2FA_AUTH_TOKEN_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
  20. github_user_repo: 'YOUR_REPO_USERNAME/YOUR_REPO_REPOSITORY_NAME' #https://github.com/chocolatey/chocolatey-packages-template is 'chocolatey/chocolatey-packages-template'
  21. # Email credentials - for error notifications
  22. mail_user: YOUR_EMAIL_ACCOUNT
  23. mail_pass:
  24. secure: YOUR_EMAIL_PASSWORD_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
  25. mail_server: smtp.gmail.com
  26. mail_port: 587
  27. mail_enablessl: true
  28. # 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
  29. gist_id: YOUR_GIST_ID_CREATE_GIST_SAVE_ID_HERE
  30. # Chocolatey API key - to push updated packages
  31. api_key:
  32. secure: YOUR_CHOCO_API_KEY_HERE_ENCRYPTED_STRING # https://ci.appveyor.com/tools/encrypt
  33. init:
  34. - git config --global user.email "chocolatey@realdimensions.net"
  35. - git config --global user.name "Chocolatey"
  36. install:
  37. - ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
  38. - ps: $PSVersionTable
  39. - SET PATH=C:\Ruby21-x64\bin;%PATH%
  40. - ruby -v
  41. - gem install gist --no-ri --no-rdoc
  42. - "ruby -e \"require 'gist'; Gist.login! username: ENV['github_user'], password: ENV['github_pass'] if ENV['github_user'] \""
  43. - ps: |
  44. "machine github.com", "login $Env:github_user", "password $Env:github_pass" | Out-File ~/_netrc -Encoding ascii
  45. Install-PackageProvider -Name NuGet -Force
  46. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
  47. Install-Module au -Scope CurrentUser
  48. Get-Module au -ListAvailable | select Name, Version
  49. build_script:
  50. - ps: |
  51. if ($Env:APPVEYOR_REPO_COMMIT_AUTHOR -eq 'Chocolatey') {
  52. "Build triggered by appveyor commit, aborting"
  53. } else {
  54. .\au\update_all.ps1
  55. }
  56. #on_finish:
  57. #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
  58. artifacts:
  59. - path: gist.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