From 65e434cdb3972411c26db2a2fa894168eaa10a9a Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 15 Oct 2020 17:57:16 -0700 Subject: [PATCH 1/3] Check only diff fiels --- README.md | 1 + eng/common/scripts/Verify-Links.ps1 | 5 ++++- eng/pipelines/templates/jobs/archetype-sdk-client.yml | 10 ++++++---- sdk/core/azure-core/README.md | 1 + 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c17e8b398a65..d79f9602e202 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ Management libraries can be identified by namespaces that start with `azure-mgmt The master branch has the most recent code with new features and bug fixes. It does **not** represent latest released **GA** SDK. See [above](#Client-New-Releases) for latest **GA** release.
+ ### Release branches (Release tagging) For each package we release there will be a unique git tag created that contains the name and the version of the package to mark the commit of the code that produced the package. This tag will be used for servicing via hotfix branches as well as debugging the code for a particular preview or stable release version. diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index 5a73bf5de883..bf750d6ee04a 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -262,7 +262,10 @@ function GetLinks([System.Uri]$pageUri) return $links; } - +Write-Host "There are $($urls.length) files." +foreach ($url in $urls) { + Write-Host "Sima: $url." +} if ($urls) { if ($urls.Count -eq 0) { Write-Host "Usage $($MyInvocation.MyCommand.Name) "; diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index f43678dc93a7..bd5ee32f93ec 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -162,10 +162,12 @@ jobs: ward scan -d $(Build.SourcesDirectory) -c $(Build.SourcesDirectory)/eng/.docsettings.yml displayName: 'Verify Readmes' - - template: ../../../common/pipelines/templates/steps/verify-links.yml - parameters: - Directory: sdk/${{ parameters.ServiceDirectory }} - CheckLinkGuidance: $true + - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - template: /eng/common/pipelines/templates/steps/verify-links.yml + parameters: + Directory: '' + Urls: (git diff origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH} HEAD --name-only -- *.md) + CheckLinkGuidance: $true - ${{ each artifact in parameters.Artifacts }}: - template: /eng/common/pipelines/templates/steps/verify-changelog.yml diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index 582443e2d028..1c419255bac0 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -99,6 +99,7 @@ If you would like to become an active contributor to this project please follow 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request + [logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK [jdk_link]: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable From ebd1b859471cf6f976cd660d9861e8a8cfc6d544 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Fri, 16 Oct 2020 10:31:52 -0700 Subject: [PATCH 2/3] Test on readme, and works fine --- README.md | 1 - eng/pipelines/templates/jobs/archetype-sdk-client.yml | 2 +- sdk/core/azure-core/README.md | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index d79f9602e202..c17e8b398a65 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,6 @@ Management libraries can be identified by namespaces that start with `azure-mgmt The master branch has the most recent code with new features and bug fixes. It does **not** represent latest released **GA** SDK. See [above](#Client-New-Releases) for latest **GA** release.
- ### Release branches (Release tagging) For each package we release there will be a unique git tag created that contains the name and the version of the package to mark the commit of the code that produced the package. This tag will be used for servicing via hotfix branches as well as debugging the code for a particular preview or stable release version. diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 6dacbcf82b0a..c915a0ad4dd8 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -166,7 +166,7 @@ jobs: - template: /eng/common/pipelines/templates/steps/verify-links.yml parameters: Directory: '' - Urls: (git diff origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH} HEAD --name-only -- *.md) + Urls: (git diff origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH} HEAD --name-only -- '*.md') CheckLinkGuidance: $true - ${{if ne(parameters.SDKType, 'data')}}: diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index 1c419255bac0..582443e2d028 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -99,7 +99,6 @@ If you would like to become an active contributor to this project please follow 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request - [logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK [jdk_link]: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable From 6c48b8683edb040d55ddcb6a12c5213f4f257b93 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Fri, 16 Oct 2020 10:33:53 -0700 Subject: [PATCH 3/3] remove testing changes --- eng/common/scripts/Verify-Links.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index bf750d6ee04a..5a73bf5de883 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -262,10 +262,7 @@ function GetLinks([System.Uri]$pageUri) return $links; } -Write-Host "There are $($urls.length) files." -foreach ($url in $urls) { - Write-Host "Sima: $url." -} + if ($urls) { if ($urls.Count -eq 0) { Write-Host "Usage $($MyInvocation.MyCommand.Name) ";