.appveyor.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # AU template: https://github.com/majkinetor/au-packages-template
  2. version: '{build}'
  3. max_jobs: 1
  4. image: WMF 5
  5. # History plugin requires complete log
  6. #clone_depth: 5
  7. branches:
  8. only:
  9. - master
  10. #build:
  11. # verbosity: minimal
  12. environment:
  13. # Set au version to use or omit to use the latest. Specify branch name to use development version from Github
  14. #au_version:
  15. au_push: true
  16. # Force test: use 1 to test all, or N to split testing into N groups
  17. au_test_groups: 1
  18. # Github token to commit pushed packages to repository
  19. github_user_repo: douglaswth/chocolatey-packages
  20. github_api_key:
  21. secure: vBQ66VcMD7oL1DZk4lKbBLKH0SLnGdTAg87cHRjCwQ6wENWv0mNln+1J6uN3HdJK
  22. # Mail credentials - for error notifications
  23. mail_user:
  24. secure: lVYpTAAoZdcEVOzCISGQtpAvwL/ZjlB1NsxUBEQQv9g/Y9OCc5v+nnlbghTYwEgq
  25. mail_pass:
  26. secure: wLGxZRm3B8BkkKqf+C6WAM/dp7CfGtgaO20Xp2y9Shs=
  27. mail_server: smtp.gmail.com
  28. mail_port: 587
  29. mail_enablessl: true
  30. # 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
  31. # Optional, leave empty to create anonymous gist
  32. gist_id: d98014ed4fcaa5cc65bb902f21ce366a
  33. # Force test: gist id for test results
  34. gist_id_test: b003c5505c6cc5c6a67f8de9e68c183e
  35. # Chocolatey API key - to push updated packages
  36. api_key:
  37. secure: oODJ824CND7pSFOUd6ben+k0hRi5bsHPckwiisDA4rHIX4fPI708FnxUosWvy5lc
  38. init:
  39. - git config --global user.email "chocolatey@realdimensions.net"
  40. - git config --global user.name "Chocolatey"
  41. - git config --global core.safecrlf false
  42. install:
  43. - ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
  44. - ps: $PSVersionTable
  45. - git --version
  46. - ps: |
  47. git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
  48. . "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
  49. - ps: |
  50. "Build info"
  51. ' {0,-20} {1}' -f 'SCHEDULED BUILD:', ($Env:APPVEYOR_SCHEDULED_BUILD -eq 'true')
  52. ' {0,-20} {1}' -f 'FORCED BUILD:' , ($Env:APPVEYOR_FORCED_BUILD -eq 'true')
  53. ' {0,-20} {1}' -f 'RE BUILD:' , ($Env:APPVEYOR_RE_BUILD -eq 'true')
  54. build_script:
  55. - ps: |
  56. $ErrorActionPreference = 'Continue'
  57. if ($Env:APPVEYOR_PROJECT_NAME -like '*test*') { ./test_all.ps1 "random $Env:au_test_groups"; return }
  58. if ( ($Env:APPVEYOR_SCHEDULED_BUILD -ne 'true') -and ($Env:APPVEYOR_FORCED_BUILD -ne 'true') ) {
  59. switch -regex ($Env:APPVEYOR_REPO_COMMIT_MESSAGE)
  60. {
  61. '\[AU (.+?)\]' { $forced = $Matches[1] }
  62. '\[PUSH (.+?)\]' {
  63. $packages = $Matches[1] -split ' '
  64. Write-Host "PUSHING PACKAGES: $packages"
  65. foreach ($package in $packages) {
  66. Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package")
  67. $package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec"} | select -First 1 | % Directory
  68. if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue }
  69. pushd $package_dir; choco pack; Push-Package; popd
  70. }
  71. return
  72. }
  73. }
  74. }
  75. ./update_all.ps1 -ForcedPackages $forced
  76. 7z a au_temp.zip $Env:TEMP\chocolatey\au\*
  77. artifacts:
  78. - path: update_info.xml
  79. - path: Update-AUPackages.md
  80. - path: au_temp.zip
  81. notifications:
  82. - provider: Email
  83. to: $(mail_user)
  84. on_build_success: false
  85. on_build_failure: true
  86. on_build_status_changed: true
  87. #on_finish:
  88. #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))