## 概要 [Task2488: staging用pipelineのymlのトリガーを修正する](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2488) - (まだ稼働していないStagingデプロイパイプラインの)トリガー部分のチェックロジックが権限不足で動作していなかった箇所を修正 ## レビューポイント - 情報共有 ## 動作確認状況 - mainブランチ外のブランチがpipeline上で実行された時に失敗することを確認
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
trigger:
|
|
branches:
|
|
include:
|
|
- main
|
|
tags:
|
|
include:
|
|
- stage-*
|
|
|
|
jobs:
|
|
- job: initialize
|
|
displayName: Initialize
|
|
pool:
|
|
vmImage: ubuntu-latest
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
fetchDepth: 1
|
|
persistCredentials: true
|
|
- script: |
|
|
git fetch origin main:main
|
|
if git merge-base --is-ancestor $(Build.SourceVersion) main; then
|
|
echo "This commit is in the main branch."
|
|
else
|
|
echo "This commit is not in the main branch."
|
|
exit 1
|
|
fi
|
|
displayName: 'タグが付けられたCommitがmainブランチに存在するか確認'
|
|
- job: backend_build
|
|
dependsOn: initialize
|
|
condition: succeeded('initialize')
|
|
displayName: Dictation App Service Deploy
|
|
pool:
|
|
vmImage: ubuntu-latest
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
fetchDepth: 1
|
|
- job: frontend_build
|
|
dependsOn: initialize
|
|
condition: succeeded('initialize')
|
|
displayName: Dictation Static App Service Deploy
|
|
pool:
|
|
vmImage: ubuntu-latest
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
fetchDepth: 1
|
|
- job: migration
|
|
condition: succeeded('initialize')
|
|
displayName: DB migration
|
|
dependsOn:
|
|
- initialize
|
|
- backend_build
|
|
- frontend_build
|
|
pool:
|
|
name: db-migrate-pipelines
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
fetchDepth: 1 |