Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mgmt network supports priority #29503

Merged
merged 15 commits into from
Jun 22, 2022
5 changes: 4 additions & 1 deletion eng/pipelines/templates/steps/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ parameters:
- name: IsLiveTest
type: boolean
default: false
- name: ExcludeProjects
type: string
default: 'com.azure.resourcemanager:azure-resourcemanager-samples'

steps:
- task: Maven@3
Expand Down Expand Up @@ -71,7 +74,7 @@ steps:
condition: and(eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['JavaTestVersion'], '1.11'), eq('${{ parameters.SDKType }}', 'client'), eq('${{ parameters.SkipAggregateReports }}', 'false'))
inputs:
scriptPath: 'eng/scripts/generate_aggregate_coverage_pom.py'
arguments: '--project-list $(ProjectList)'
arguments: '--project-list $(ProjectList) --exclude-projects ${{ parameters.ExcludeProjects }}'
workingDirectory: '$(System.DefaultWorkingDirectory)'

- task: Maven@3
Expand Down
11 changes: 8 additions & 3 deletions eng/scripts/generate_aggregate_coverage_pom.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

include_groups = []

exclude_projects = ['com.azure.resourcemanager:azure-resourcemanager-samples']
exclude_projects = []

# From this file get to the root path of the repo.
root_path = os.path.normpath(os.path.abspath(__file__) + '/../../../')
Expand Down Expand Up @@ -63,7 +63,7 @@
'''


def create_aggregate_coverage_pom(project_list: str, groups: str):
def create_aggregate_coverage_pom(project_list: str, groups: str, projects_to_exclude: str):

if groups is None:
include_groups.append('com.azure')
Expand All @@ -73,6 +73,10 @@ def create_aggregate_coverage_pom(project_list: str, groups: str):
for group in groups.split(','):
include_groups.append(group)

if projects_to_exclude is not None:
for project_to_exclude in projects_to_exclude.split(','):
exclude_projects.append(project_to_exclude)

# Get the artifact identifiers from client_versions.txt to act as our source of truth.
artifact_identifier_to_version = load_client_artifact_identifiers()

Expand Down Expand Up @@ -197,9 +201,10 @@ def main():
parser = argparse.ArgumentParser(description='Generated a POM for creating an aggregate code coverage report.')
parser.add_argument('--project-list', '--pl', type=str)
parser.add_argument('--groups', '--g', type=str)
parser.add_argument('--exclude-projects', '--ep', type=str)
XiaofeiCao marked this conversation as resolved.
Show resolved Hide resolved
args = parser.parse_args()
start_time = time.time()
create_aggregate_coverage_pom(args.project_list, args.groups)
create_aggregate_coverage_pom(args.project_list, args.groups, args.exclude_projects)
elapsed_time = time.time() - start_time

print('Effective POM File for aggregate code coverage')
Expand Down