diff --git a/.azuredevops/policies/approvercountpolicy.yml b/.azuredevops/policies/approvercountpolicy.yml new file mode 100644 index 0000000000..70f345309c --- /dev/null +++ b/.azuredevops/policies/approvercountpolicy.yml @@ -0,0 +1,26 @@ +# This file configures the Approver Count Policy Validator status check. Some +# settings here are similar to branch policies specified via the Azure DevOps UI +# that govern how PRs are approved in general. The settings here dictate how +# the validator behaves, and it can also prevent PRs from completing. +# +# https://eng.ms/docs/coreai/devdiv/one-engineering-system-1es/1es-docs/policy-service/policy-as-code/approver-count-policy-overview + +name: approver_count +description: Approver count policy for dotnet-sqlclient [internal/release/6.0] +resource: repository +where: +configuration: + approverCountPolicySettings: + isBlocking: true + requireMinimumApproverCount: 2 + creatorVoteCounts: false + allowDownvotes: false + sourcePushOptions: + resetOnSourcePush: false + requireVoteOnLastIteration: true + requireVoteOnEachIteration: false + resetRejectionsOnSourcePush: false + blockLastPusherVote: true + branchNames: + - internal/release/6.0 + displayName: dotnet-sqlclient Approver Count Policy [internal/release/6.0] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..f355b2dd5e --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,25 @@ +#============================================================================== +# This is the global GitHub code owners file for the SqlClient repo. No other +# CODEOWNERS files should exist in the repo. +# +# Code owners documentation is here: +# +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners + +# The entire repo is owned by the SqlClientDevTeam GitHub team: +# +# https://github.com/orgs/dotnet/teams/sqlclientdevteam +# +# This team must be configured with write access to the repo for code ownership +# rules to apply. +# +# The main branch should also be protected and require all PRs to be approved +# by owners. See: +# +# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging +# +# There should be no other owners specified in the repo. +# +* @dotnet/sqlclientdevteam + +#============================================================================== diff --git a/azurepipelines-coverage.yml b/azurepipelines-coverage.yml new file mode 100644 index 0000000000..f3434430bb --- /dev/null +++ b/azurepipelines-coverage.yml @@ -0,0 +1,16 @@ +# Azure DevOps code coverage settings: +# +# https://learn.microsoft.com/en-us/azure/devops/pipelines/test/codecoverage-for-pullrequests?view=azure-devops#configuring-coverage-settings +# +coverage: + # Code coverage status will be posted to pull requests based on targets + # defined below. + status: + # Off by default. When on, details about coverage for each file changed will + # be posted as a pull request comment. + comments: on + # Diff coverage is code coverage only for the lines changed in a pull + # request. + diff: + # Set this to a desired %. Default is 70%. + target: 70% diff --git a/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml b/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml index 8b755255a3..59c013d2a7 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml @@ -5,29 +5,59 @@ ################################################################################# name: $(DayOfYear)$(Rev:rr) -trigger: - batch: true + +# Trigger PR validation runs for all pushes to PRs that target the specified +# branches. +# +# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#pr-triggers +# +pr: branches: include: - release/6.0 - - internal/release/6.0 + paths: include: - - src\Microsoft.Data.SqlClient\netcore\ref - - src\Microsoft.Data.SqlClient\netfx\ref - - src\Microsoft.Data.SqlClient\ref + - .azuredevops + - .config + - doc - eng + - src - tools - - .config - - Nuget.config + - azurepipelines-coverage.yml + - build.proj + - NuGet.config -schedules: -- cron: '0 5 * * Sat' - displayName: Weekly Friday 10:00 PM (UTC - 7) Build +# Commit triggers for CI runs on specified branches. +# +# No paths filters are specified, so all commits to the branches will trigger a +# build. +# +trigger: + batch: true branches: include: + - release/6.0 - internal/release/6.0 - always: true + +# Scheduled runs. +schedules: + + # GitHub on Sundays 06:30 UTC. + - cron: '30 6 * * Sun' + displayName: Sunday Run + branches: + include: + - release/6.0 + always: true + + # ADO on Sundays 07:30 UTC. + - cron: '30 7 * * Sun' + displayName: Sunday Run + branches: + include: + - internal/release/6.0 + always: true parameters: # parameters are shown up in ADO UI in a build queue time - name: 'debug' diff --git a/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml b/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml index fa3a80d59a..68e2f820d1 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml @@ -5,28 +5,59 @@ ################################################################################# name: $(DayOfYear)$(Rev:rr) -trigger: - batch: true + +# Trigger PR validation runs for all pushes to PRs that target the specified +# branches. +# +# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#pr-triggers +# +pr: branches: include: - release/6.0 - - internal/release/6.0 + paths: include: - - src + - .azuredevops + - .config + - doc - eng + - src - tools - - .config + - azurepipelines-coverage.yml - build.proj - - Nuget.config + - NuGet.config -schedules: -- cron: '0 5 * * Sat' - displayName: Weekly Friday 10:00 PM (UTC - 7) Build +# Commit triggers for CI runs on specified branches. +# +# No paths filters are specified, so all commits to the branches will trigger a +# build. +# +trigger: + batch: true branches: include: + - release/6.0 - internal/release/6.0 - always: true + +# Scheduled runs. +schedules: + + # GitHub on Sundays 06:00 UTC. + - cron: '0 6 * * Sun' + displayName: Sunday Run + branches: + include: + - release/6.0 + always: true + + # ADO on Sundays 07:00 UTC. + - cron: '0 7 * * Sun' + displayName: Sunday Run + branches: + include: + - internal/release/6.0 + always: true parameters: # parameters are shown up in ADO UI in a build queue time - name: 'debug'