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

Adding support of negative patterns for DownloadBuildArtifacts and DownloadPipelineArtifacts tasks in scenarios with using file share #3666

Merged
merged 9 commits into from
Dec 22, 2021

Conversation

denis-tikhomirov
Copy link
Contributor

@denis-tikhomirov denis-tikhomirov commented Dec 15, 2021

Added support of pre-handling minimatch patterns from azure-pipelines-task-lib (PS version / TS version) to DownloadBuildArtifacts and DownloadPipelineArtifacts tasks in scenarios with using file share.
The logic allows to handle negative minimatch patterns correctly.

Checked cases:

  • download all (like **)
  • download all (like **) except 1or 2 file (like !**/file.1.nupkg)
  • download all (like **) except group of files (like !**/file.*.nupkg)
  • download all (like **) except directory (like !**/folder1/**)
  • download directory (like **/folder1/**) except 1 file (like !**/folder1/file.1.nupkg)
  • download group files (like **/file.*.nupkg) except 1 file (like !**/file.1.nupkg)
  • download all (like **) except directory (like !**/folder1/**) but with downloading 1 file from the directory (like !!**/folder1/file.1.nupkg)
  • using of whitespaces in start and end of pattern
  • using of sharp (#) in pattern
  • using of empty pattern
  • using of pattern without asterisks (full path to file in artifact)

Checklist:

  • There’s no risky dependency updates

    • Corrected function is used by 2 tasks. And both these tasks work correctly with the changes.
  • Changes has been tested

    • Yes. The changes are tested by 22 cases (2 affected tasks, 11 cases for each task) by build in prepared pipeline. Also test with 7 cases was added in these PR to cover corrected function.
  • Enough test coverage for changes, and current test coverage for task doesn't look poor

    • Yes, test with 7 cases was added in these PR to cover corrected function. Most cases of using the function are covered.
  • We understand how tasks is working, how changes affect task behavior

    • Yes. The changes allow to collect list of files which should be downloaded from artifact. Previously all files are downloaded.
  • There is no breaking changes

    • No breaking changes.
  • There is no any other concerns

    • No concerns. Corrected function is used by 2 tasks. And both these tasks work correctly with the changes.
  • I have not discovered any new uncovered test/use cases

    • Yes, I don't uncovered test/use cases for corrected function.

@denis-tikhomirov denis-tikhomirov requested a review from a team December 15, 2021 12:31
@denis-tikhomirov denis-tikhomirov self-assigned this Dec 15, 2021
@EzzhevNikita EzzhevNikita requested a review from a team December 16, 2021 08:45
Copy link
Contributor

@anatolybolshakov anatolybolshakov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Could you please take a look at one last comment also?

@denis-tikhomirov
Copy link
Contributor Author

Sure. Answered to this.

@denis-tikhomirov denis-tikhomirov changed the base branch from users/denis-tikhomirov/issue2017 to master December 22, 2021 12:54
@denis-tikhomirov denis-tikhomirov merged commit 7c37653 into master Dec 22, 2021
@denis-tikhomirov denis-tikhomirov changed the title Adding support of negative patterns for DownloadBuildArtifacts task in scenarios with using file share Adding support of negative patterns for DownloadBuildArtifacts and DownloadPipelineArtifacts tasks in scenarios with using file share Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants