.appveyor.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # AU template: https://github.com/majkinetor/au-packages-template
  2. version: '{build}'
  3. max_jobs: 1
  4. image: WMF 5
  5. clone_depth: 5
  6. branches:
  7. only:
  8. - master
  9. #build:
  10. # verbosity: minimal
  11. environment:
  12. # Set au version to use or omit to use the latest. Specify branch name to use development version from Github
  13. au_version:
  14. au_push: true
  15. # Github token to commit pushed packages to repository
  16. github_user_repo: {github_user}/{repository}
  17. github_api_key:
  18. secure: YOUR_GITHUB_API_KEY_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
  19. # Mail credentials - for error notifications
  20. mail_user:
  21. secure: YOUR_EMAIL_ACCOUNT_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
  22. mail_pass:
  23. secure: YOUR_EMAIL_PASSWORD_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
  24. mail_server: smtp.gmail.com
  25. mail_port: 587
  26. mail_enablessl: true
  27. # 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
  28. # Optional, leave empty to create anonymous gist
  29. gist_id:
  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. - git config --global core.safecrlf false
  37. install:
  38. - ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
  39. - ps: $PSVersionTable
  40. - git --version
  41. - ps: |
  42. git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
  43. . "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
  44. build_script:
  45. - ps: |
  46. if ( ($Env:APPVEYOR_SCHEDULED_BUILD -ne 'true') -and ($Env:APPVEYOR_FORCED_BUILD -ne 'true') ) {
  47. switch -regex ($Env:APPVEYOR_REPO_COMMIT_MESSAGE)
  48. {
  49. '\[AU (.+?)\]' { $forced = $Matches[1] }
  50. '\[PUSH (.+?)\]' {
  51. $packages = $Matches[1] -split ' '
  52. Write-Host "PUSHING PACKAGES: $packages"
  53. foreach ($package in $packages) {
  54. Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package")
  55. $package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec"} | select -First 1 | % Directory
  56. if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue }
  57. pushd $package_dir; choco pack; Push-Package; popd
  58. }
  59. return
  60. }
  61. }
  62. }
  63. ./update_all.ps1 -ForcedPackages $forced
  64. 7z a au_temp.zip $Env:TEMP\chocolatey\au\*
  65. artifacts:
  66. - path: update_info.xml
  67. - path: Update-AUPackages.md
  68. - path: au_temp.zip
  69. notifications:
  70. - provider: Email
  71. to: $(mail_user)
  72. on_build_success: false
  73. on_build_failure: true
  74. on_build_status_changed: true
  75. #on_finish:
  76. #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))