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

Modify logic of deploying Arm template according to artifacts #18773

Conversation

yiliuTo
Copy link
Member

@yiliuTo yiliuTo commented Jan 23, 2021

This PR modifies the logic of deploying Arm template for Live tests.

The original method is to scan all test-resources.json files under the directory of $ServiceDirectory, however, for the Spring live tests in Azure China Cloud, we only want to run parts of tests which don't need to deploy any test resources, and can be refered here: #18774.

Thus we want to modify the logic as scanning test-resources.json in each provided artifact project under $ServiceDirectory, here the artifact parameter is passed from each tests.yml.
And if no artifact is provided, then the script will follow its original logic that scan all test-resources.json files under $ServiceDirectory recursively.

@yiliuTo
Copy link
Member Author

yiliuTo commented Jan 23, 2021

/azp run java - spring - tests

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yiliuTo
Copy link
Member Author

yiliuTo commented Jan 26, 2021

/azp run java - spring - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

This script searches the directory specified in $ServiceDirectory recursively
for files named test-resources.json.
This script searches for files named test-resources.json in each artifact project
of $Artifacts under $ServiceDirectory recursively. When $Artifacts is not set, the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes directory name not equal to artifact name.
So maybe we can use SubDirectories instead of Artifacts?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@@ -550,6 +567,11 @@ A directory under 'sdk' in the repository root - optionally with subdirectories
specified - in which to discover ARM templates named 'test-resources.json'.
This can also be an absolute path or specify parent directories.

.PARAMETER Artifacts
A string of all artifact names defined in tests.yml under ServiceDirectory. If the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep same style, use Artifact instead of artifact

.PARAMETER Artifacts
A string of all artifact names defined in tests.yml under ServiceDirectory. If the
value is not set, then all ARM templates under ServiceDirectory will be found to deploy
test resources. Otherwise, only templates under ServiceDirectory/artifact will be discovered.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ServiceDirectory/Artifact

@@ -21,6 +21,9 @@ param (
[Parameter(Mandatory = $true, Position = 0)]
[string] $ServiceDirectory,

[Parameter()]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @benbp

You cannot edit these common files in the language repo instead you need to follow the https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#workflow

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @weshaggard , I will follow the workflow and work with @benbp .

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please work with @benbp to come up with a design for this change and lets make the changes under eng/common in the azure-sdk-tools repo.

@benbp
Copy link
Member

benbp commented Jan 27, 2021

@yiliuTo I'll chat with you offline and we can put our design notes here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants