Share via

Azure DevOps pipelineのschedulesにあるincludeの意味、活用法について

TARO 0 Reputation points
2023-09-19T05:48:24.61+00:00

質問は2点です。

  • Azure Devops pipelineにて一つのブランチ(main)から他のブランチのスケジュールを管理することは可能ですか?
  • 不可であればschedules.branches.includeが配列となっているのはどういった意図からでしょうか?(Gitでマージする際にコンフリクトしないようにするためだけ?)

実現したいことは複数ブランチの実行スケジュールの一括管理です。

例えばブランチとして「schedule_main」を作成し、そのブランチ中のyamlファイルに下記のように記述するようなイメージです。

前提としてother_project1とother_project2にschedulesの記述は無い状態です。

ただ、恐らく下記の書き方では期待する動作(other_project1とother_project2のスケジュール設定がされる)とはならない認識です。

それは「https://learn.microsoft.com/ja-jp/azure/devops/pipelines/process/scheduled-triggers?view=azure-devops&tabs=yaml」における「release」ブランチと同様の状態のように見えるからです。

ただ、同ドキュメント上でincludeには「which branches the schedule applies to」という説明文があり、

この属性で複数ブランチに対する実行制御が行えるようにも読み取れるため、記載の意図を確認したいです。

schedules: 
- cron: "00 00 00 00 *"
  branches:
    include:
    - other_project1
    - other_project2
  always: true

Community Center | Not monitored
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.