LoginSignup
3
4

More than 5 years have passed since last update.

AppVeyor 設定項目 - Environment編

Last updated at Posted at 2015-12-02

AppVeyor

.NET開発者向けのCI&デプロイツール
Continuous Integration and Deployment service for Windows developers - Appveyor

AppVeyor 設定項目 - General編 - Qiita

SETTINGS

GUIでの設定項目について概要をまとめます。
リポジトリの種類により設定項目が一部異なります。
今回は、GitHubのプロジェクトの場合について記載します。

Environment

環境設定

Operating system

ビルド環境のVMテンプレート

  • Default Azure
  • MinGW
  • Visual Studio 2013~
  • Windows Server 2012 R2
  • WMF 5

などの中から複数選べる

$x64items = @(Get-ChildItem "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")
$x64items + @(Get-ChildItem "HKLM:SOFTWARE\wow6432node\Microsoft\Windows\CurrentVersion\Uninstall") `
   | ForEach-object { Get-ItemProperty Microsoft.PowerShell.Core\Registry::$_ } `
   | Sort-Object -Property DisplayName `
   | Select-Object -Property DisplayName,DisplayVersion

これをBefore build scriptに設定すると、インストールされているものが確認できる
Windows Server 2012 R2Visual Studio 2015では特に違いがわからなかった
Default AzureとではIISのバージョンやVisual Studio 2015インストールの有無に違いがあった
参考:Build Worker Installed Software - Appveyor

Clone directory

リポジトリをクローンするディレクトリ
ビルドのルートパスになる
デフォルト:c:\projects\{プロジェクト名}

Environment variables

環境変数を設定
グローバルな環境変数とグループ分け(build matrix)した環境変数がある
グループ分けした場合、それぞれビルドが実行される
以下のようにDB毎に分けたりできる

matrix:
 - db: mysql
   provider: mysql

 - db: mssql
   provider: mssql
   password:
     secure: $#(JFDA)jQ@#$

既定の環境変数については以下を参照
Environment variables - Appveyor

Services

サービスの追加

  • SQL Server
  • MySQL
  • PostgreSQL
  • MongoDB
  • IIS
  • Microsoft Message Queuing Services

から選択

Hosts

drivers\etc\hostsに記載する内容

Cached directories and files

キャッシュするディレクトリ、ファイルの指定
AppVeyorはビルドのたびにVMを作っているので毎回ライブラリのダウンロードなどが必要
NuGetのpackagesnode_modulesgemなどなどを指定し、毎回ダウンロードしないようにできる

Init script

一番初めに実行するスクリプトを記述
PowerShellかCmdが選べる

Install script

クローン完了時に実行するスクリプトを記述
PowerShellかCmdが選べる

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4