Skip to content

Commit

Permalink
Fix workitem creation on sync failure (#602)
Browse files Browse the repository at this point in the history
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Move 'Report build status' to its own job running on a different pool
and set up syncing for release branches as well

Add releases/* to workflows not currently triggered on release branches

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#498823](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/498823)
  • Loading branch information
aholstrup1 authored Feb 20, 2024
1 parent 1806fd7 commit f03b101
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
20 changes: 16 additions & 4 deletions .azuredevops/SyncMirroredRepository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ schedules:
branches:
include:
- main
- releases/*

pool:
name: 'd365bc-agentpool-nonprod-bcapps-sync'
Expand All @@ -26,6 +27,7 @@ variables:
jobs:
- job: SyncMirror
dependsOn: []
displayName: Sync mirror with upstream
steps:
- powershell: |
git config --global user.email "[email protected]"
Expand All @@ -36,9 +38,19 @@ jobs:
inputs:
filePath: build\scripts\SyncMirror.ps1
arguments: '-SourceRepository "https://github.com/microsoft/BCApps.git" -TargetRepository $(TargetRepository) -Branch $(Build.SourceBranch) -ManagedIdentityAuth'

- job: ReportBuildStatus
dependsOn:
- SyncMirror
pool: 'd365bc-agentpool-nonprod-build-official'
condition: failed()
displayName: Report build status
steps:
- checkout: none
- template: workitem-build-tracking.yml@PipelineTemplates
parameters:
Priority: '2'
Severity: '2'
Issue: 'Infrastructure Defect'
SecurityImpact: 'No'
Priority: '2'
Severity: '2'
Issue: 'Build Break'
SecurityImpact: 'No'
Condition: always()
1 change: 1 addition & 0 deletions .azuredevops/security-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ schedules:
branches:
include:
- main
- releases/*

pool:
name: d365bc-agentpool-nonprod-build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CreateBuildTag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_run:
workflows: [' CI/CD']
types: [completed]
branches: ['main']
branches: [ 'main', 'releases/*' ]

run-name: "[${{ github.ref_name }}] Create build tag"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/WorkitemValidation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Work Item Validation
on:
pull_request_target:
types: [opened, synchronize, reopened, edited]
branches: [main]
branches: [ 'main', 'releases/*' ]

permissions:
contents: read
Expand Down

0 comments on commit f03b101

Please sign in to comment.