You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

appveyor.yml.sample 14 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. # Notes:
  2. # - Minimal appveyor.yml file is an empty file. All sections are optional.
  3. # - Indent each level of configuration with 2 spaces. Do not use tabs!
  4. # - All section names are case-sensitive.
  5. # - Section names should be unique on each level.
  6. #---------------------------------#
  7. # general configuration #
  8. #---------------------------------#
  9. # version format
  10. version: 1.0.{build}
  11. # you can use {branch} name in version format too
  12. # version: 1.0.{build}-{branch}
  13. # branches to build
  14. branches:
  15. # whitelist
  16. only:
  17. - master
  18. - production
  19. # blacklist
  20. except:
  21. - gh-pages
  22. # Do not build on tags (GitHub and BitBucket)
  23. skip_tags: true
  24. # Start builds on tags only (GitHub and BitBucket)
  25. skip_non_tags: true
  26. # Skipping commits with particular message or from specific user
  27. skip_commits:
  28. message: /Created.*\.(png|jpg|jpeg|bmp|gif)/ # Regex for matching commit message
  29. author: John # Commit author's username, name, email or regexp maching one of these.
  30. # Including commits with particular message or from specific user
  31. only_commits:
  32. message: /build/ # Start a new build if message contains 'build'
  33. author: jack@company.com # Start a new build for commit of user with email jack@company.com
  34. # Skipping commits affecting specific files (GitHub only). More details here: /docs/appveyor-yml
  35. #skip_commits:
  36. # files:
  37. # - docs/*
  38. # - '**/*.html'
  39. # Including commits affecting specific files (GitHub only). More details here: /docs/appveyor-yml
  40. #only_commits:
  41. # files:
  42. # - Project-A/
  43. # - Project-B/
  44. # Do not build feature branch with open Pull Requests
  45. skip_branch_with_pr: true
  46. # Maximum number of concurrent jobs for the project
  47. max_jobs: 1
  48. #---------------------------------#
  49. # environment configuration #
  50. #---------------------------------#
  51. # Build worker image (VM template)
  52. image: Visual Studio 2015
  53. # scripts that are called at very beginning, before repo cloning
  54. init:
  55. - git config --global core.autocrlf input
  56. # clone directory
  57. clone_folder: c:\projects\myproject
  58. # fetch repository as zip archive
  59. shallow_clone: true # default is "false"
  60. # set clone depth
  61. clone_depth: 5 # clone entire repository history if not defined
  62. # setting up etc\hosts file
  63. hosts:
  64. queue-server: 127.0.0.1
  65. db.server.com: 127.0.0.2
  66. # environment variables
  67. environment:
  68. my_var1: value1
  69. my_var2: value2
  70. # this is how to set encrypted variable. Go to "Settings" -> "Encrypt YAML" page in account menu to encrypt data.
  71. my_secure_var1:
  72. secure: FW3tJ3fMncxvs58/ifSP7w==
  73. # environment:
  74. # global:
  75. # connection_string: server=12;password=13;
  76. # service_url: https://127.0.0.1:8090
  77. #
  78. # matrix:
  79. # - db: mysql
  80. # provider: mysql
  81. #
  82. # - db: mssql
  83. # provider: mssql
  84. # password:
  85. # secure: $#(JFDA)jQ@#$
  86. # this is how to allow failing jobs in the matrix
  87. matrix:
  88. fast_finish: true # set this flag to immediately finish build once one of the jobs fails.
  89. allow_failures:
  90. - platform: x86
  91. configuration: Debug
  92. - platform: x64
  93. configuration: Release
  94. # exclude configuration from the matrix. Works similarly to 'allow_failures' but build not even being started for excluded combination.
  95. exclude:
  96. - platform: x86
  97. configuration: Debug
  98. # build cache to preserve files/folders between builds
  99. cache:
  100. - packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
  101. - projectA\libs
  102. - node_modules # local npm modules
  103. - '%LocalAppData%\NuGet\Cache' # NuGet < v3
  104. - '%LocalAppData%\NuGet\v3-cache' # NuGet v3
  105. # enable service required for build/tests
  106. services:
  107. - mssql2014 # start SQL Server 2014 Express
  108. - mssql2014rs # start SQL Server 2014 Express and Reporting Services
  109. - mssql2012sp1 # start SQL Server 2012 SP1 Express
  110. - mssql2012sp1rs # start SQL Server 2012 SP1 Express and Reporting Services
  111. - mssql2008r2sp2 # start SQL Server 2008 R2 SP2 Express
  112. - mssql2008r2sp2rs # start SQL Server 2008 R2 SP2 Express and Reporting Services
  113. - mysql # start MySQL 5.6 service
  114. - postgresql # start PostgreSQL 9.5 service
  115. - iis # start IIS
  116. - msmq # start Queuing services
  117. - mongodb # start MongoDB
  118. # scripts that run after cloning repository
  119. install:
  120. # by default, all script lines are interpreted as batch
  121. - echo This is batch
  122. # to run script as a PowerShell command prepend it with ps:
  123. - ps: Write-Host 'This is PowerShell'
  124. # batch commands start from cmd:
  125. - cmd: echo This is batch again
  126. - cmd: set MY_VAR=12345
  127. # enable patching of AssemblyInfo.* files
  128. assembly_info:
  129. patch: true
  130. file: AssemblyInfo.*
  131. assembly_version: "2.2.{build}"
  132. assembly_file_version: "{version}"
  133. assembly_informational_version: "{version}"
  134. # Automatically register private account and/or project AppVeyor NuGet feeds.
  135. nuget:
  136. account_feed: true
  137. project_feed: true
  138. disable_publish_on_pr: true # disable publishing of .nupkg artifacts to account/project feeds for pull request builds
  139. publish_wap_octopus: true # disable publishing of Octopus Deploy .nupkg artifacts to account/project feeds
  140. #---------------------------------#
  141. # build configuration #
  142. #---------------------------------#
  143. # build platform, i.e. x86, x64, Any CPU. This setting is optional.
  144. platform: Any CPU
  145. # to add several platforms to build matrix:
  146. #platform:
  147. # - x86
  148. # - Any CPU
  149. # build Configuration, i.e. Debug, Release, etc.
  150. configuration: Release
  151. # to add several configurations to build matrix:
  152. #configuration:
  153. # - Debug
  154. # - Release
  155. # Build settings, not to be confused with "before_build" and "after_build".
  156. # "project" is relative to the original build directory and not influenced by directory changes in "before_build".
  157. build:
  158. parallel: true # enable MSBuild parallel builds
  159. project: MyTestAzureCS.sln # path to Visual Studio solution or project
  160. publish_wap: true # package Web Application Projects (WAP) for Web Deploy
  161. publish_wap_xcopy: true # package Web Application Projects (WAP) for XCopy deployment
  162. publish_wap_beanstalk: true # Package Web Applications for AWS Elastic Beanstalk deployment
  163. publish_wap_octopus: true # Package Web Applications for Octopus deployment
  164. publish_azure_webjob: true # Package Azure WebJobs for Zip Push deployment
  165. publish_azure: true # package Azure Cloud Service projects and push to artifacts
  166. publish_aspnet_core: true # Package ASP.NET Core projects
  167. publish_core_console: true # Package .NET Core console projects
  168. publish_nuget: true # package projects with .nuspec files and push to artifacts
  169. publish_nuget_symbols: true # generate and publish NuGet symbol packages
  170. include_nuget_references: true # add -IncludeReferencedProjects option while packaging NuGet artifacts
  171. # MSBuild verbosity level
  172. verbosity: quiet|minimal|normal|detailed
  173. # scripts to run before build
  174. before_build:
  175. # to run your custom scripts instead of automatic MSBuild
  176. build_script:
  177. # scripts to run after build (working directory and environment changes are persisted from the previous steps)
  178. after_build:
  179. # scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
  180. before_package:
  181. # to disable automatic builds
  182. #build: off
  183. #---------------------------------#
  184. # tests configuration #
  185. #---------------------------------#
  186. # to run tests against only selected assemblies and/or categories
  187. test:
  188. assemblies:
  189. only:
  190. - asm1.dll
  191. - asm2.dll
  192. categories:
  193. only:
  194. - UI
  195. - E2E
  196. # to run tests against all except selected assemblies and/or categories
  197. #test:
  198. # assemblies:
  199. # except:
  200. # - asm1.dll
  201. # - asm2.dll
  202. #
  203. # categories:
  204. # except:
  205. # - UI
  206. # - E2E
  207. # to run tests from different categories as separate jobs in parallel
  208. #test:
  209. # categories:
  210. # - A # A category common for all jobs
  211. # - [UI] # 1st job
  212. # - [DAL, BL] # 2nd job
  213. # scripts to run before tests (working directory and environment changes are persisted from the previous steps such as "before_build")
  214. before_test:
  215. - echo script1
  216. - ps: Write-Host "script1"
  217. # to run your custom scripts instead of automatic tests
  218. test_script:
  219. - echo This is my custom test script
  220. # scripts to run after tests
  221. after_test:
  222. # to disable automatic tests
  223. #test: off
  224. #---------------------------------#
  225. # artifacts configuration #
  226. #---------------------------------#
  227. artifacts:
  228. # pushing a single file
  229. - path: test.zip
  230. # pushing a single file with environment variable in path and "Deployment name" specified
  231. - path: MyProject\bin\$(configuration)
  232. name: myapp
  233. # pushing entire folder as a zip archive
  234. - path: logs
  235. # pushing all *.nupkg files in build directory recursively
  236. - path: '**\*.nupkg'
  237. #---------------------------------#
  238. # deployment configuration #
  239. #---------------------------------#
  240. # providers: Local, FTP, WebDeploy, AzureCS, AzureBlob, S3, NuGet, Environment
  241. # provider names are case-sensitive!
  242. deploy:
  243. # FTP deployment provider settings
  244. - provider: FTP
  245. protocol: ftp|ftps|sftp
  246. host: ftp.myserver.com
  247. username: admin
  248. password:
  249. secure: eYKZKFkkEvFYWX6NfjZIVw==
  250. folder:
  251. application:
  252. active_mode: false
  253. beta: true # enable alternative FTP library for 'ftp' and 'ftps' modes
  254. debug: true # show complete FTP log
  255. # Amazon S3 deployment provider settings
  256. - provider: S3
  257. access_key_id:
  258. secure: ABcd==
  259. secret_access_key:
  260. secure: ABcd==
  261. bucket: my_bucket
  262. folder:
  263. artifact:
  264. set_public: false
  265. # Azure Blob storage deployment provider settings
  266. - provider: AzureBlob
  267. storage_account_name:
  268. secure: ABcd==
  269. storage_access_key:
  270. secure: ABcd==
  271. container: my_container
  272. folder:
  273. artifact:
  274. # Web Deploy deployment provider settings
  275. - provider: WebDeploy
  276. server: http://www.deploy.com/myendpoint
  277. website: mywebsite
  278. username: user
  279. password:
  280. secure: eYKZKFkkEvFYWX6NfjZIVw==
  281. ntlm: false
  282. remove_files: false
  283. app_offline: false
  284. do_not_use_checksum: true # do not use check sum for comparing source and destination files. By default checksums are used.
  285. sync_retry_attempts: 2 # sync attempts, max
  286. sync_retry_interval: 2000 # timeout between sync attempts, milliseconds
  287. aspnet_core: true # artifact zip contains ASP.NET Core application
  288. aspnet_core_force_restart: true # poke app's web.config before deploy to force application restart
  289. skip_dirs: \\App_Data
  290. skip_files: web.config
  291. on:
  292. branch: release
  293. platform: x86
  294. configuration: debug
  295. # Deploying to Azure Cloud Service
  296. - provider: AzureCS
  297. subscription_id:
  298. secure: fjZIVw==
  299. subscription_certificate:
  300. secure: eYKZKFkkEv...FYWX6NfjZIVw==
  301. storage_account_name: my_storage
  302. storage_access_key:
  303. secure: ABcd==
  304. service: my_service
  305. slot: Production
  306. target_profile: Cloud
  307. artifact: MyPackage.cspkg
  308. # Deploying to NuGet feed
  309. - provider: NuGet
  310. server: https://my.nuget.server/feed
  311. api_key:
  312. secure: FYWX6NfjZIVw==
  313. skip_symbols: false
  314. symbol_server: https://your.symbol.server/feed
  315. artifact: MyPackage.nupkg
  316. # Deploy to GitHub Releases
  317. - provider: GitHub
  318. artifact: /.*\.nupkg/ # upload all NuGet packages to release assets
  319. draft: false
  320. prerelease: false
  321. on:
  322. branch: master # release from master branch only
  323. APPVEYOR_REPO_TAG: true # deploy on tag push only
  324. # Deploying to a named environment
  325. - provider: Environment
  326. name: staging
  327. on:
  328. branch: staging
  329. env_var1: value1
  330. env_var2: value2
  331. # scripts to run before deployment
  332. before_deploy:
  333. # scripts to run after deployment
  334. after_deploy:
  335. # to run your custom scripts instead of provider deployments
  336. deploy_script:
  337. # to disable deployment
  338. #deploy: off
  339. #---------------------------------#
  340. # global handlers #
  341. #---------------------------------#
  342. # on successful build
  343. on_success:
  344. - do something
  345. # on build failure
  346. on_failure:
  347. - do something
  348. # after build failure or success
  349. on_finish:
  350. - do something
  351. #---------------------------------#
  352. # notifications #
  353. #---------------------------------#
  354. notifications:
  355. # Email
  356. - provider: Email
  357. to:
  358. - user1@email.com
  359. - user2@email.com
  360. subject: 'Build {{status}}' # optional
  361. message: "{{message}}, {{commitId}}, ..." # optional
  362. on_build_status_changed: true
  363. # HipChat
  364. - provider: HipChat
  365. auth_token:
  366. secure: RbOnSMSFKYzxzFRrxM1+XA==
  367. room: ProjectA
  368. template: "{message}, {commitId}, ..."
  369. # Slack
  370. - provider: Slack
  371. incoming_webhook: http://incoming-webhook-url
  372. # ...or using auth token
  373. - provider: Slack
  374. auth_token:
  375. secure: kBl9BlxvRMr9liHmnBs14A==
  376. channel: development
  377. template: "{message}, {commitId}, ..."
  378. # Campfire
  379. - provider: Campfire
  380. account: appveyor
  381. auth_token:
  382. secure: RifLRG8Vfyol+sNhj9u2JA==
  383. room: ProjectA
  384. template: "{message}, {commitId}, ..."
  385. # Webhook
  386. - provider: Webhook
  387. url: http://www.myhook2.com
  388. headers:
  389. User-Agent: myapp 1.0
  390. Authorization:
  391. secure: GhD+5xhLz/tkYY6AO3fcfQ==
  392. on_build_success: false
  393. on_build_failure: true
  394. on_build_status_changed: true