LoginSignup
14
14

More than 5 years have passed since last update.

[Microsoft] Azure Pipelines 利用されるディレクトリと参照する変数

Last updated at Posted at 2019-01-26

Azure Pipelinesの中で、ファイルが展開される先のディレクトリと、それを参照する変数をまとめてみました。

名前 変数 実ディレクトリの例 使用しているタスク
ソース置き場 Build.SourcesDirectory 等 /home/vsts/work/1/s Azure App Service Deploy 等
バイナリ置き場 Build.BinariesDirectory 等 /home/vsts/work/1/b Archive File 等
生成物置き場 Build.ArtifactStagingDirectory 等 /home/vsts/work/1/a Net Core CLI 等

リファレンスはこちら → https://docs.microsoft.com/ja-jp/azure/devops/pipelines/build/variables?view=azdevops

以下、詳細です。

ソース置き場

ソースファイル全体がここに展開されます。

ソース中のファイル名を指定する例はこのようになります。

${Build.SourcesDirectory}/project-a/package.json

変数

  • Build.SourcesDirectory

下記も同じ内容を指しています(異なる場合もある?)

  • Build.Repository.LocalPath
  • System.DefaultWorkingDirectory

使用しているタスクの例

バイナリ置き場

コンパイル結果が格納されます。

変数

  • Build.BinariesDirectory

使用しているタスクの例

生成物置き場

パイプラインエージェントが生成したファイルが置かれます。

変数

  • Build.ArtifactStagingDirectory
  • Build.StagingDirectory

これらは同一の内容を指します。

使用しているタスクの例

14
14
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
14
14