content stringlengths 1 103k ⌀ | path stringlengths 8 216 | filename stringlengths 2 179 | language stringclasses 15
values | size_bytes int64 2 189k | quality_score float64 0.5 0.95 | complexity float64 0 1 | documentation_ratio float64 0 1 | repository stringclasses 5
values | stars int64 0 1k | created_date stringdate 2023-07-10 19:21:08 2025-07-09 19:11:45 | license stringclasses 4
values | is_test bool 2
classes | file_hash stringlengths 32 32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
# Apply potential regression label on issues\nname: issue-regression-label\non:\n issues:\n types: [opened, edited]\njobs:\n add-regression-label:\n runs-on: ubuntu-latest\n permissions:\n issues: write\n steps:\n - name: Fetch template body\n id: check_regression\n uses: actions/github-script@v7\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n TEMPLATE_BODY: ${{ github.event.issue.body }}\n with:\n script: |\n const regressionPattern = /\[x\] Select this option if this issue appears to be a regression\./i;\n const template = `${process.env.TEMPLATE_BODY}`\n const match = regressionPattern.test(template);\n core.setOutput('is_regression', match);\n - name: Manage regression label\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n run: |\n if [ "${{ steps.check_regression.outputs.is_regression }}" == "true" ]; then\n gh issue edit ${{ github.event.issue.number }} --add-label "potential-regression" -R ${{ github.repository }}\n else\n gh issue edit ${{ github.event.issue.number }} --remove-label "potential-regression" -R ${{ github.repository }}\n fi\n | dataset_sample\yaml\aws_aws-sdk-php\.github\workflows\issue-regression-labeler.yml | issue-regression-labeler.yml | YAML | 1,240 | 0.8 | 0.0625 | 0.03125 | awesome-app | 785 | 2024-12-28T22:14:01.373647 | MIT | false | 4830444b8adb29a25a8044780bc7cd46 |
name: "Close stale issues"\n\n# Controls when the action will run.\non:\n schedule:\n - cron: "0 0 * * *"\n\npermissions: {}\njobs:\n cleanup:\n permissions:\n issues: write # to label, comment and close issues (aws-actions/stale-issue-cleanup)\n pull-requests: write # to label, comment and close pull requests (aws-actions/stale-issue-cleanup)\n\n runs-on: ubuntu-latest\n name: Stale issue job\n steps:\n - uses: aws-actions/stale-issue-cleanup@v6\n with:\n # Setting messages to an empty string will cause the automation to skip\n # that category\n ancient-issue-message: |\n We have noticed this issue has not recieved attention in 1 year. We will close this issue for now.\n If you think this is in error, please feel free to comment and reopen the issue.\n stale-issue-message: |\n This issue has not recieved a response in 1 week. If you want to keep this issue open, please just\n leave a comment below and auto-close will be canceled.\n\n # These labels are required\n stale-issue-label: closing-soon\n exempt-issue-labels: no-autoclose\n stale-pr-label: no-pr-activity\n exempt-pr-labels: awaiting-approval\n response-requested-label: response-requested\n\n # Don't set closed-for-staleness label to skip closing very old issues\n # regardless of label\n closed-for-staleness-label: closed-for-staleness\n\n # Issue timing\n days-before-stale: 10\n days-before-close: 4\n days-before-ancient: 36500\n\n # If you don't want to mark a issue as being ancient based on a\n # threshold of "upvotes", you can set this here. An "upvote" is\n # the total number of +1, heart, hooray, and rocket reactions\n # on an issue.\n minimum-upvotes-to-exempt: 10\n\n repo-token: ${{ secrets.GITHUB_TOKEN }}\n loglevel: DEBUG\n # Set dry-run to true to not perform label or close actions.\n # dry-run: true\n | dataset_sample\yaml\aws_aws-sdk-php\.github\workflows\stale_issues.yml | stale_issues.yml | YAML | 2,064 | 0.95 | 0.074074 | 0.282609 | vue-tools | 342 | 2024-09-19T00:25:02.348637 | Apache-2.0 | false | 1e43657377bff09785d9e44ea7487f76 |
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.\n\npipelines:\n '*':\n mainPipelineId: 1180\n retail:\n source:\n credscan:\n lastModifiedDate: 2024-08-07\n psscriptanalyzer:\n lastModifiedDate: 2024-08-07\n armory:\n lastModifiedDate: 2024-08-07\n binary:\n credscan:\n lastModifiedDate: 2024-08-20\n binskim:\n lastModifiedDate: 2024-08-20\n spotbugs:\n lastModifiedDate: 2024-08-20\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.config\1espt\PipelineAutobaseliningConfig.yml | PipelineAutobaseliningConfig.yml | YAML | 591 | 0.8 | 0.05 | 0.052632 | react-lib | 984 | 2024-06-21T11:37:22.032356 | Apache-2.0 | false | ca727b5c47f293a01ce0e301a58888d5 |
name: Bug report\ndescription: Create a report to help us improve\ntitle: "[BUG]"\n\nbody:\n - type: input\n id: library\n attributes:\n label: Library name and version\n description: Name and version of the Library package used\n placeholder: ex. Azure.Storage.Blobs 12.2.0\n validations:\n required: true\n - type: textarea\n id: background\n attributes:\n label: Describe the bug\n description: Please provide the description of issue you're seeing.\n placeholder: Description\n validations:\n required: true \n - type: textarea\n id: expected-behavior\n attributes:\n label: Expected behavior\n description: |\n Provide a description of the expected behavior.\n placeholder: Expected behavior\n validations:\n required: true\n - type: textarea\n id: actual-behavior\n attributes:\n label: Actual behavior\n description: |\n Provide a description of the actual behavior observed. If applicable please include any error messages, exception stacktraces or memory dumps.\n placeholder: Actual behavior\n validations:\n required: true\n - type: textarea\n id: repro-steps\n attributes:\n label: Reproduction Steps\n description: |\n Please include minimal steps to reproduce the problem if possible. E.g.: the smallest possible code snippet; or a small project, with steps to run it. If possible include text as text rather than screenshots (so it shows up in searches).\n placeholder: Minimal Reproduction\n validations:\n required: true\n - type: textarea\n id: environment\n attributes:\n label: Environment\n description: |\n Please provide more information on your environment:\n * Hosting platform or OS and .NET runtime version (`dotnet --info` output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]\n * IDE and version : [e.g. Visual Studio 16.3]\n placeholder: Environment\n validations:\n required: false | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\ISSUE_TEMPLATE\01_bug_report.yml | 01_bug_report.yml | YAML | 2,015 | 0.85 | 0.034483 | 0.034483 | react-lib | 521 | 2024-11-23T11:23:31.648742 | GPL-3.0 | false | fa9444172d3eb9132281db8107dda998 |
name: Feature request\ndescription: Suggest an idea for this project.\ntitle: "[FEATURE REQ]"\n\nbody:\n - type: input\n id: library\n attributes:\n label: Library name\n description: Name of the Library package\n placeholder: ex. Azure.Storage.Blobs\n validations:\n required: true\n - type: textarea\n id: background\n attributes:\n label: Please describe the feature.\n description: What feature would you like to get added? What problem is it solving?\n placeholder: Feature description\n validations:\n required: true | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\ISSUE_TEMPLATE\02_feature_request.yml | 02_feature_request.yml | YAML | 562 | 0.85 | 0.05 | 0 | awesome-app | 874 | 2024-06-07T13:42:20.265956 | BSD-3-Clause | false | 318ae7f086009128b108822bc1707016 |
name: Question/Query\ndescription: Use this template to file a question/query for the SDK team that are not bugs or feature requests.\ntitle: "[QUERY]"\n\nbody:\n - type: input\n id: library\n attributes:\n label: Library name and version\n description: Name and version of the Library package used\n placeholder: ex. Azure.Storage.Blobs 12.2.0\n validations:\n required: true\n - type: textarea\n id: background\n attributes:\n label: Query/Question\n description: How can we help?\n placeholder: Description\n validations:\n required: true\n - type: textarea\n id: environment\n attributes:\n label: Environment\n description: |\n Please provide more information on your environment:\n * Hosting platform or OS and .NET runtime version (`dotnet --info` output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]\n * IDE and version : [e.g. Visual Studio 16.3]\n placeholder: Environment\n validations:\n required: false\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\ISSUE_TEMPLATE\03_question.yml | 03_question.yml | YAML | 1,036 | 0.85 | 0.0625 | 0.064516 | react-lib | 512 | 2023-08-19T03:52:37.574558 | GPL-3.0 | false | 34e63ecb23d6198377907f74f0ba2e56 |
name: Core Feature Request\ndescription: Create a feature request for Azure.Core. Please note that this template is intended to be used by Azure SDK authors to request infrastructure features; for other requests, please [open a general issue](https://github.com/Azure/azure-sdk-for-net/issues/new/choose).\ntitle: "[Core] "\nlabels: ["Azure.Core", "client", "feature-request", "needs-team-triage"]\nassignees: ["christothes","annelo-msft","JoshLove-msft", "jsquire"]\n\nbody:\n - type: dropdown\n id: apichange\n attributes:\n label: API Change Needed\n description: Is a public API change needed for this feature?\n options:\n - "Yes"\n - "No"\n - "Unsure"\n validations:\n required: true\n - type: textarea\n id: background\n attributes:\n label: Background and motivation\n description: Please describe the purpose and value of the new feature and/or API here.\n placeholder: Purpose\n validations:\n required: true\n - type: textarea\n id: api-proposal\n attributes:\n label: API / Feature Proposal\n description: |\n Please provide the specific public API signature diff that you are proposing and/or proposed feature designs. Include a link to Api View if one exists. ```\n placeholder: API declaration (no method bodies)\n value: |\n ```C#\n namespace Azure.Core\n {\n public class MyFancyCollection<T> : IEnumerable<T>\n {\n public void Fancy(T item);\n }\n }\n ```\n validations:\n required: true\n - type: textarea\n id: constraints\n attributes:\n label: Time Constraints and Dependencies\n description: Please outline any relevant deadline dates related to this feature. Please also list any client libraries that will consume these changes and describe the scenario this enables.```\n placeholder: This feature is a dependency for Azure.Foo.Bar to Release in October 2023.\n validations:\n required: true\n - type: textarea\n id: stakeholders\n attributes:\n label: Stakeholders\n description: Please tag any parties that are stakeholders in this feature\n placeholder: GitHub handles eg. @johndoe , @sallymae\n validations:\n required: false\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\ISSUE_TEMPLATE\04_core_feature_request.yml | 04_core_feature_request.yml | YAML | 2,264 | 0.95 | 0.114754 | 0 | awesome-app | 754 | 2024-08-05T01:03:21.325801 | GPL-3.0 | false | 96deb3a1e75ac8e752046e16b179a428 |
name: MQ Improvements Tracker\ndescription: Use this template to track improvements.\ntitle: "[MQ][Issue]"\nlabels: ["MQ", "Client"]\nassignees:\n - pallavit\nbody:\n- type: textarea\n id: description\n attributes:\n label: Information\n validations:\n required: true\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\ISSUE_TEMPLATE\05_mqissue.yml | 05_mqissue.yml | YAML | 266 | 0.85 | 0 | 0 | react-lib | 13 | 2024-07-05T09:52:00.506681 | GPL-3.0 | false | 024c94fd4790fd362a93e5b8973de728 |
name: learn.microsoft.com feedback control\ndescription: |\n ⛔ Don't use this template directly. Instead, click the feedback option at the bottom of a learn.microsoft.com page. ⛔\nbody:\n - type: markdown\n attributes:\n value: "## Issue information"\n - type: markdown\n attributes:\n value: Select the issue type, and describe the issue in the text box below. Add as much detail as needed to help us resolve the issue.\n - type: dropdown\n id: issue-type\n attributes:\n label: Type of issue\n options:\n - Typo\n - Code doesn't work\n - Missing information\n - Outdated article\n - Other (describe below)\n validations:\n required: true\n - type: textarea\n id: feedback\n validations:\n required: true\n attributes:\n label: Description\n - type: markdown\n attributes:\n value: "## 🚧 Article information 🚧"\n - type: markdown\n attributes:\n value: "*Don't modify the following fields*. They are automatically filled in for you. Doing so will disconnect your issue from the affected article."\n - type: input\n id: pageUrl\n validations:\n required: true\n attributes:\n label: Page URL\n - type: input\n id: contentSourceUrl\n validations:\n required: true\n attributes:\n label: Content source URL\n - type: input\n id: documentVersionIndependentId\n validations:\n required: true\n attributes:\n label: Document Version Independent Id\n - type: input\n id: platformId\n validations:\n required: true\n attributes:\n label: Platform Id\n - type: input\n id: author\n validations:\n required: true\n attributes:\n label: Article author\n - type: textarea\n id: metadata\n validations:\n required: false\n attributes:\n label: Metadata\n description: >-\n Documentation metadata will be applied here for the PRMerger tool\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\ISSUE_TEMPLATE\06_learn_feedback.yml | 06_learn_feedback.yml | YAML | 1,915 | 0.95 | 0.027778 | 0 | python-kit | 932 | 2024-03-03T16:30:19.667867 | GPL-3.0 | false | 42a14af86c637d9c4a61b667042177a9 |
name: GitHub Event Processor\n\non:\n issues:\n types: [edited, labeled, opened, reopened, unlabeled]\n # issue_comment is used for both issues and pull_requests\n # github.event.issue.pull_request will be non-null on pull request comments\n issue_comment:\n types: [created]\n # synchronize is the pull_request_target event when changes are pushed\n # pull request merged is the closed event with github.event.pull_request.merged = true\n pull_request_target:\n types: [closed, labeled, opened, reopened, review_requested, synchronize, unlabeled]\n\n# This removes all unnecessary permissions, the ones needed will be set below.\n# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token\npermissions: {}\n\njobs:\n # This event requires the Azure CLI to get the LABEL_SERVICE_API_KEY from the vault.\n # Because the azure/login step adds time costly pre/post Az CLI commands to any every job\n # it's used in, split this into its own job so only the event that needs the Az CLI pays\n # the cost.\n event-handler-with-azure:\n permissions:\n issues: write\n pull-requests: write\n # For OIDC auth\n id-token: write\n contents: read\n name: Handle ${{ github.event_name }} ${{ github.event.action }} event with azure login\n runs-on: ubuntu-latest\n if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}\n steps:\n - name: 'Az CLI login'\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n\n - name: 'Run Azure CLI commands'\n run: |\n LABEL_SERVICE_API_KEY=$(az keyvault secret show \\n --vault-name issue-labeler \\n -n issue-labeler-func-key \\n -o tsv \\n --query value)\n\n echo "::add-mask::$LABEL_SERVICE_API_KEY"\n echo "LABEL_SERVICE_API_KEY=$LABEL_SERVICE_API_KEY" >> $GITHUB_ENV\n\n # To run github-event-processor built from source, for testing purposes, uncomment everything\n # in between the Start/End-Build From Source comments and comment everything in between the\n # Start/End-Install comments\n # Start-Install\n - name: Install GitHub Event Processor\n run: >\n dotnet tool install\n Azure.Sdk.Tools.GitHubEventProcessor\n --version 1.0.0-dev.20250314.4\n --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json\n --global\n shell: bash\n # End-Install\n\n # Testing checkout of sources from the Azure/azure-sdk-tools repository\n # The ref: is the SHA from the pull request in that repository or the\n # refs/pull/<PRNumber>/merge for the latest on any given PR. If the repository\n # is a fork eg. <User>/azure-sdk-tools then the repository down below will\n # need to point to that fork\n # Start-Build\n # - name: Checkout tools repo for GitHub Event Processor sources\n # uses: actions/checkout@v3\n # with:\n # repository: Azure/azure-sdk-tools\n # path: azure-sdk-tools\n # ref: <refs/pull/<PRNumber>/merge> or <sha>\n\n # - name: Build and install GitHubEventProcessor from sources\n # run: |\n # dotnet pack\n # dotnet tool install --global --prerelease --add-source ../../../artifacts/packages/Debug Azure.Sdk.Tools.GitHubEventProcessor\n # shell: bash\n # working-directory: azure-sdk-tools/tools/github-event-processor/Azure.Sdk.Tools.GitHubEventProcessor\n # End-Build\n\n - name: Process Action Event\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }}\n shell: bash\n env:\n # This is a temporary secret generated by github\n # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n LABEL_SERVICE_API_KEY: ${{ env.LABEL_SERVICE_API_KEY }}\n\n - name: Archive github event data\n uses: actions/upload-artifact@v4\n if: always()\n with:\n name: event\n path: ${{ github.event_path }}\n\n event-handler:\n permissions:\n issues: write\n pull-requests: write\n name: Handle ${{ github.event_name }} ${{ github.event.action }} event\n runs-on: ubuntu-latest\n if: ${{ github.event_name != 'issues' || github.event.action != 'opened' }}\n steps:\n # To run github-event-processor built from source, for testing purposes, uncomment everything\n # in between the Start/End-Build From Source comments and comment everything in between the\n # Start/End-Install comments\n # Start-Install\n - name: Install GitHub Event Processor\n run: >\n dotnet tool install\n Azure.Sdk.Tools.GitHubEventProcessor\n --version 1.0.0-dev.20250314.4\n --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json\n --global\n shell: bash\n # End-Install\n\n # Testing checkout of sources from the Azure/azure-sdk-tools repository\n # The ref: is the SHA from the pull request in that repository or the\n # refs/pull/<PRNumber>/merge for the latest on any given PR. If the repository\n # is a fork eg. <User>/azure-sdk-tools then the repository down below will\n # need to point to that fork\n # Start-Build\n # - name: Checkout tools repo for GitHub Event Processor sources\n # uses: actions/checkout@v3\n # with:\n # repository: Azure/azure-sdk-tools\n # path: azure-sdk-tools\n # ref: <refs/pull/<PRNumber>/merge> or <sha>\n\n # - name: Build and install GitHubEventProcessor from sources\n # run: |\n # dotnet pack\n # dotnet tool install --global --prerelease --add-source ../../../artifacts/packages/Debug Azure.Sdk.Tools.GitHubEventProcessor\n # shell: bash\n # working-directory: azure-sdk-tools/tools/github-event-processor/Azure.Sdk.Tools.GitHubEventProcessor\n # End-Build\n\n - name: Process Action Event\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }}\n shell: bash\n env:\n # This is a temporary secret generated by github\n # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Archive github event data\n uses: actions/upload-artifact@v4\n if: always()\n with:\n name: event\n path: ${{ github.event_path }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\workflows\event-processor.yml | event-processor.yml | YAML | 6,831 | 0.95 | 0.08642 | 0.428571 | vue-tools | 920 | 2023-10-21T10:45:45.902340 | Apache-2.0 | false | 8abe044f8aa9d09dffff7f9f2cbbe508 |
# NOTE: currently azure-sdk-actions only hosts check enforcer code.\n# If further functionality is added, this name should be updated to reflect\n# the more generic behavior\nname: Check Enforcer\n\non:\n check_suite:\n types: [completed]\n issue_comment:\n types: [created]\n\npermissions: {}\n\njobs:\n event-handler:\n permissions:\n statuses: write # to set status (azure/azure-sdk-actions)\n pull-requests: write # to read pull requests and write comments (azure/azure-sdk-actions)\n checks: read # to read check status (azure/azure-sdk-actions)\n name: Handle ${{ github.event_name }} ${{ github.event.action }} event\n runs-on: ubuntu-latest # This image is intentionally set to "latest", and not to a specific version\n steps:\n - uses: azure/azure-sdk-actions@main\n with:\n token: ${{ secrets.GITHUB_TOKEN }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\workflows\event.yml | event.yml | YAML | 852 | 0.95 | 0 | 0.136364 | awesome-app | 979 | 2024-01-07T22:32:15.561805 | Apache-2.0 | false | 2e111aae6f9a59224c26090b6a972e7a |
name: After APIView\n\non:\n check_run:\n types: [completed]\n \npermissions:\n pull-requests: write\n contents: read\n\njobs:\n post-apiview:\n name: After APIView\n runs-on: ubuntu-24.04\n if: |\n github.event.check_run.check_suite.app.name == 'Azure Pipelines' && (\n contains(github.event.check_run.name, 'Build Build') ||\n contains(github.event.check_run.name, 'Build Analyze') )\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n with:\n sparse-checkout: 'eng/common'\n \n - name: Create APIView Comment on PR\n run: |\n . "eng/common/scripts/Helpers/ApiView-Helpers.ps1"\n Set-ApiViewCommentForRelatedIssues -HeadCommitish ${{ github.event.check_run.head_sha }} -AuthToken ${{ secrets.GITHUB_TOKEN }}\n shell: pwsh\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\workflows\post-apiview.yml | post-apiview.yml | YAML | 807 | 0.7 | 0.034483 | 0 | vue-tools | 73 | 2024-08-31T23:41:38.971657 | Apache-2.0 | false | 03ee216e9fac94a483687fe7ac3ab7d1 |
name: GitHub Scheduled Event Processor\n\non:\n schedule:\n # These are generated/confirmed using https://crontab.cronhub.io/\n # Close stale issues, runs every day at 1am - CloseStaleIssues\n - cron: '0 1 * * *'\n # Identify stale pull requests, every Friday at 5am - IdentifyStalePullRequests\n - cron: '0 5 * * FRI'\n # Close stale pull requests, every 6 hours at 02:30 AM, 08:30 AM, 02:30 PM and 08:30 PM - CloseStalePullRequests\n - cron: '30 2,8,14,20 * * *'\n # Identify stale issues, every 6 hours at 03:30 AM, 09:30 AM, 03:30 PM and 09:30 PM - IdentifyStaleIssues\n - cron: '30 3,9,15,21 * * *'\n # Close addressed issues, every 6 hours at 04:30 AM, 10:30 AM, 04:30 PM and 10:30 PM - CloseAddressedIssues\n - cron: '30 4,10,16,22 * * *'\n # Lock closed issues, every 6 hours at 05:30 AM, 11:30 AM, 05:30 PM and 11:30 PM - LockClosedIssues\n - cron: '30 5,11,17,23 * * *'\n # Enforce max life of issues, every M,W,F at 10:00 AM PST - EnforceMaxLifeOfIssues\n # Note: GitHub uses UTC, to run at 10am PST, the cron task needs to be 6pm (1800 hours) UTC\n # When scheduling for multiple days the numeric days 0-6 (0=Sunday) must be used.\n - cron: '0 18 * * 1,3,5'\n# This removes all unnecessary permissions, the ones needed will be set below.\n# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token\npermissions: {}\n\njobs:\n event-handler:\n permissions:\n issues: write\n pull-requests: write\n name: Handle ${{ github.event.schedule }} ${{ github.event.action }} event\n runs-on: ubuntu-latest\n steps:\n # To run github-event-processor built from source, for testing purposes, uncomment everything\n # in between the Start/End-Build From Source comments and comment everything in between the\n # Start/End-Install comments\n # Start-Install\n - name: Install GitHub Event Processor\n run: >\n dotnet tool install\n Azure.Sdk.Tools.GitHubEventProcessor\n --version 1.0.0-dev.20250314.4\n --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json\n --global\n shell: bash\n # End-Install\n\n # Testing checkout of sources from the Azure/azure-sdk-tools repository\n # The ref: is the SHA from the pull request in that repository or the\n # refs/pull/<PRNumber>/merge for the latest on any given PR. If the repository\n # is a fork eg. <User>/azure-sdk-tools then the repository down below will\n # need to point to that fork\n # Start-Build\n # - name: Checkout tools repo for GitHub Event Processor sources\n # uses: actions/checkout@v3\n # with:\n # repository: Azure/azure-sdk-tools\n # path: azure-sdk-tools\n # ref: <refs/pull/<PRNumber>/merge> or <sha>\n\n # - name: Build and install GitHubEventProcessor from sources\n # run: |\n # dotnet pack\n # dotnet tool install --global --prerelease --add-source ../../../artifacts/packages/Debug Azure.Sdk.Tools.GitHubEventProcessor\n # shell: bash\n # working-directory: azure-sdk-tools/tools/github-event-processor/Azure.Sdk.Tools.GitHubEventProcessor\n # End-Build\n\n - name: Close Stale Issues Scheduled Event\n if: github.event.schedule == '0 1 * * *'\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseStaleIssues\n shell: bash\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Identify Stale PullRequests Scheduled Event\n if: github.event.schedule == '0 5 * * FRI'\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }} IdentifyStalePullRequests\n shell: bash\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Close Stale PullRequests Scheduled Event\n if: github.event.schedule == '30 2,8,14,20 * * *'\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseStalePullRequests\n shell: bash\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Identify Stale Issues Scheduled Event\n if: github.event.schedule == '30 3,9,15,21 * * *'\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }} IdentifyStaleIssues\n shell: bash\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Close Addressed Issues Scheduled Event\n if: github.event.schedule == '30 4,10,16,22 * * *'\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseAddressedIssues\n shell: bash\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Lock Closed Issues Scheduled Event\n if: github.event.schedule == '30 5,11,17,23 * * *'\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }} LockClosedIssues\n shell: bash\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Enforce Max Life of Issues Scheduled Event\n if: github.event.schedule == '0 18 * * 1,3,5'\n run: |\n github-event-processor ${{ github.event_name }} ${{ github.event_path }} EnforceMaxLifeOfIssues\n shell: bash\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Archive github event data\n uses: actions/upload-artifact@v4\n if: always()\n with:\n name: event\n path: ${{ github.event_path }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\.github\workflows\scheduled-event-processor.yml | scheduled-event-processor.yml | YAML | 5,642 | 0.8 | 0.107692 | 0.305085 | python-kit | 840 | 2023-10-26T00:24:57.061703 | Apache-2.0 | false | ae556af31973184d26f9030470dee2fb |
omitted_paths:\n - archive/*\n - common/Perf/*\n - common/SmokeTests/*\n - common/Stress/*\n - doc/ApiDocGeneration/*\n - Documentation/*\n - eng/*\n - samples/*\n - sdk/*/*.Management.*/*\n - sdk/*/*/perf/*\n - sdk/*/*/stress/*\n - sdk/*/*/integration/*\n - sdk/*/*/tests/Samples/*\n - sdk/*/*/tests/samples/*\n - sdk/*/*/samples/*\n - sdk/*/samples/*\n - sdk/*/swagger/*\n - sdk/*mgmt*/*\n - sdk/resourcemanager/*\n - src/*\n - tools/*\n - sdk/**/tools/*\n\nlanguage: net\nroot_check_enabled: True\n\nrequired_readme_sections:\n - "Azure .+ client library for .NET"\n - "^Getting started$":\n - Install the [Pp]ackage\n - Prerequisites\n - Authenticate the [Cc]lient\n - ^Key concepts$\n - ^Examples$\n - ^Troubleshooting$\n - ^Next steps$\n - ^Contributing$\n\nknown_presence_issues:\n - ['sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query','Track 1']\n - ['sdk/attestation/Microsoft.Azure.Attestation','Track 1']\n - ['sdk/batch/Microsoft.Azure.Batch.FileStaging','Track 1']\n - ['sdk/batch/Microsoft.Azure.Batch/Tools','Track 1']\n - ['sdk/cognitiveservices/AnomalyDetector','Track 1']\n - ['sdk/cognitiveservices/Knowledge.QnAMaker','Track 1']\n - ['sdk/cognitiveservices/Language.LUIS.Authoring','Track 1']\n - ['sdk/cognitiveservices/Language.LUIS.Runtime','Track 1']\n - ['sdk/cognitiveservices/Language.SpellCheck','Track 1']\n - ['sdk/cognitiveservices/Language.TextAnalytics','Track 1']\n - ['sdk/cognitiveservices/Personalizer','Track 1']\n - ['sdk/cognitiveservices/Search.BingAutoSuggest','Track 1']\n - ['sdk/cognitiveservices/Search.BingCustomImageSearch','Track 1']\n - ['sdk/cognitiveservices/Search.BingCustomSearch','Track 1']\n - ['sdk/cognitiveservices/Search.BingEntitySearch/','Track 1']\n - ['sdk/cognitiveservices/Search.BingImageSearch/','Track 1']\n - ['sdk/cognitiveservices/Search.BingLocalSearch/','Track 1']\n - ['sdk/cognitiveservices/Search.BingNewsSearch','Track 1']\n - ['sdk/cognitiveservices/Search.BingVideoSearch','Track 1']\n - ['sdk/cognitiveservices/Search.BingVisualSearch','Track 1']\n - ['sdk/cognitiveservices/Search.BingWebSearch','Track 1']\n - ['sdk/cognitiveservices/Vision.ComputerVision','Track 1']\n - ['sdk/cognitiveservices/Vision.ContentModerator','Track 1']\n - ['sdk/cognitiveservices/Vision.CustomVision.Prediction','Track 1']\n - ['sdk/cognitiveservices/Vision.CustomVision.Training','Track 1']\n - ['sdk/cognitiveservices/Vision.Face','Track 1']\n - ['sdk/containerregistry/Microsoft.Azure.ContainerRegistry','Track 1']\n - ['sdk/eventgrid/Microsoft.Azure.EventGrid','Track 1']\n - ['sdk/eventhub/Microsoft.Azure.EventHubs.Processor','Track 1']\n - ['sdk/eventhub/Microsoft.Azure.EventHubs.ServiceFabricProcessor','Track 1']\n - ['sdk/graphrbac/Microsoft.Azure.Graph.RBAC','Track 1']\n - ['sdk/hdinsight/Microsoft.Azure.HDInsight.Job','Track 1']\n - ['sdk/keyvault/Microsoft.Azure.KeyVault.Core','Track 1']\n - ['sdk/keyvault/Microsoft.Azure.KeyVault.Cryptography','Track 1']\n - ['sdk/keyvault/Microsoft.Azure.KeyVault.Extensions','Track 1']\n - ['sdk/keyvault/Microsoft.Azure.KeyVault.WebKey','Track 1']\n - ['sdk/operationalinsights/Microsoft.Azure.OperationalInsights','Track 1']\n - ['sdk/search/Microsoft.Azure.Search.Common','Track 1']\n - ['sdk/search/Microsoft.Azure.Search.Data','Track 1']\n - ['sdk/search/Microsoft.Azure.Search.Service','Track 1']\n - ['sdk/operationalinsights/Microsoft.Azure.OperationalInsights','Track 1']\n - ['sdk/search/Microsoft.Azure.Search','Track 1']\n - ['sdk/search/Microsoft.Azure.Search.Common/CHANGELOG.md','Track 1']\n - ['sdk/search/Microsoft.Azure.Search.Data/CHANGELOG.md','Track 1']\n - ['sdk/search/Microsoft.Azure.Search.Service/CHANGELOG.md','Track 1']\n\n - ['sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator','https://github.com/Azure/azure-sdk-tools/issues/2444']\n - ['sdk/provisioning/Generator','Not a package']\n\nknown_content_issues:\n - ['sdk/batch/Microsoft.Azure.Batch.Conventions.Files/README.md','Track 1']\n - ['sdk/batch/Microsoft.Azure.Batch/README.md','Track 1']\n - ['sdk/cognitiveservices/FormRecognizer/README.md','Track 1']\n - ['sdk/cognitiveservices/Language.TextAnalytics/src/README.md','Track 1']\n - ['sdk/cognitiveservices/Personalizer/src/README.md','Track 1']\n - ['sdk/eventhub/Microsoft.Azure.EventHubs/README.md','Track 1']\n - ['sdk/keyvault/Microsoft.Azure.KeyVault/README.md','Track 1']\n - ['sdk/servicebus/Microsoft.Azure.ServiceBus/README.md','Track 1']\n - ['sdk/synapse/Microsoft.Azure.Synapse/README.md','Track 1']\n\n - ['README.md','Not a package: azure-sdk-tools/issues/42']\n - ['doc/README.md','Not a package: azure-sdk-tools/issues/42']\n - ['sdk/appconfiguration/README.md','azure-sdk-tools/issues/42']\n - ['sdk/eventgrid/README.md','Not a package: azure-sdk-tools/issues/42']\n - ['sdk/eventhub/README.md','Not a package: azure-sdk-tools/issues/42']\n - ['sdk/extensions/README.md','Not a package: azure-sdk-tools/issues/42']\n - ['sdk/personalizer/README.md','Not a package: azure-sdk-tools/issues/42']\n - ['sdk/provisioning/README.md','Not a package: azure-sdk-tools/issues/42']\n - ['sdk/search/README.md','Not a package: azure-sdk-tools/issues/42']\n - ['sdk/storage/README.md','Not a package: azure-sdk-tools/issues/42']\n\n - ['sdk/core/Azure.Core.Amqp/README.md', 'Opt out of sections: https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/core/Azure.Core.Experimental/README.md', 'Opt out of sections: https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/core/Azure.Core.TestFramework/README.md', 'Opt out of sections: https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/core/Azure.Core/README.md', 'Opt out of sections: https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/core/Azure.Core.Expressions.DataFactory/README.md', 'Opt out of sections: https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/core/Microsoft.Azure.Core.Spatial/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/core/System.ClientModel/README.md', 'Opt out of sections: https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404', 'Missing section: Azure .+ client library for .NET']\n - ['sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/README.md','https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/eventhub/Azure.Messaging.EventHubs.Shared/README.md','https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/eventhub/Azure.Messaging.EventHubs.Experimental/README.md','https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/README.md', 'azure-sdk-tools/issues/404']\n - ['sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/README.md','azure-sdk-tools/issues/404']\n - ['sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/README.md','azure-sdk-tools/issues/404']\n - ['sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/README.md','azure-sdk-tools/issues/404']\n - ['sdk/extensions/Microsoft.Extensions.Azure/README.md','azure-sdk-tools/issues/404']\n - ['sdk/storage/Azure.Storage.Common/README.md','azure-sdk-tools/issues/404']\n - ['sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/README.md','https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/webpubsub/Azure.Messaging.WebPubSub/README.md', 'azure-sdk-tools/issues/404 - requires different name for auth section']\n - ['sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/README.md', 'Opt out of sections: https://github.com/Azure/azure-sdk-tools/issues/404']\n\n - ['sdk/anomalydetector/Azure.AI.AnomalyDetector/README.md', '#25936: Needs Examples']\n - ['sdk/personalizer/Azure.AI.Personalizer/README.md','#24535: Needs content']\n - ['sdk/storage/Azure.Storage.Files.DataLake/README.md', 'Storage: #11492: Needs auth section']\n - ['sdk/storage/Azure.Storage.Files.Shares/README.md', 'Storage: #11492: Needs auth section']\n\n - ['sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n \n - ['sdk/provisioning/Azure.Provisioning.AppService/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.Sql/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.ServiceBus/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.Redis/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.EventGrid/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.SignalR/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.OperationalInsights/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.Storage/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.CosmosDB/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.EventHubs/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.CognitiveServices/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.WebPubSub/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.PostgreSql/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.AppContainers/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.KeyVault/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.ContainerRegistry/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.AppConfiguration/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.Search/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.Kubernetes/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.Communication/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.ApplicationInsights/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.ContainerService/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n - ['sdk/provisioning/Azure.Provisioning.Deployment/README.md', 'https://github.com/Azure/azure-sdk-tools/issues/404']\n\n# .net climbs upwards. placing these to prevent assigning readmes to the wrong project\npackage_indexing_exclusion_list:\n - 'AutoRest-AzureDotNetSDK'\n - 'NetCoreTestPublish'\n - 'ObjectModelCodeGenerator'\n - 'CodeGenerationLibrary'\n - 'ProxyLayerParser'\n - 'IntegrationTestCommon'\n - 'Azure.Template'\n - 'SampleSDKTestPublish'\n - 'CSProjTestPublish'\n - 'ConfigureAwaitAnalyzer'\n - 'Microsoft.WindowsAzure.Build.Tasks'\n - 'Microsoft.Azure.Services.AppAuthentication.TestCommon'\n - 'RP2_Sdk'\n - 'RP1_MgmtPlane'\n - 'RP1_DataPlane'\n - 'Gallery'\n - 'Intune'\n - 'Common'\n - 'SnippetGenerator'\n - 'docgen'\npackage_indexing_traversal_stops:\n - 'sdk/'\n - 'src/SDKs/'\n - 'src/SdkCommon/'\n - 'src/AzureStack/'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\.docsettings.yml | .docsettings.yml | YAML | 12,269 | 0.95 | 0.015385 | 0.005435 | node-utils | 810 | 2024-09-14T04:35:54.001376 | BSD-3-Clause | false | 24ec4fdeeeea25ee02f43b0c1c8167c4 |
# Lint the CODEOWNERS file for a given repository and filter out baseline errors\n# Note: Due to the nature of the verifications, which includes source paths/globs\n# for the repository, this pipeline cannot use sparse-checkout.\ntrigger: none\n\npr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n paths:\n include:\n - .github/CODEOWNERS\n - .github/CODEOWNERS_baseline_errors.txt\n - eng/common/pipelines/codeowners-linter.yml\n\nstages:\n- stage: Run\n variables:\n skipComponentGovernanceDetection: true\n nugetMultiFeedWarnLevel: 'none'\n baseBranchBaseline: ''\n\n jobs:\n - job: Run\n timeoutInMinutes: 120\n pool:\n name: azsdk-pool-mms-ubuntu-2204-general\n vmImage: ubuntu-22.04\n\n variables:\n CodeownersLinterVersion: '1.0.0-dev.20240926.2'\n DotNetDevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"\n RepoLabelUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/repository-labels-blob"\n TeamUserUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/azure-sdk-write-teams-blob"\n UserOrgUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/user-org-visibility-blob"\n\n steps:\n - task: DotNetCoreCLI@2\n displayName: 'Install CodeownersLinter'\n inputs:\n command: custom\n custom: 'tool'\n arguments: 'install --global --add-source "$(DotNetDevOpsFeed)" --version "$(CodeownersLinterVersion)" "Azure.Sdk.Tools.CodeownersLinter"'\n workingDirectory: '$(Build.SourcesDirectory)/eng/common'\n\n - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:\n - pwsh: |\n Write-Host "git checkout $ENV:SYSTEM_PULLREQUEST_TARGETBRANCH"\n git checkout $ENV:SYSTEM_PULLREQUEST_TARGETBRANCH\n displayName: Checkout the base branch\n\n - pwsh: |\n # Generate the base branch baseline file to the Build.BinariesDirectory. This will create\n # a baseline error file against the CODEOWNERS in the base branch\n $baseBranchBaselineFile = "$(Build.BinariesDirectory)/CODEOWNERS_BaseBranch_Baseline_errors.txt"\n Write-Host "codeowners-linter --repoRoot $(Build.SourcesDirectory) --repoName $(Build.Repository.Name) -gbl -rUri ""$(RepoLabelUri)"" -tUri ""$(TeamUserUri)"" -uUri ""$(UserOrgUri)"" -bbf ""$baseBranchBaselineFile"""\n codeowners-linter --repoRoot $(Build.SourcesDirectory) --repoName $(Build.Repository.Name) -gbl -rUri "$(RepoLabelUri)" -tUri "$(TeamUserUri)" -uUri "$(UserOrgUri)" -bbf "$baseBranchBaselineFile"\n echo "##vso[task.setvariable variable=baseBranchBaseline]$baseBranchBaselineFile"\n displayName: 'Generate baseline file for base branch'\n workingDirectory: '$(Build.SourcesDirectory)/eng/common'\n\n - pwsh: |\n Write-Host "git checkout refs/remotes/pull/$ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/merge"\n git checkout refs/remotes/pull/$ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/merge\n displayName: Checkout the PR branch\n\n - pwsh: |\n # In the case of a PR, the baseBranchBaseline will be set which will be used to further filter results.\n # For scheduled runs, the baseBranchBaseline won't be set and only the existing baseline file will be used to filter\n Write-Host "codeowners-linter --repoRoot $(Build.SourcesDirectory) --repoName $(Build.Repository.Name) -fbl -rUri ""$(RepoLabelUri)"" -tUri ""$(TeamUserUri)"" -uUri ""$(UserOrgUri)"" -bbf ""$(baseBranchBaseline)"""\n codeowners-linter --repoRoot $(Build.SourcesDirectory) --repoName $(Build.Repository.Name) -fbl -rUri "$(RepoLabelUri)" -tUri "$(TeamUserUri)" -uUri "$(UserOrgUri)" -bbf "$(baseBranchBaseline)"\n displayName: 'Lint CODEOWNERS and filter using baseline'\n workingDirectory: '$(Build.SourcesDirectory)/eng/common'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\codeowners-linter.yml | codeowners-linter.yml | YAML | 3,983 | 0.8 | 0.065789 | 0.104478 | python-kit | 340 | 2023-11-26T12:52:08.581340 | Apache-2.0 | false | 99b33538512f9aee195a5c40bf979c61 |
parameters:\n# Pool to use for the pipeline stages\n- name: Pool\n type: object\n default:\n name: $(LINUXPOOL)\n image: $(LINUXVMIMAGE)\n os: linux\n\n# Whether to build alpha versions of the packages. This is passed as a flag to the build script.\n- name: BuildPrereleaseVersion\n type: boolean\n default: true\n\n# Whether to use the `next` version of TypeSpec. This is passed as a flag to the initialize script.\n- name: UseTypeSpecNext\n type: boolean\n default: false\n\n# Custom steps to run after the repository is cloned but before other job steps.\n- name: InitializationSteps\n type: stepList\n default: []\n\n# Indicates the build matrix to use for post-build autorest validation\n- name: TestMatrix\n type: object\n default: {}\n\n# Whether to run the publish and regeneration stages. If false, only the build stage will run.\n- name: ShouldPublish\n type: boolean\n default: false\n\n# Whether to publish to npmjs.org.\n- name: PublishPublic\n type: boolean\n default: true\n\n# Whether the built packages contain nuget packages. If true, the publish stage will publish the nuget packages to the internal nuget feed.\n- name: HasNugetPackages\n type: boolean\n default: false\n\n# Indicates if the Publish stage should depend on the Test stage\n- name: PublishDependsOnTest\n type: boolean\n default: false\n\n# Whether to regenerate sdk clients using the new emitter.\n- name: ShouldRegenerate\n type: boolean\n default: false\n\n# Number of jobs to generate. This is the maximum number of jobs that will be generated. The actual number of jobs will be reduced if it would result in fewer than MinimumPerJob packages per job.\n- name: RegenerationJobCount\n type: number\n default: 10\n\n# Minimum number of packages to generate per job.\n- name: MinimumPerJob\n type: number\n default: 10\n\n# Indicates if regeneration matrix should only contain folders with typespec files\n- name: OnlyGenerateTypespec\n type: boolean\n default: false\n\n# Paths to sparse checkout\n- name: SparseCheckoutPaths\n type: object\n default: []\n\n# The path to the emitter package json file.\n- name: EmitterPackageJsonOutputPath\n type: string\n default: "eng/emitter-package.json"\n\n# The relative path to the emitter package.\n- name: EmitterPackagePath\n type: string\n\nextends:\n template: /eng/pipelines/templates/stages/1es-redirect.yml\n parameters:\n stages:\n # Build stage\n # Responsible for building the autorest generator and typespec emitter packages\n # Produces the artifact `build_artifacts` which contains the following:\n # package-versions.json: Contains a map of package name to version for the packages that were built\n # overrides.json: Contains npm package version overrides for the emitter and generator\n # packages/: Contains the packages to publish\n # lock-files/: Contains package.json and package-lock.json files for use in the test stage to ensure tests are run against the correct dependency versions\n - stage: Build\n pool: ${{ parameters.Pool }}\n jobs:\n - job: Build\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths: ${{ parameters.SparseCheckoutPaths }}\n\n - ${{ parameters.InitializationSteps }}\n\n # Initialize-WorkingDirectory.ps1 is responsible for setting the emitterVersion output variable.\n - task: PowerShell@2\n displayName: 'Run initialize script'\n name: initialize\n inputs:\n pwsh: true\n filePath: $(Build.SourcesDirectory)/eng/scripts/typespec/Initialize-WorkingDirectory.ps1\n ${{ if parameters.BuildPrereleaseVersion }}:\n arguments: >\n -PrereleaseSuffix "-alpha.$(Build.BuildNumber)"\n -OutputDirectory "$(Build.ArtifactStagingDirectory)"\n -UseTypeSpecNext:$${{ parameters.UseTypeSpecNext }}\n -EmitterPackagePath:${{ parameters.EmitterPackagePath }}\n ${{ else }}:\n arguments: >\n -OutputDirectory "$(Build.ArtifactStagingDirectory)"\n -UseTypeSpecNext:$${{ parameters.UseTypeSpecNext }}\n -EmitterPackagePath:${{ parameters.EmitterPackagePath }}\n\n - task: PowerShell@2\n displayName: 'Run build script'\n inputs:\n pwsh: true\n filePath: $(Build.SourcesDirectory)/eng/scripts/typespec/Build-Emitter.ps1\n arguments: >\n -OutputDirectory "$(Build.ArtifactStagingDirectory)/packages"\n -TargetNpmJsFeed:$${{ parameters.PublishPublic }}\n -EmitterPackagePath:${{ parameters.EmitterPackagePath }}\n -GeneratorVersion: $(initialize.emitterVersion)\n\n - pwsh: |\n $sourceBranch = '$(Build.SourceBranch)'\n $buildReason = '$(Build.Reason)'\n $buildNumber = '$(Build.BuildNumber)'\n\n if ($buildReason -eq 'Schedule') {\n $branchName = 'validate-typespec-scheduled'\n } elseif ($sourceBranch -match "^refs/pull/(\d+)/(head|merge)$") {\n $branchName = "validate-typespec-pr-$($Matches[1])"\n } else {\n $branchName = "validate-typespec-$buildNumber"\n }\n\n Write-Host "Setting variable 'branchName' to '$branchName'"\n Write-Host "##vso[task.setvariable variable=branchName;isOutput=true]$branchName"\n displayName: Set branch name\n name: set_branch_name\n\n - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml\n parameters:\n artifactName: build_artifacts\n artifactPath: $(Build.ArtifactStagingDirectory)\n\n # Publish stage\n # Responsible for publishing the packages in `build_artifacts/packages`\n - ${{ if parameters.ShouldPublish }}:\n - stage: Publish\n dependsOn:\n - Build\n - ${{ if and(parameters.PublishDependsOnTest, ne(length(parameters.TestMatrix), 0)) }}:\n - Test\n variables:\n buildArtifactsPath: $(Pipeline.Workspace)/build_artifacts\n pool: ${{ parameters.Pool }}\n jobs:\n - job: Publish\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n\n - download: current\n artifact: build_artifacts\n displayName: Download build artifacts\n\n # Create authenticated .npmrc file for publishing to devops\n - template: /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml\n parameters:\n npmrcPath: $(buildArtifactsPath)/packages/.npmrc\n registryUrl: https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest/npm/registry/\n\n # publish to devops feed\n - pwsh: |\n $packageFiles = Get-ChildItem -Path . -Filter '*.tgz'\n foreach ($file in $packageFiles.Name) {\n Write-Host "npm publish $file --verbose --access public"\n npm publish $file --verbose --access public\n }\n displayName: Publish to DevOps feed\n workingDirectory: $(buildArtifactsPath)/packages\n\n # Publish to https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net\n - ${{ if parameters.HasNugetPackages }}:\n - task: 1ES.PublishNuget@1\n displayName: Publish NuGet Packages to DevOps feed\n inputs:\n packagesToPush: $(buildArtifactsPath)/packages/*.nupkg;!$(buildArtifactsPath)/packages/*.symbols.nupkg\n packageParentPath: $(buildArtifactsPath)/packages\n publishVstsFeed: "29ec6040-b234-4e31-b139-33dc4287b756/fa8c16a3-dbe0-4de2-a297-03065ec1ba3f"\n nuGetFeedType: internal\n\n - ${{ if parameters.PublishPublic }}:\n # publish to npmjs.org using ESRP\n - task: EsrpRelease@9\n inputs:\n displayName: Publish to npmjs.org\n ConnectedServiceName: Azure SDK PME Managed Identity\n ClientId: 5f81938c-2544-4f1f-9251-dd9de5b8a81b\n DomainTenantId: 975f013f-7f24-47e8-a7d3-abc4752bf346\n UseManagedIdentity: true\n KeyVaultName: kv-azuresdk-codesign\n SignCertName: azure-sdk-esrp-release-certificate\n Intent: PackageDistribution\n ContentType: npm\n FolderLocation: $(buildArtifactsPath)/packages\n Owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}\n Approvers: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}\n ServiceEndpointUrl: https://api.esrp.microsoft.com\n MainPublisher: ESRPRELPACMANTEST\n\n # Regenerate stage\n # Responsible for regenerating the SDK code using the emitter package and the generation matrix.\n - ${{ if and(parameters.ShouldPublish, parameters.ShouldRegenerate) }}:\n - stage: Regenerate\n dependsOn:\n - Build\n - Publish\n variables:\n pullRequestTargetBranch: 'main'\n buildArtifactsPath: $(Pipeline.Workspace)/build_artifacts\n branchName: $[stageDependencies.Build.Build.outputs['set_branch_name.branchName']]\n pool: ${{ parameters.Pool }}\n jobs:\n - job: Initialize\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths:\n - "/*"\n - "!SessionRecords"\n\n - download: current\n displayName: Download pipeline artifacts\n\n - pwsh: |\n npm install -g @azure-tools/typespec-client-generator-cli@latest\n displayName: Install tsp-client\n\n - pwsh: |\n Write-Host "Overrides location: $(buildArtifactsPath)/packages/overrides.json"\n\n if (Test-Path -Path '$(buildArtifactsPath)/packages/overrides.json') {\n Write-Host "Using overrides.json to generate emitter-package.json"\n tsp-client generate-config-files `\n --package-json '$(buildArtifactsPath)/lock-files/package.json' `\n --emitter-package-json-path '${{ parameters.EmitterPackageJsonOutputPath }}' `\n --overrides '$(buildArtifactsPath)/packages/overrides.json'\n } else {\n Write-Host "No overrides.json found. Running tsp-client without overrides."\n\n tsp-client generate-config-files `\n --package-json '$(buildArtifactsPath)/lock-files/package.json' `\n --emitter-package-json-path '${{ parameters.EmitterPackageJsonOutputPath }}'\n }\n displayName: Generate emitter-package.json and emitter-package-lock files\n workingDirectory: $(Build.SourcesDirectory)\n\n - ${{ parameters.InitializationSteps }}\n\n - template: /eng/common/pipelines/templates/steps/git-push-changes.yml\n parameters:\n BaseRepoOwner: azure-sdk\n TargetRepoName: $(Build.Repository.Name)\n BaseRepoBranch: $(branchName)\n CommitMsg: Initialize repository for autorest build $(Build.BuildNumber)\n WorkingDirectory: $(Build.SourcesDirectory)\n ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts\n # To accomodate scheduled runs and retries, we want to overwrite any existing changes on the branch\n PushArgs: --force\n\n - task: PowerShell@2\n displayName: Get generation job matrix\n name: generate_matrix\n inputs:\n pwsh: true\n filePath: ./eng/common/scripts/New-RegenerateMatrix.ps1\n arguments: >\n -OutputDirectory "$(Build.ArtifactStagingDirectory)"\n -OutputVariableName matrix\n -JobCount ${{ parameters.RegenerationJobCount }}\n -MinimumPerJob ${{ parameters.MinimumPerJob }}\n -OnlyTypespec ${{ parameters.OnlyGenerateTypespec }}\n workingDirectory: $(Build.SourcesDirectory)\n\n - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml\n parameters:\n artifactName: matrix_artifacts\n artifactPath: $(Build.ArtifactStagingDirectory)\n\n - job: Generate\n dependsOn: Initialize\n strategy:\n matrix: $[dependencies.Initialize.outputs['generate_matrix.matrix']]\n variables:\n matrixArtifactsPath: $(Pipeline.Workspace)/matrix_artifacts\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths:\n - "/*"\n - "!SessionRecords"\n\n - download: current\n displayName: Download pipeline artifacts\n\n - ${{ parameters.InitializationSteps }}\n\n - task: PowerShell@2\n displayName: Call regeneration script\n inputs:\n pwsh: true\n filePath: ./eng/common/scripts/Update-GeneratedSdks.ps1\n arguments: >\n -PackageDirectoriesFile "$(matrixArtifactsPath)/$(DirectoryList)"\n workingDirectory: $(Build.SourcesDirectory)\n continueOnError: true\n\n - template: /eng/common/pipelines/templates/steps/git-push-changes.yml\n parameters:\n BaseRepoOwner: azure-sdk\n TargetRepoName: $(Build.Repository.Name)\n BaseRepoBranch: $(branchName)\n CommitMsg: Update SDK code $(JobKey)\n WorkingDirectory: $(Build.SourcesDirectory)\n ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts\n\n - job: Create_PR\n displayName: Create PR\n dependsOn: \n - Generate\n variables:\n generateJobResult: $[dependencies.Generate.result]\n emitterVersion: $[stageDependencies.Build.Build.outputs['initialize.emitterVersion']]\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n\n - pwsh: |\n $generateJobResult = '$(generateJobResult)'\n $emitterVersion = '$(emitterVersion)'\n $collectionUri = '$(System.CollectionUri)'\n $project = '$(System.TeamProject)'\n $definitionName = '$(Build.DefinitionName)'\n $repoUrl = '$(Build.Repository.Uri)'\n $repoName = '$(Build.Repository.Name)'\n $sourceBranch = '$(Build.SourceBranch)'\n $reason = '$(Build.Reason)'\n $buildId = '$(Build.BuildId)'\n $buildNumber = '$(Build.BuildNumber)'\n $preRelease = '${{ parameters.BuildPrereleaseVersion }}' -eq 'true'\n \n $prBody = "Generated by $definitionName build [$buildNumber]($collectionUri/$project/_build/results?buildId=$buildId)<br/>"\n\n if ($sourceBranch -match "^refs/heads/(.+)$") {\n $prBody += "Triggered from branch: [$($Matches[1])]($repoUrl/tree/$sourceBranch)"\n } elseif ($sourceBranch -match "^refs/tags/(.+)$") {\n $prBody += "Triggered from tag: [$($Matches[1])]($repoUrl/tree/$sourceBranch)"\n } elseif ($sourceBranch -match "^refs/pull/(\d+)/(head|merge)$") {\n $prBody += "Triggered from pull request: $repoUrl/pull/$($Matches[1])"\n } else {\n $prBody += "Triggered from [$sourceBranch]($repoUrl/tree/$sourceBranch)"\n }\n\n if ($reason -eq 'Schedule') {\n $prTitle = "Scheduled code regeneration test"\n } else {\n if ($preRelease) {\n $prTitle = "Update typespec emitter version to prerelease $emitterVersion"\n } else {\n $prTitle = "Update typespec emitter version to $emitterVersion"\n }\n\n if ($generateJobResult -ne 'Succeeded') {\n $prTitle = "Failed: $prTitle"\n }\n }\n\n Write-Host "Setting variable 'PullRequestTitle' to '$prTitle'"\n Write-Host "##vso[task.setvariable variable=PullRequestTitle]$prTitle"\n\n Write-Host "Setting variable 'PullRequestBody' to '$prBody'"\n Write-Host "##vso[task.setvariable variable=PullRequestBody]$prBody"\n\n $repoNameParts = $repoName.Split('/')\n if ($repoNameParts.Length -eq 2) {\n Write-Host "Setting variable 'RepoOwner' to '$($repoNameParts[0])'"\n Write-Host "##vso[task.setvariable variable=RepoOwner]$($repoNameParts[0])"\n\n Write-Host "Setting variable 'RepoName' to '$($repoNameParts[1])'"\n Write-Host "##vso[task.setvariable variable=RepoName]$($repoNameParts[1])"\n } else {\n Write-Error "Build.Repository.Name not in the expected {Owner}/{Name} format"\n }\n\n $openAsDraft = -not ($reason -eq 'IndividualCI' -and $sourceBranch -eq 'refs/heads/main')\n Write-Host "Setting OpenAsDraftBool = $openAsDraft"\n Write-Host "##vso[task.setvariable variable=OpenAsDraft]$openAsDraft"\n if ($openAsDraft) {\n Write-Host "##vso[task.setvariable variable=PRLabels]Do Not Merge"\n } else {\n Write-Host "##vso[task.setvariable variable=PRLabels]"\n }\n \n displayName: Get PR title and body\n\n - task: PowerShell@2\n displayName: Create pull request\n inputs:\n pwsh: true\n filePath: ./eng/common/scripts/Submit-PullRequest.ps1\n arguments: >\n -RepoOwner '$(RepoOwner)'\n -RepoName '$(RepoName)'\n -BaseBranch '$(pullRequestTargetBranch)'\n -PROwner 'azure-sdk'\n -PRBranch '$(branchName)'\n -AuthToken '$(azuresdk-github-pat)'\n -PRTitle '$(PullRequestTitle)'\n -PRBody '$(PullRequestBody)'\n -OpenAsDraft $$(OpenAsDraft)\n -PRLabels '$(PRLabels)'\n workingDirectory: $(Build.SourcesDirectory)\n\n # Test stage\n # Responsible for running unit and functional tests using a matrix passed in as the parameter `TestMatrix`.\n # Will only run if the parameter `TestMatrix` is not empty.\n # The contents of the artficact `build_artifacts` are available under the path `$(buildArtifactsPath)`.\n - ${{ if ne(length(parameters.TestMatrix), 0) }}:\n - stage: Test\n dependsOn: Build\n pool: ${{ parameters.Pool }}\n jobs:\n - job: Test\n strategy:\n matrix: ${{ parameters.TestMatrix }}\n variables:\n buildArtifactsPath: $(Pipeline.Workspace)/build_artifacts\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths: ${{ parameters.SparseCheckoutPaths }}\n\n - download: current\n artifact: build_artifacts\n displayName: Download build artifacts\n\n - ${{ parameters.InitializationSteps }}\n\n - task: PowerShell@2\n displayName: 'Run initialize script'\n inputs:\n pwsh: true\n filePath: $(Build.SourcesDirectory)/eng/scripts/typespec/Initialize-WorkingDirectory.ps1\n arguments: > \n -BuildArtifactsPath '$(buildArtifactsPath)/lock-files'\n -EmitterPackagePath: ${{ parameters.EmitterPackagePath }}\n\n - task: PowerShell@2\n displayName: 'Run test script'\n inputs:\n pwsh: true\n filePath: $(Build.SourcesDirectory)/eng/scripts/typespec/Test-Emitter.ps1\n arguments: >\n $(TestArguments)\n -OutputDirectory "$(Build.ArtifactStagingDirectory)"\n -EmitterPackagePath: ${{ parameters.EmitterPackagePath }}\n\n - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml\n parameters:\n artifactName: test_artifacts_$(System.JobName)\n artifactPath: $(Build.ArtifactStagingDirectory)\n\n - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:\n - task: AzureCLI@2\n displayName: "Upload Spector Standard Coverage Report"\n condition: and(ne(variables['SpectorName'], ''), succeeded())\n inputs:\n azureSubscription: "TypeSpec Storage"\n scriptType: "bash"\n scriptLocation: "inlineScript"\n inlineScript: npx tsp-spector upload-coverage --coverageFile $(Build.ArtifactStagingDirectory)/tsp-spector-coverage-azure.json --generatorName @azure-typespec/$(SpectorName) --storageAccountName typespec --containerName coverages --generatorVersion $(node -p -e "require('./package.json').version") --generatorMode azure\n workingDirectory: $(Build.SourcesDirectory)/eng/packages/$(SpectorName)\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\archetype-typespec-emitter.yml | archetype-typespec-emitter.yml | YAML | 21,248 | 0.95 | 0.068826 | 0.086047 | vue-tools | 800 | 2024-03-19T22:59:21.040442 | Apache-2.0 | false | 613ea131fd77ca41ec4c6511612feb70 |
jobs:\n - job: CreateDocIndex\n pool:\n name: azsdk-pool-mms-win-2022-general\n steps:\n - task: UsePythonVersion@0\n displayName: 'Use Python 3.11'\n inputs:\n versionSpec: '3.11'\n\n - pwsh: |\n Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v2.43.2/docfx.zip" `\n -OutFile "docfx.zip" | Wait-Process; Expand-Archive -Path "docfx.zip" -DestinationPath ./docfx\n echo "##vso[task.setvariable variable=docfxPath]$(Build.BinariesDirectory)/docfx/docfx.exe"\n workingDirectory: $(Build.BinariesDirectory)\n displayName: Download and Extract DocFX\n\n - task: AzureCLI@2\n displayName: 'Generate Doc Index'\n inputs:\n azureSubscription: 'Azure SDK Artifacts'\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: >\n $(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1\n -Docfx $(docfxPath)\n -RepoRoot $(Build.SourcesDirectory)\n -DocGenDir "$(Build.SourcesDirectory)/eng/common/docgeneration"\n -DocOutDir "$(Build.ArtifactStagingDirectory)/docfx_project"\n -verbose\n\n - template: /eng/common/pipelines/templates/steps/mashup-doc-index.yml\n parameters:\n SourceDirectory: $(Build.ArtifactStagingDirectory)\n - pwsh: |\n Copy-Item -Path $(Build.SourcesDirectory)/eng/* -Destination ./ -Recurse -Force\n echo "##vso[task.setvariable variable=toolPath]$(Build.BinariesDirectory)"\n workingDirectory: $(Build.BinariesDirectory)\n displayName: Move eng/common to Tool Directory \n\n - task: PublishPipelineArtifact@0\n condition: succeeded()\n inputs:\n artifactName: "Doc.Index"\n targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site\n \n - pwsh: |\n git checkout -b gh-pages-local --track origin/gh-pages-root -f\n workingDirectory: $(Build.SourcesDirectory)\n displayName: Git pull GH pages branch\n\n - pwsh: |\n Copy-Item -Path $(Build.ArtifactStagingDirectory)/docfx_project/_site/* -Destination ./ -Recurse -Force\n git add -A\n workingDirectory: $(Build.SourcesDirectory)\n displayName: Copy the latest changes\n\n - task: PowerShell@2\n displayName: Push the Docs to GH-Pages\n condition: succeeded()\n inputs:\n pwsh: true\n workingDirectory: $(Build.SourcesDirectory)\n filePath: $(toolPath)/common/scripts/git-branch-push.ps1\n arguments: >\n -PRBranchName "gh-pages"\n -CommitMsg "Auto-generated docs from SHA(s) $(Build.SourceVersion)"\n -GitUrl "https://$(azuresdk-github-pat)@github.com/$(Build.Repository.Name).git"\n -PushArgs "--force" | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\jobs\docindex.yml | docindex.yml | YAML | 2,843 | 0.8 | 0 | 0 | node-utils | 367 | 2023-08-10T14:36:33.663179 | GPL-3.0 | false | 53a409ebdb9889155a663d4199ccdf78 |
parameters:\n- name: AdditionalParameters\n type: object\n- name: DependsOn\n type: object\n default: null\n- name: CloudConfig\n type: object\n default: {}\n- name: MatrixConfigs\n type: object\n default: []\n- name: MatrixFilters\n type: object\n default: []\n- name: MatrixReplace\n type: object\n default: {}\n- name: JobTemplatePath\n type: string\n# Set this to false to do a full checkout for private repositories with the azure pipelines service connection\n- name: SparseCheckout\n type: boolean\n default: true\n- name: SparseCheckoutPaths\n type: object\n default: []\n- name: Pool\n type: string\n default: $(LINUXPOOL)\n- name: OsVmImage\n type: string\n default: $(LINUXVMIMAGE)\n- name: Os\n type: string\n default: linux\n# This parameter is only necessary if there are multiple invocations of this template within the SAME STAGE.\n# When that occurs, provide a name other than the default value.\n- name: GenerateJobName\n type: string\n default: 'generate_job_matrix'\n- name: PreGenerationSteps\n type: stepList\n default: []\n- name: EnablePRGeneration\n type: boolean\n default: false\n# name of the variable that will be added when creating batches for the PR Job Matrix\n- name: PRMatrixSetting\n type: string\n default: 'ArtifactPackageNames'\n# name of the key in PackageInfo that will be used to get the identifier when generating matrix batches\n- name: PRMatrixKey\n type: string\n default: 'ArtifactName'\n- name: PRJobBatchSize\n type: number\n default: 10\n- name: PRMatrixIndirectFilters\n type: object\n default: []\n- name: PRMatrixSparseIndirect\n type: boolean\n default: true\n# Mappings to OS name required at template compile time by 1es pipeline templates\n- name: Pools\n type: object\n default:\n - name: Linux\n filter: .*Linux.*Pool$\n os: linux\n - name: Windows\n filter: .*Windows.*Pool$\n os: windows\n - name: Mac\n filter: .*MacPool$\n os: macOS\n\njobs:\n- job: ${{ parameters.GenerateJobName }}\n variables:\n - template: /eng/pipelines/templates/variables/image.yml\n - name: skipComponentGovernanceDetection\n value: true\n - name: displayNameFilter\n value: $[ coalesce(variables.jobMatrixFilter, '.*') ]\n pool:\n name: ${{ parameters.Pool }}\n image: ${{ parameters.OsVmImage }}\n os: ${{ parameters.Os }}\n ${{ if parameters.DependsOn }}:\n dependsOn: ${{ parameters.DependsOn }}\n steps:\n # Skip sparse checkout for the `azure-sdk-for-<lang>-pr` private mirrored repositories\n # as we require the github service connection to be loaded.\n - ${{ if and(parameters.SparseCheckout, not(contains(variables['Build.DefinitionName'], '-pr - '))) }}:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n ${{ if ne(length(parameters.SparseCheckoutPaths), 0) }}:\n Paths: ${{ parameters.SparseCheckoutPaths }}\n ${{ if and(eq(length(parameters.SparseCheckoutPaths), 0), ne(parameters.AdditionalParameters.ServiceDirectory, '')) }}:\n Paths:\n - "sdk/${{ parameters.AdditionalParameters.ServiceDirectory }}"\n\n - ${{ parameters.PreGenerationSteps }}\n\n - ${{ if eq(parameters.EnablePRGeneration, false) }}:\n - ${{ each config in parameters.MatrixConfigs }}:\n - ${{ each pool in parameters.Pools }}:\n - ${{ if eq(config.GenerateVMJobs, 'true') }}:\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/job-matrix/Create-JobMatrix.ps1\n arguments: >\n -ConfigPath ${{ config.Path }}\n -Selection ${{ config.Selection }}\n -DisplayNameFilter '$(displayNameFilter)'\n -Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}'\n -Replace '${{ join(''',''', parameters.MatrixReplace) }}'\n -NonSparseParameters '${{ join(''',''', config.NonSparseParameters) }}'\n displayName: Create ${{ pool.name }} Matrix ${{ config.Name }}\n name: vm_job_matrix_${{ config.Name }}_${{ pool.name }}\n - ${{ if eq(config.GenerateContainerJobs, 'true') }}:\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/job-matrix/Create-JobMatrix.ps1\n arguments: >\n -ConfigPath ${{ config.Path }}\n -Selection ${{ config.Selection }}\n -DisplayNameFilter '$(displayNameFilter)'\n -Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}'\n -NonSparseParameters '${{ join(''',''', config.NonSparseParameters) }}'\n displayName: Create ${{ pool.name }} Container Matrix ${{ config.Name }}\n name: container_job_matrix_${{ config.Name }}_${{ pool.name }}\n\n # This else being set also currently assumes that the $(Build.ArtifactStagingDirectory)/PackageInfo folder is populated by PreGenerationSteps.\n # Not currently not hardcoded, so not doing the needful and populating this folder before we hit this step will result in generation errors.\n - ${{ else }}:\n - ${{ each pool in parameters.Pools }}:\n - pwsh: |\n '${{ convertToJson(parameters.MatrixConfigs) }}' | Set-Content matrix.json\n\n ./eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 `\n -PackagePropertiesFolder $(Build.ArtifactStagingDirectory)/PackageInfo `\n -PRMatrixFile matrix.json `\n -PRMatrixSetting ${{ parameters.PRMatrixSetting }} `\n -PRMatrixKey ${{ parameters.PRMatrixKey }} `\n -DisplayNameFilter '$(displayNameFilter)' `\n -Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}' `\n -IndirectFilters '${{ join(''',''', parameters.PRMatrixIndirectFilters) }}' `\n -Replace '${{ join(''',''', parameters.MatrixReplace) }}' `\n -PackagesPerPRJob ${{ parameters.PRJobBatchSize }} `\n -SparseIndirect $${{ parameters.PRMatrixSparseIndirect }}\n displayName: Create ${{ pool.name }} PR Matrix\n name: vm_job_matrix_pr_${{ pool.name }}\n\n- ${{ if eq(parameters.EnablePRGeneration, false) }}:\n - ${{ each config in parameters.MatrixConfigs }}:\n - ${{ each pool in parameters.Pools }}:\n - ${{ if eq(config.GenerateVMJobs, 'true') }}:\n - template: ${{ parameters.JobTemplatePath }}\n parameters:\n UsePlatformContainer: false\n OSName: ${{ pool.os }}\n Matrix: dependencies.${{ parameters.GenerateJobName }}.outputs['vm_job_matrix_${{ config.Name }}_${{ pool.name }}.matrix']\n DependsOn: ${{ parameters.GenerateJobName }}\n CloudConfig: ${{ parameters.CloudConfig }}\n ${{ each param in parameters.AdditionalParameters }}:\n ${{ param.key }}: ${{ param.value }}\n\n - ${{ if eq(config.GenerateContainerJobs, 'true') }}:\n - template: ${{ parameters.JobTemplatePath }}\n parameters:\n UsePlatformContainer: true\n OSName: ${{ pool.os }}\n Matrix: dependencies.${{ parameters.GenerateJobName }}.outputs['vm_job_matrix_${{ config.Name }}_${{ pool.name }}.matrix']\n DependsOn: ${{ parameters.GenerateJobName }}\n CloudConfig: ${{ parameters.CloudConfig }}\n ${{ each param in parameters.AdditionalParameters }}:\n ${{ param.key }}: ${{ param.value }}\n- ${{ else }}:\n - ${{ each pool in parameters.Pools }}:\n - template: ${{ parameters.JobTemplatePath }}\n parameters:\n UsePlatformContainer: false\n OSName: ${{ pool.os }}\n Matrix: dependencies.${{ parameters.GenerateJobName }}.outputs['vm_job_matrix_pr_${{ pool.name }}.matrix']\n DependsOn: ${{ parameters.GenerateJobName }}\n CloudConfig: ${{ parameters.CloudConfig }}\n ${{ each param in parameters.AdditionalParameters }}:\n ${{ param.key }}: ${{ param.value }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\jobs\generate-job-matrix.yml | generate-job-matrix.yml | YAML | 8,279 | 0.95 | 0.07772 | 0.053763 | awesome-app | 830 | 2024-06-26T05:48:18.391513 | GPL-3.0 | false | 9959163fec02d8b272da7a009233ad8c |
parameters:\n- name: JobName\n type: string\n default: 'Perf'\n- name: TimeoutInMinutes\n type: number\n default: '360'\n- name: LinuxPool\n type: string\n default: 'azsdk-pool-mms-ubuntu-2204-perf'\n- name: LinuxVmImage\n type: string\n default: 'ubuntu-22.04'\n- name: WindowsPool\n type: string\n default: 'azsdk-pool-mms-win-2022-perf'\n- name: WindowsVmImage\n type: string\n default: 'windows-2022'\n- name: Language\n type: string\n default: ''\n- name: LanguageVersion\n type: string\n default: ''\n- name: LanguageRepoName\n type: string\n default: $(Build.Repository.Name)\n- name: LanguageRepoCommitish\n type: string\n default: $(Build.SourceVersion)\n- name: ToolsRepoCommitish\n type: string\n default: 'main'\n- name: Variables\n type: object\n default: []\n- name: OperatingSystems\n type: string\n default: 'Linux'\n- name: InstallLanguageSteps\n type: stepList\n default: []\n- name: ServiceDirectory\n type: string\n default: ''\n- name: PackageVersions\n type: string\n default: '.*'\n- name: Tests\n type: string\n default: '.*'\n- name: Arguments\n type: string\n default: '.*'\n- name: Iterations\n type: number\n default: '5'\n- name: Profile\n type: boolean\n default: false\n- name: AdditionalArguments\n type: string\n default: ''\n- name: EnvVars\n type: object\n default: {}\n\njobs:\n- job: ${{ parameters.JobName }}\n timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}\n strategy:\n matrix:\n ${{ if contains(parameters.OperatingSystems, 'Linux') }}:\n Linux:\n Pool: ${{ parameters.LinuxPool }}\n OsVmImage: ${{ parameters.LinuxVmImage }}\n MatrixName: 'Linux'\n ${{ if contains(parameters.OperatingSystems, 'Windows') }}:\n Windows:\n Pool: ${{ parameters.WindowsPool }}\n OsVmImage: ${{ parameters.WindowsVmImage }}\n MatrixName: 'Windows'\n variables:\n - ${{ parameters.Variables }}\n - name: Profile\n ${{ if parameters.Profile }}:\n value: '--profile'\n ${{ else }}:\n value: ''\n pool:\n name: $(Pool)\n vmImage: $(OSVmImage)\n steps:\n\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths:\n - '/*'\n - '!sdk/**/test-recordings/*'\n - '!sdk/**/recordings/*'\n - '!sdk/**/SessionRecords/*'\n - '!sdk/**/session-records/*'\n Repositories:\n - Name: ${{ parameters.LanguageRepoName }}\n Commitish: ${{ parameters.LanguageRepoCommitish }}\n WorkingDirectory: $(System.DefaultWorkingDirectory)\n - Name: Azure/azure-sdk-tools\n Commitish: ${{ parameters.ToolsRepoCommitish }}\n WorkingDirectory: $(System.DefaultWorkingDirectory)/azure-sdk-tools\n\n - template: /eng/common/pipelines/templates/steps/verify-agent-os.yml\n parameters:\n AgentImage: $(OSVmImage)\n \n - ${{ parameters.InstallLanguageSteps }}\n\n - template: /eng/common/TestResources/deploy-test-resources.yml\n parameters:\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n Location: westus\n ResourceType: perf\n ServiceConnection: azure-sdk-tests-public\n\n - task: AzurePowerShell@5\n inputs:\n azureSubscription: azure-sdk-tests-public\n azurePowerShellVersion: LatestVersion\n pwsh: true\n ScriptType: InlineScript\n Inline: >-\n $account = (Get-AzContext).Account;\n $env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id;\n $env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants;\n\n dotnet run -- run\n --language ${{ parameters.Language }}\n --language-version ${{ parameters.LanguageVersion }}\n --repo-root $(System.DefaultWorkingDirectory)\n --tests-file $(System.DefaultWorkingDirectory)/sdk/${{ parameters.ServiceDirectory }}/perf-tests.yml\n --package-versions "${{ parameters.PackageVersions }}"\n --tests "${{ parameters.Tests }}"\n --arguments "${{ parameters.Arguments }}"\n --iterations ${{ parameters.Iterations }}\n $(Profile)\n ${{ parameters.AdditionalArguments }}\n workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation\n displayName: Run perf tests\n env:\n SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n ${{ each var in parameters.EnvVars }}:\n ${{ var.key }}: ${{ var.value }}\n\n - pwsh: |\n get-content results.txt\n workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results\n displayName: Print results.txt\n condition: always()\n\n - pwsh: |\n get-content results.csv\n workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results\n displayName: Print results.csv\n condition: always()\n\n - pwsh: |\n get-content results.md\n workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results\n displayName: Print results.md\n condition: always()\n\n - pwsh: |\n get-content results.json\n workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results\n displayName: Print results.json\n condition: always()\n\n - task: PublishPipelineArtifact@1\n inputs:\n targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results\n artifactName: results-${{ parameters.Language }}-$(MatrixName)\n condition: always()\n\n - task: PublishPipelineArtifact@1\n inputs:\n targetPath: $(System.DefaultWorkingDirectory)/${{ parameters.Language }}-profile.zip\n artifactName: ${{ parameters.Language }}-profile.zip\n condition: ${{ parameters.Profile }}\n\n - template: /eng/common/TestResources/remove-test-resources.yml\n parameters:\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n ResourceType: perf\n ServiceConnection: azure-sdk-tests-public\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\jobs\perf.yml | perf.yml | YAML | 5,744 | 0.8 | 0.015464 | 0 | python-kit | 313 | 2023-08-03T01:18:58.087613 | MIT | false | 6bb33afed60ed116602231ff47d9ad84 |
parameters:\n - name: Repository\n type: string\n default: $(Build.Repository.Name)\n - name: RepositoryPath\n type: string\n default: 'sdk'\n - name: RepositoryCommitish\n type: string\n default: $(Build.SourceVersion)\n\njobs:\n- job:\n displayName: 'Prepare pipelines for ${{ parameters.Repository }}'\n pool:\n name: $(LINUXPOOL)\n vmImage: $(LINUXVMIMAGE)\n\n variables:\n RepositoryPath: "$(System.DefaultWorkingDirectory)/${{ parameters.RepositoryPath }}"\n ProjectForPRValidation: 'public'\n Prefix: 'na'\n DevOpsPath: 'na'\n InternalVariableGroups: ''\n InternalServiceConnections: ''\n GeneratePublicCIPipeline: ''\n GenerateUnifiedWeekly: ''\n TestVariableGroups: ''\n TestServiceConnections: ''\n\n # Standard set of variable groups for the Azure SDK repositories\n AzureSDK_Maven_Release_Pipeline_Secrets: 1\n AzureSDK_Nuget_Release_Pipeline_Secrets: 13\n AzureSDK_CocoaPods_Release_Pipeline_Secrets: 98\n AzureSDK_CratesIo_Release_Pipeline_Secrets: 150\n NPM_Registry_Authentication: 24\n Release_Secrets_for_GitHub: 58\n Secrets_for_Resource_Provisioner: 64\n APIReview_AutoCreate_Configurations: 93\n\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Repositories:\n - Name: ${{ parameters.Repository }}\n Commitish: ${{ parameters.RepositoryCommitish }}\n WorkingDirectory: $(System.DefaultWorkingDirectory)\n Paths:\n - 'sdk/**/*.yml'\n - '!sdk/**/test-recordings/*'\n - '!sdk/**/recordings/*'\n - '!sdk/**/SessionRecords/*'\n - '!sdk/**/session-records/*'\n ${{ if endsWith(parameters.Repository, '-pr') }}:\n TokenToUseForAuth: $(azuresdk-github-pat)\n\n - template: /eng/common/pipelines/templates/steps/install-pipeline-generation.yml\n - template: /eng/common/pipelines/templates/steps/set-default-branch.yml\n\n - pwsh: |\n Write-Host "Setting up pipeline variables"\n if ("${{ parameters.Repository }}" -match "Azure/azure-sdk-for-(?<lang>[^-]*)(?<pr>-pr)?") {\n $lang = $matches['lang']\n $devOpsPath = "\$lang"\n $prefix = $lang\n if ($matches['pr']) {\n $devOpsPath = "${devOpsPath}\pr"\n $prefix += "-pr"\n Write-Host "##vso[task.setvariable variable=ProjectForPRValidation]internal"\n }\n Write-Host "Prefix = $prefix"\n Write-Host "DevOpsPath = $devOpsPath"\n Write-Host "##vso[task.setvariable variable=Prefix]$prefix"\n Write-Host "##vso[task.setvariable variable=DevOpsPath]$devOpsPath"\n }\n else {\n Write-Error "Repository name '${{ parameters.Repository }}' is not in the expected format."\n exit 1\n }\n\n $generatePublicCIPipeline = 'true'\n $generateUnifiedWeekly = 'false'\n\n $testServiceConnections = '"Azure" "azure-sdk-tests" "azure-sdk-tests-preview" "azure-sdk-tests-public" "Azure SDK Test Resources - LiveTestSecrets"'\n $internalServiceConnections = '"Azure" "Azure SDK Artifacts" "Azure SDK Engineering System" "opensource-api-connection" "AzureSDKEngKeyVault Secrets" "Azure SDK PME Managed Identity"'\n\n # Map the language to the appropriate variable groups\n switch ($lang)\n {\n "java" {\n $internalVariableGroups = '$(AzureSDK_Maven_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'\n $testVariableGroups = '$(Secrets_for_Resource_Provisioner)'\n }\n "android" {\n $internalVariableGroups = '$(AzureSDK_Maven_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'\n }\n "js" {\n $generatePublicCIPipeline = 'false'\n $internalVariableGroups = '$(NPM_Registry_Authentication) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'\n $testVariableGroups = '$(Secrets_for_Resource_Provisioner)'\n }\n "python" {\n $generatePublicCIPipeline = 'false'\n $internalVariableGroups = '$(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'\n $testVariableGroups = '$(Secrets_for_Resource_Provisioner)'\n }\n "rust" {\n $generatePublicCIPipeline = 'false'\n $internalVariableGroups = '$(AzureSDK_CratesIo_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations) $(Secrets_for_Resource_Provisioner)'\n $generateUnifiedWeekly = 'true'\n }\n "net" {\n $generatePublicCIPipeline = 'false'\n $internalVariableGroups = '$(AzureSDK_Nuget_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'\n $testVariableGroups = '$(Secrets_for_Resource_Provisioner)'\n $internalServiceConnections += ' "Azure SDK Symbols Publishing" Nuget.org'\n }\n "cpp" {\n $internalVariableGroups = '$(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations) $(Secrets_for_Resource_Provisioner)'\n }\n "ios" {\n $internalVariableGroups = '$(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations) $(Secrets_for_Resource_Provisioner) $(AzureSDK_CocoaPods_Release_Pipeline_Secrets)'\n }\n "go" {\n $internalVariableGroups = '$(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations) $(Secrets_for_Resource_Provisioner)'\n $generateUnifiedWeekly = 'true'\n }\n default {\n Write-Error "Language '$lang' is not recognized."\n exit 1\n }\n }\n\n Write-Host "InternalVariableGroups = $internalVariableGroups"\n Write-Host "TestVariableGroups = $testVariableGroups"\n Write-Host "TestServiceConnections = $testServiceConnections"\n Write-Host "InternalServiceConnections = $internalServiceConnections"\n Write-Host "GeneratePublicCIPipeline = $generatePublicCIPipeline"\n Write-Host "GenerateUnifiedWeekly = $generateUnifiedWeekly"\n\n Write-Host "##vso[task.setvariable variable=InternalVariableGroups]$internalVariableGroups"\n Write-Host "##vso[task.setvariable variable=TestVariableGroups]$testVariableGroups"\n Write-Host "##vso[task.setvariable variable=TestServiceConnections]$testServiceConnections"\n Write-Host "##vso[task.setvariable variable=InternalServiceConnections]$internalServiceConnections"\n Write-host "##vso[task.setvariable variable=GeneratePublicCIPipeline]$generatePublicCIPipeline"\n Write-Host "##vso[task.setvariable variable=GenerateUnifiedWeekly]$generateUnifiedWeekly"\n displayName: Setup pipeline generation variables\n\n - task: AzureCLI@2\n inputs:\n azureSubscription: 'opensource-api-connection'\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: >\n $(Pipeline.Workspace)/pipeline-generator/pipeline-generator generate\n --organization azure-sdk\n --project $(ProjectForPRValidation)\n --prefix $(Prefix)\n --devopspath "$(DevOpsPath)"\n --path $(RepositoryPath)\n --endpoint Azure\n --repository ${{ parameters.Repository }}\n --convention ci\n --agentpool Hosted\n --branch refs/heads/$(DefaultBranch)\n --set-managed-variables\n --debug\n --serviceconnections "Azure"\n displayName: 'Generate ci pipelines for: ${{ parameters.Repository }}'\n condition: and(succeeded(), eq(variables['GeneratePublicCIPipeline'],'true'))\n continueOnError: true\n - task: AzureCLI@2\n inputs:\n azureSubscription: 'opensource-api-connection'\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: >\n $(Pipeline.Workspace)/pipeline-generator/pipeline-generator generate\n --organization azure-sdk\n --project internal\n --prefix $(Prefix)\n --devopspath "$(DevOpsPath)"\n --path $(RepositoryPath)\n --endpoint Azure\n --repository ${{ parameters.Repository }}\n --convention up\n --agentpool Hosted\n --branch refs/heads/$(DefaultBranch)\n --set-managed-variables\n --debug\n --variablegroups $(InternalVariableGroups) $(TestVariableGroups)\n --serviceconnections $(InternalServiceConnections) $(TestServiceConnections)\n displayName: 'Generate release pipelines for: ${{ parameters.Repository }}'\n continueOnError: true\n - task: AzureCLI@2\n inputs:\n azureSubscription: 'opensource-api-connection'\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: >\n $(Pipeline.Workspace)/pipeline-generator/pipeline-generator generate\n --organization azure-sdk\n --project internal\n --prefix $(Prefix)\n --devopspath "$(DevOpsPath)"\n --path $(RepositoryPath)\n --endpoint Azure\n --repository ${{ parameters.Repository }}\n --convention tests\n --agentpool Hosted\n --branch refs/heads/$(DefaultBranch)\n --set-managed-variables\n --debug\n --variablegroups $(TestVariableGroups)\n --serviceconnections $(TestServiceConnections)\n displayName: 'Generate test pipelines for: ${{ parameters.Repository }}'\n condition: and(succeeded(), ne(variables['TestVariableGroups'],''))\n continueOnError: true\n - task: AzureCLI@2\n inputs:\n azureSubscription: 'opensource-api-connection'\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: >\n $(Pipeline.Workspace)/pipeline-generator/pipeline-generator generate\n --organization azure-sdk\n --project internal\n --prefix $(Prefix)\n --devopspath "$(DevOpsPath)"\n --path $(RepositoryPath)\n --endpoint Azure\n --repository ${{ parameters.Repository }}\n --convention testsweekly\n --agentpool Hosted\n --branch refs/heads/$(DefaultBranch)\n --set-managed-variables\n --debug\n --variablegroups $(TestVariableGroups)\n --serviceconnections $(TestServiceConnections)\n displayName: 'Generate weekly test pipelines (multi-cloud) for: ${{ parameters.Repository }}'\n condition: and(succeeded(), ne(variables['TestVariableGroups'],''))\n continueOnError: true\n - task: AzureCLI@2\n inputs:\n azureSubscription: 'opensource-api-connection'\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: >\n $(Pipeline.Workspace)/pipeline-generator/pipeline-generator generate\n --organization azure-sdk\n --project internal\n --prefix $(Prefix)\n --devopspath "$(DevOpsPath)"\n --path $(RepositoryPath)\n --endpoint Azure\n --repository ${{ parameters.Repository }}\n --convention upweekly\n --agentpool Hosted\n --branch refs/heads/$(DefaultBranch)\n --set-managed-variables\n --debug\n --variablegroups $(InternalVariableGroups) $(TestVariableGroups)\n --serviceconnections $(InternalServiceConnections) $(TestServiceConnections)\n displayName: 'Generate weekly unified test pipelines (multi-cloud) for: ${{ parameters.Repository }}'\n condition: and(succeeded(), eq(variables['GenerateUnifiedWeekly'],'true'))\n continueOnError: true\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\jobs\prepare-pipelines.yml | prepare-pipelines.yml | YAML | 11,639 | 0.8 | 0.045113 | 0.007874 | vue-tools | 806 | 2025-01-27T03:56:59.741334 | GPL-3.0 | false | 0c234f596a951e1f225b85ded795dd24 |
parameters:\n - name: TargetDirectory\n type: string\n - name: CustomTestSteps\n type: object\n default: []\n - name: EnvVars\n type: object\n default: {}\n - name: TargetTags\n type: string\n default: ''\n - name: PreTestSteps\n type: object\n default: []\n\nvariables:\n - template: /eng/pipelines/templates/variables/globals.yml\n\nstages:\n - stage:\n displayName: Run PowerShell Tests\n jobs:\n - job: Test\n strategy:\n matrix:\n Windows:\n Pool: azsdk-pool-mms-win-2022-general\n Image: windows-2022\n Linux:\n Pool: azsdk-pool-mms-ubuntu-2204-general\n Image: ubuntu-22.04\n Mac:\n Pool: Azure Pipelines\n Image: macos-latest\n\n pool:\n name: $(Pool)\n vmImage: $(Image)\n\n steps:\n - ${{ parameters.PreTestSteps }}\n\n - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml\n parameters:\n TargetDirectory: ${{ parameters.TargetDirectory }}\n CustomTestSteps: ${{ parameters.CustomTestSteps }}\n EnvVars: ${{ parameters.EnvVars }}\n TargetTags: ${{ parameters.TargetTags }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\stages\archetype-sdk-tool-pwsh.yml | archetype-sdk-tool-pwsh.yml | YAML | 1,238 | 0.7 | 0 | 0 | node-utils | 192 | 2024-01-18T12:56:58.855994 | BSD-3-Clause | false | b62ea8a4eaff9a3758602b83e233e0db |
\nsteps:\n # https://github.com/actions/virtual-environments/issues/798\n - script: sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf\n displayName: Bypass local DNS server to workaround issue resolving cognitiveservices names\n condition: |\n and(\n succeededOrFailed(),\n or(contains(variables['OSVmImage'], 'ubuntu'),contains(variables['OSVmImage'], 'linux')),\n eq(variables['Container'], '')\n )\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\bypass-local-dns.yml | bypass-local-dns.yml | YAML | 460 | 0.8 | 0 | 0.1 | vue-tools | 937 | 2024-01-10T20:18:27.800864 | Apache-2.0 | false | f44889058a646d610e30cd6c9712adcc |
steps:\n- pwsh: |\n . ./eng/common/scripts/Helpers/PSModule-Helpers.ps1\n Write-Host "##vso[task.setvariable variable=CachedPSModulePath]$global:CurrentUserModulePath"\n displayName: Set PS Modules Cache Directory\n # Containers should bake modules into the image to save on pipeline time\n condition: and(succeeded(), eq(variables['Container'], ''))\n- task: Cache@2\n inputs:\n key: 'PSModulePath | $(CacheSalt) | $(Agent.OS) | $(Build.SourcesDirectory)/eng/common/scripts/Import-AzModules.ps1'\n path: $(CachedPSModulePath)\n displayName: Cache PS Modules\n # Containers should bake modules into the image to save on pipeline time\n condition: and(succeeded(), eq(variables['Container'], ''))\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\cache-ps-modules.yml | cache-ps-modules.yml | YAML | 702 | 0.8 | 0 | 0.142857 | node-utils | 75 | 2024-08-20T06:22:25.410359 | BSD-3-Clause | false | b414cb3ddaece9f34ba29ba6edb6bccc |
# Checks spelling of files that changed between the current state of the repo\n# and some ref (branch, tag, etc.) or commit hash. Only runs on PRs.\n# ContinueOnError - true: Pipeline warns on spelling error\n# false: Pipeline fails on spelling error\n# TargetBranch - Target ref (e.g. main) to compare to create file change\n# list.\n# CspellConfigPath - Path to cspell.json config location\n#\n# This check recognizes the setting of variable "Skip.SpellCheck"\n# if set to 'true', spellchecking will not be invoked.\n\nparameters:\n ContinueOnError: true\n CspellConfigPath: ./.vscode/cspell.json\n\nsteps:\n - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:\n - task: NodeTool@0\n condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true'))\n inputs:\n versionSpec: 18.x\n displayName: Use Node.js 18.x\n\n - task: PowerShell@2\n displayName: Check spelling (cspell)\n condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true'))\n continueOnError: ${{ parameters.ContinueOnError }}\n inputs:\n targetType: filePath\n filePath: eng/common/scripts/check-spelling-in-changed-files.ps1\n arguments: >-\n -CspellConfigPath ${{ parameters.CspellConfigPath }}\n -ExitWithError:(!$${{ parameters.ContinueOnError }})\n pwsh: true\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\check-spelling.yml | check-spelling.yml | YAML | 1,378 | 0.8 | 0.058824 | 0.322581 | react-lib | 970 | 2024-04-03T06:48:55.099265 | Apache-2.0 | false | 4c621dcf649b12033cdf97041d932724 |
parameters:\n EmulatorInstallPath: "$(Agent.HomeDirectory)/../../Program Files/Azure Cosmos DB Emulator/Microsoft.Azure.Cosmos.Emulator.exe"\n EmulatorMsiUrl: "https://aka.ms/cosmosdb-emulator"\n StartParameters: ''\n\nsteps:\n - task: Powershell@2\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/common/scripts/Cosmos-Emulator.ps1\n arguments: >\n -EmulatorMsiUrl "${{ parameters.EmulatorMsiUrl }}"\n -StartParameters "${{ parameters.StartParameters }}"\n -Emulator "${{ parameters.EmulatorInstallPath }}"\n -Stage "Launch"\n pwsh: true\n displayName: Launch Public Cosmos DB Emulator\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\cosmos-emulator.yml | cosmos-emulator.yml | YAML | 628 | 0.8 | 0 | 0 | react-lib | 657 | 2024-05-24T01:27:51.061646 | MIT | false | b1700f1d9d3fad181e956faac44f2bae |
parameters:\n ArtifactPath: $(Build.ArtifactStagingDirectory)\n Artifacts: []\n ConfigFileDir: $(Build.ArtifactStagingDirectory)/PackageInfo\n MarkPackageAsShipped: false\n GenerateApiReviewForManualOnly: false\n ArtifactName: 'packages'\n PackageName: ''\n SourceRootPath: $(Build.SourcesDirectory)\n\nsteps:\n # ideally this should be done as initial step of a job in caller template\n # We can remove this step later once it is added in caller\n - template: /eng/common/pipelines/templates/steps/set-default-branch.yml\n parameters:\n WorkingDirectory: ${{ parameters.SourceRootPath }}\n\n # Automatic API review is generated for a package when pipeline runs irrespective of how pipeline gets triggered.\n # Below condition ensures that API review is generated only for manual pipeline runs when flag GenerateApiReviewForManualOnly is set to true. \n - ${{ if or(ne(parameters.GenerateApiReviewForManualOnly, true), eq(variables['Build.Reason'], 'Manual')) }}:\n - task: Powershell@2\n inputs:\n filePath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1\n arguments: >\n -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name)\n -ArtifactPath '${{parameters.ArtifactPath}}'\n -ArtifactName ${{ parameters.ArtifactName }}\n -APIKey '$(azuresdk-apiview-apikey)'\n -PackageName '${{parameters.PackageName}}'\n -SourceBranch '$(Build.SourceBranchName)'\n -DefaultBranch '$(DefaultBranch)'\n -ConfigFileDir '${{parameters.ConfigFileDir}}'\n -BuildId '$(Build.BuildId)'\n -RepoName '$(Build.Repository.Name)' \n -MarkPackageAsShipped $${{parameters.MarkPackageAsShipped}}\n pwsh: true\n displayName: Create API Review\n condition: >-\n and(\n succeededOrFailed(),\n ne(variables['Skip.CreateApiReview'], 'true'),\n ne(variables['Build.Reason'],'PullRequest'),\n eq(variables['System.TeamProject'], 'internal'),\n not(endsWith(variables['Build.Repository.Name'], '-pr'))\n )\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\create-apireview.yml | create-apireview.yml | YAML | 2,119 | 0.8 | 0.066667 | 0.093023 | node-utils | 996 | 2023-10-19T10:43:31.589847 | GPL-3.0 | false | 15796757f80950bacad0cd666cd7f8ba |
parameters:\n - name: npmrcPath\n type: string\n - name: registryUrl\n type: string\n\nsteps:\n- pwsh: |\n Write-Host "Creating .npmrc file ${{ parameters.npmrcPath }} for registry ${{ parameters.registryUrl }}"\n $parentFolder = Split-Path -Path '${{ parameters.npmrcPath }}' -Parent\n \n if (!(Test-Path $parentFolder)) {\n Write-Host "Creating folder $parentFolder"\n New-Item -Path $parentFolder -ItemType Directory | Out-Null\n }\n\n $content = "registry=${{ parameters.registryUrl }}`n`nalways-auth=true"\n $content | Out-File '${{ parameters.npmrcPath }}'\n displayName: 'Create .npmrc'\n- task: npmAuthenticate@0\n displayName: Authenticate .npmrc\n inputs:\n workingFile: ${{ parameters.npmrcPath }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\create-authenticated-npmrc.yml | create-authenticated-npmrc.yml | YAML | 732 | 0.7 | 0.086957 | 0 | python-kit | 18 | 2024-05-01T14:11:52.565299 | GPL-3.0 | false | 27befc161907e1b8f7a7dfc4d9807a1c |
# Expects azuresdk-github-pat is set to the PAT for azure-sdk\n# Expects the buildtools to be cloned\n\nparameters:\n BaseBranchName: $(Build.SourceBranch)\n PRBranchName: not-specified\n PROwner: azure-sdk\n CommitMsg: not-specified\n RepoOwner: Azure\n RepoName: $(Build.Repository.Name)\n PushArgs:\n WorkingDirectory: $(System.DefaultWorkingDirectory)\n PRTitle: not-specified\n PRBody: ''\n ScriptDirectory: eng/common/scripts\n GHReviewers: ''\n GHTeamReviewers: ''\n GHAssignees: ''\n # Multiple labels seperated by comma, e.g. "bug, APIView"\n PRLabels: ''\n SkipCheckingForChanges: false\n CloseAfterOpenForTesting: false\n OpenAsDraft: false\n\nsteps:\n- template: /eng/common/pipelines/templates/steps/git-push-changes.yml\n parameters:\n BaseRepoBranch: ${{ parameters.PRBranchName }}\n BaseRepoOwner: ${{ parameters.PROwner }}\n CommitMsg: ${{ parameters.CommitMsg }}\n TargetRepoOwner: ${{ parameters.RepoOwner }}\n TargetRepoName: ${{ parameters.RepoName }}\n PushArgs: ${{ parameters.PushArgs }}\n WorkingDirectory: ${{ parameters.WorkingDirectory }}\n ScriptDirectory: ${{ parameters.ScriptDirectory }}\n SkipCheckingForChanges: ${{ parameters.SkipCheckingForChanges }}\n\n- task: PowerShell@2\n displayName: Create pull request\n condition: and(succeeded(), eq(variables['HasChanges'], 'true'))\n inputs:\n pwsh: true\n workingDirectory: ${{ parameters.WorkingDirectory }}\n filePath: ${{ parameters.ScriptDirectory }}/Submit-PullRequest.ps1\n arguments: >\n -RepoOwner "${{ parameters.RepoOwner }}"\n -RepoName "$(RepoNameWithoutOwner)"\n -BaseBranch "${{ parameters.BaseBranchName }}"\n -PROwner "${{ parameters.PROwner }}"\n -PRBranch "${{ parameters.PRBranchName }}"\n -AuthToken "$(azuresdk-github-pat)"\n -PRTitle "${{ parameters.PRTitle }}"\n -PRBody "${{ coalesce(parameters.PRBody, parameters.CommitMsg, parameters.PRTitle) }}"\n -PRLabels "${{ parameters.PRLabels }}"\n -UserReviewers "${{ parameters.GHReviewers }}"\n -TeamReviewers "${{ parameters.GHTeamReviewers }}"\n -Assignees "${{ parameters.GHAssignees }}"\n -CloseAfterOpenForTesting $${{ coalesce(parameters.CloseAfterOpenForTesting, 'false') }}\n -OpenAsDraft $${{ parameters.OpenAsDraft }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\create-pull-request.yml | create-pull-request.yml | YAML | 2,254 | 0.8 | 0.016949 | 0.053571 | python-kit | 836 | 2024-01-29T19:13:09.049030 | BSD-3-Clause | false | 203a874bda42c9f4f99c9def52244920 |
parameters:\n ArtifactLocation: 'not-specified'\n PackageRepository: 'not-specified'\n PackageFilter: ''\n ReleaseSha: 'not-specified'\n RepoId: $(Build.Repository.Name)\n WorkingDirectory: ''\n ScriptDirectory: eng/common/scripts\n\nsteps:\n- task: PowerShell@2\n displayName: 'Verify Package Tags and Create Git Releases'\n inputs:\n filePath: ${{ parameters.ScriptDirectory }}/create-tags-and-git-release.ps1\n arguments: >\n -artifactLocation ${{ parameters.ArtifactLocation }}\n -packageRepository ${{ parameters.PackageRepository }}\n -packageFilter "${{ parameters.PackageFilter }}"\n -releaseSha ${{ parameters.ReleaseSha }}\n -repoId ${{ parameters.RepoId }}\n -workingDirectory '${{ parameters.WorkingDirectory }}'\n pwsh: true\n timeoutInMinutes: 5\n env:\n GH_TOKEN: $(azuresdk-github-pat)\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\create-tags-and-git-release.yml | create-tags-and-git-release.yml | YAML | 831 | 0.7 | 0 | 0 | awesome-app | 315 | 2024-12-10T04:46:18.327273 | Apache-2.0 | false | 1f3c9fe2f44fe1eb60d37db01da42f88 |
# cSpell:ignore changedfiles\n# cSpell:ignore credscan\n# cSpell:ignore securedevelopmentteam\n# cSpell:ignore postanalysis\nparameters:\n SuppressionFilePath: 'eng/CredScanSuppression.json'\n BaselineFilePath: ''\n SourceDirectory: $(Build.SourcesDirectory)\n ServiceDirectory: ''\n\nsteps:\n- pwsh: |\n if ("$(Build.Reason)" -eq 'PullRequest') {\n $changedFiles = & "eng/common/scripts/get-changedfiles.ps1"\n $changedFiles | ForEach-Object { Add-Content -Path "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$_"}\n }\n else {\n $scanFolder = ""\n if ("${{ parameters.ServiceDirectory }}" -ne '') {\n $scanFolder = "sdk/${{ parameters.ServiceDirectory }}"\n }\n Set-Content "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$scanFolder"\n }\n if(Test-Path "${{ parameters.SourceDirectory }}/credscan.tsv") {\n Get-Content "${{ parameters.SourceDirectory }}/credscan.tsv"\n }\n else {\n Write-Host "##vso[task.setvariable variable=SKIP_CREDSCAN]true"\n }\n displayName: CredScan setup\n condition: succeededOrFailed()\n\n- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3\n displayName: CredScan running\n condition: and(succeededOrFailed(), ne(variables['SKIP_CREDSCAN'], true))\n inputs:\n toolVersion: 2.3.12.23\n scanFolder: "${{ parameters.SourceDirectory }}/credscan.tsv"\n suppressionsFile: ${{ parameters.SuppressionFilePath }}\n- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2\n displayName: CredScan result analysis\n condition: and(succeededOrFailed(), ne(variables['SKIP_CREDSCAN'], true))\n inputs:\n GdnBreakBaselineFiles: ${{ parameters.BaselineFilePath }}\n GdnBreakAllTools: false\n GdnBreakGdnToolCredScan: true\n GdnBreakGdnToolCredScanSeverity: Error\n GdnBreakBaselines: baseline\n # Used for generating baseline file.\n # GdnBreakOutputBaselineFile: baseline\n # GdnBreakOutputBaseline: baseline\n- pwsh: |\n Write-Host "Please check https://aka.ms/azsdk/credscan for more information about the cred scan failure."\n displayName: CredScan troubleshooting guide\n condition: and(failed(), ne(variables['SKIP_CREDSCAN'], true))\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\credscan.yml | credscan.yml | YAML | 2,288 | 0.8 | 0.090909 | 0.132075 | vue-tools | 577 | 2023-08-19T20:16:03.084590 | MIT | false | 6f56aac6cdb2080270c81425fde8667c |
# This script fragment is used across our repos to set a variable "SetDevVersion" which\n# is used when this pipeline is going to be generating and publishing daily dev builds.\nparameters:\n ServiceDirectory: ''\n Condition: succeeded()\nsteps:\n- ${{if ne(parameters.ServiceDirectory, '')}}:\n - task: Powershell@2\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/common/scripts/Save-Package-Properties.ps1\n arguments: >\n -ServiceDirectory ${{parameters.ServiceDirectory}}\n -OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo\n pwsh: true\n workingDirectory: $(Pipeline.Workspace)\n displayName: Dump Package properties\n condition: ${{ parameters.Condition }}\n- pwsh: |\n $setDailyDevBuild = "false"\n if (('$(Build.Reason)' -eq 'Schedule') -and ('$(System.TeamProject)' -eq 'internal')) {\n $setDailyDevBuild = "true"\n }\n echo "##vso[task.setvariable variable=SetDevVersion]$setDailyDevBuild"\n displayName: "Setup Versioning Properties"\n condition: and(${{ parameters.Condition }}, eq(variables['SetDevVersion'], ''))\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\daily-dev-build-variable.yml | daily-dev-build-variable.yml | YAML | 1,082 | 0.8 | 0.08 | 0.08 | awesome-app | 660 | 2024-06-11T20:05:17.911028 | BSD-3-Clause | false | dca725bc31cfde572b58ccf0a1f6e80b |
parameters:\n ArtifactPath: $(Build.ArtifactStagingDirectory)\n ArtifactName: 'packages'\n RepoRoot: $(Build.SourcesDirectory)\n Condition: true\n\nsteps:\n - pwsh: |\n $apiChangeDetectRequestUrl = "https://apiview.dev/PullRequest/DetectApiChanges"\n echo "##vso[task.setvariable variable=ApiChangeDetectRequestUrl]$apiChangeDetectRequestUrl"\n displayName: "Set API change detect request URL"\n condition: and(${{ parameters.Condition}}, eq(variables['ApiChangeDetectRequestUrl'], ''))\n\n - task: Powershell@2\n inputs:\n filePath: ${{ parameters.RepoRoot }}/eng/common/scripts/Detect-Api-Changes.ps1\n arguments: >\n -ArtifactPath ${{parameters.ArtifactPath}}\n -CommitSha '$(System.PullRequest.SourceCommitId)'\n -BuildId $(Build.BuildId)\n -PullRequestNumber $(System.PullRequest.PullRequestNumber)\n -RepoFullName $(Build.Repository.Name)\n -APIViewUri $(ApiChangeDetectRequestUrl)\n -ArtifactName ${{ parameters.ArtifactName }}\n -DevopsProject $(System.TeamProject)\n pwsh: true\n displayName: Detect API changes\n condition: and(${{ parameters.Condition }}, succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest'))\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\detect-api-changes.yml | detect-api-changes.yml | YAML | 1,208 | 0.8 | 0 | 0 | awesome-app | 807 | 2025-07-05T03:48:16.871264 | Apache-2.0 | false | 535c6829527388f4f4b96c1206a493b3 |
parameters:\n- name: Variables\n type: object\n default: []\n- name: ContinueOnError\n type: boolean\n default: false\n\nsteps:\n - pwsh: |\n $rawVariables = @"\n ${{ convertToJson(parameters.Variables) }}\n "@\n $variables = ConvertFrom-Json $rawVariables -AsHashtable\n foreach ($key in $variables.Keys) {\n Write-Host "Clearing: $key"\n Write-Host "##vso[task.setvariable variable=$key]"\n }\n continueOnError: ${{ parameters.ContinueOnError }}\n displayName: Clear DevOps Variables | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\devops-variables-clear.yml | devops-variables-clear.yml | YAML | 523 | 0.8 | 0 | 0 | react-lib | 82 | 2025-01-01T18:32:05.543756 | Apache-2.0 | false | 07aa6cc0e083e31cd11884693c21e9bd |
parameters:\n - name: Variables\n type: object\n default: []\n - name: ContinueOnError\n type: boolean\n default: false\n\nsteps:\n - pwsh: |\n $rawVariables = @"\n ${{ convertToJson(parameters.Variables) }}\n "@\n $variables = ConvertFrom-Json $rawVariables -AsHashtable\n foreach ($key in $variables.Keys) {\n $value = $variables[$key]\n Write-Host "Setting: $key = $value"\n Write-Host "##vso[task.setvariable variable=$key]$value"\n }\n continueOnError: ${{ parameters.ContinueOnError }}\n displayName: Set DevOps Variables | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\devops-variables-set.yml | devops-variables-set.yml | YAML | 581 | 0.8 | 0 | 0 | react-lib | 677 | 2025-04-03T21:00:02.592996 | MIT | false | 85a562b7fc9c3e162a73fb984c4021a3 |
steps:\n# Fail the build if any of the packages failed validation. Valid values are\n# "true" or "false". This step will skip if $(DocsMsPackagesAllValid) is not set\n- pwsh: |\n if ('$(DocsMsPackagesAllValid)' -eq 'true') {\n Write-Host "All packages passed validation."\n } else {\n Write-Error "Some packages failed validation."\n exit 1\n }\n displayName: Check package validation results\n condition: and(succeeded(), ne(variables['DocsMsPackagesAllValid'], ''))\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\docsms-ensure-validation.yml | docsms-ensure-validation.yml | YAML | 483 | 0.8 | 0.25 | 0.166667 | awesome-app | 700 | 2024-02-29T02:13:29.681906 | Apache-2.0 | false | 1ee561c5318e173efac145f091d7ad83 |
parameters:\n - name: GitHubUser\n type: string\n - name: GitHubToken\n type: string\n\nsteps:\n- pwsh: |\n $headers = @{\n "Authorization" = "Bearer $env:GITHUB_TOKEN"\n "X-GitHub-Api-Version" = "2022-11-28"\n }\n\n $response = Invoke-RestMethod -Uri 'https://api.github.com/rate_limit' -Headers $headers -Method Get\n $timestamp = Get-Date\n foreach ($property in $response.resources.PSObject.Properties)\n { \n $labels = @{ user= $env:GITHUB_USER; resource= $property.Name }\n\n $remaining = $property.Value.remaining\n $limit = $property.Value.limit\n $used = $property.Value.used\n\n Write-Host "logmetric: $( [ordered]@{ name= "github_ratelimit_remaining_total"; value= $remaining; timestamp= $timestamp; labels= $labels } | ConvertTo-Json -Compress)"\n Write-Host "logmetric: $( [ordered]@{ name= "github_ratelimit_limit_total"; value= $limit; timestamp= $timestamp; labels= $labels } | ConvertTo-Json -Compress)"\n Write-Host "logmetric: $( [ordered]@{ name= "github_ratelimit_used_total"; value= $used; timestamp= $timestamp; labels= $labels } | ConvertTo-Json -Compress)"\n\n if ($limit -ne 0) {\n $percent = $used / $limit * 100\n Write-Host "logmetric: $( [ordered]@{ name= "github_ratelimit_used_percent"; value= $percent; timestamp= $timestamp; labels= $labels } | ConvertTo-Json -Compress)"\n }\n } \n displayName: Check GitHub Rate Limit\n env:\n GITHUB_TOKEN: ${{ parameters.GitHubToken}}\n GITHUB_USER: ${{ parameters.GitHubUser}} | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\emit-rate-limit-metrics.yml | emit-rate-limit-metrics.yml | YAML | 1,550 | 0.8 | 0.028571 | 0 | node-utils | 390 | 2023-09-01T04:19:24.211347 | GPL-3.0 | false | 541d1bcee0d5a52ff8d544de6a875efc |
steps:\n- pwsh: |\n if ($IsWindows) {\n REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /f /v LongPathsEnabled /t REG_DWORD /d 1\n git config --system core.longpaths true\n }\n else {\n Write-Host "This script is not executing on Windows, skipping registry modification."\n }\n displayName: Enable long path support if necessary\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\enable-long-path-support.yml | enable-long-path-support.yml | YAML | 371 | 0.7 | 0.2 | 0 | react-lib | 842 | 2025-04-04T19:36:50.254348 | Apache-2.0 | false | b7fd671e7fc3de0ae163716169186dfe |
# cSpell:ignore changedfiles\n# cSpell:ignore Committish\n# cSpell:ignore LASTEXITCODE\n\nsteps:\n - template: /eng/common/pipelines/templates/steps/set-default-branch.yml\n - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:\n - pwsh: |\n # Find the default branch of the repo. The variable value sets in build step.\n Write-Host "Default Branch: $(DefaultBranch)"\n\n if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-eng/common")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")\n {\n $filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath 'eng/common/*' -DiffFilterType ""\n if ($filesInCommonDir.Count -gt 0)\n {\n Write-Host "##vso[task.LogIssue type=error;]Changes to files under 'eng/common' directory should not be made in this Repo`n${filesInCommonDir}"\n Write-Host "##vso[task.LogIssue type=error;]Please follow workflow at https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md"\n exit 1\n }\n }\n if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-.github/workflows")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")\n {\n # This list needs to be kept in sync with the FilePatterns listed in eng/pipelines/eng-workflows-sync.yml\n $filePatterns = @(".github/workflows/*event*", ".github/workflows/post-apiview.yml")\n $filesInCommonDir = @()\n foreach ($filePattern in $filePatterns) {\n $filesInCommonDir += & "eng/common/scripts/get-changedfiles.ps1" -DiffPath $filePattern -DiffFilterType ""\n }\n if ($filesInCommonDir.Count -gt 0)\n {\n Write-Host "##vso[task.LogIssue type=error;]Changes to files under '.github/workflows' directory should not be made in this Repo`n${filesInCommonDir}"\n Write-Host "##vso[task.LogIssue type=error;]Please follow workflow at https://github.com/Azure/azure-sdk-tools/blob/main/doc/workflows/engsys_workflows.md"\n exit 1\n }\n }\n displayName: Prevent changes to eng/common and .github/workflows outside of azure-sdk-tools repo\n condition: and(succeeded(), ne(variables['Skip.EngCommonWorkflowEnforcer'], 'true'), not(endsWith(variables['Build.Repository.Name'], '-pr')))\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\eng-common-workflow-enforcer.yml | eng-common-workflow-enforcer.yml | YAML | 2,387 | 0.8 | 0.131579 | 0.138889 | python-kit | 832 | 2024-03-16T02:05:33.678228 | MIT | false | aab3bcffc385d94a81c25571e51ae1bc |
parameters:\n BaseRepoBranch: not-specified\n BaseRepoOwner: azure-sdk\n CommitMsg: not-specified\n TargetRepoOwner: Azure\n TargetRepoName: $(Build.Repository.Name)\n PushArgs:\n WorkingDirectory: $(System.DefaultWorkingDirectory)'\n ScriptDirectory: eng/common/scripts\n SkipCheckingForChanges: false\n\nsteps:\n- task: PowerShell@2\n displayName: Check for changes\n condition: and(succeeded(), eq(${{ parameters.SkipCheckingForChanges }}, false))\n inputs:\n pwsh: true\n workingDirectory: ${{ parameters.WorkingDirectory }}\n filePath: ${{ parameters.ScriptDirectory }}/check-for-git-changes.ps1\n ignoreLASTEXITCODE: true\n\n- pwsh: |\n # Remove the repo owner from the front of the repo name if it exists there\n $repoName = "${{ parameters.TargetRepoName }}" -replace "^${{ parameters.TargetRepoOwner }}/", ""\n echo "##vso[task.setvariable variable=RepoNameWithoutOwner]$repoName"\n echo "RepoName = $repoName"\n displayName: Remove Repo Owner from Repo Name\n condition: succeeded()\n workingDirectory: ${{ parameters.WorkingDirectory }}\n\n- template: /eng/common/pipelines/templates/steps/emit-rate-limit-metrics.yml\n parameters:\n GitHubUser: azure-sdk\n GitHubToken: $(azuresdk-github-pat)\n\n- task: PowerShell@2\n displayName: Push changes\n condition: and(succeeded(), eq(variables['HasChanges'], 'true'))\n inputs:\n pwsh: true\n workingDirectory: ${{ parameters.WorkingDirectory }}\n filePath: ${{ parameters.ScriptDirectory }}/git-branch-push.ps1\n arguments: >\n -PRBranchName "${{ parameters.BaseRepoBranch }}"\n -CommitMsg "${{ parameters.CommitMsg }}"\n -GitUrl "https://$(azuresdk-github-pat)@github.com/${{ parameters.BaseRepoOwner }}/$(RepoNameWithoutOwner).git"\n -PushArgs "${{ parameters.PushArgs }}"\n -SkipCommit $${{ parameters.SkipCheckingForChanges }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\git-push-changes.yml | git-push-changes.yml | YAML | 1,827 | 0.8 | 0.0625 | 0.022727 | vue-tools | 591 | 2024-03-28T18:51:43.783990 | Apache-2.0 | false | ee16b1fbf91f26bc9c1a496af4426468 |
parameters:\n ToolPath: $(Pipeline.Workspace)/pipeline-generator\n\nsteps:\n - script: >\n mkdir pipeline-generator\n workingDirectory: $(Pipeline.Workspace)\n displayName: Setup working directory for pipeline generator.\n - script: >\n dotnet tool install\n Azure.Sdk.Tools.PipelineGenerator\n --version 1.1.0-dev.20250206.1\n --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json\n --tool-path ${{parameters.ToolPath}}\n workingDirectory: $(Pipeline.Workspace)/pipeline-generator\n displayName: 'Install pipeline generator tool'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\install-pipeline-generation.yml | install-pipeline-generation.yml | YAML | 613 | 0.8 | 0.125 | 0 | node-utils | 509 | 2025-06-18T09:27:52.614763 | GPL-3.0 | false | aa3f6235de7c907e13f24302a84a72e9 |
parameters: \n TargetFolder: ''\n\nsteps:\n - task: PythonScript@0\n displayName: MashUp Generated Index Site so its served from default site location\n inputs:\n scriptSource: inline\n script: |\n import argparse\n import os\n import logging\n import re\n import shutil\n from io import open\n\n SITE_INDEX = r'${{ parameters.SourceDirectory }}\docfx_project\_site'\n TOC_HTML_REGEX = r"\.\./toc.html"\n NAV_TOC_HTML_REGEX = r"api/"\n PREV_DIR_REGEX = r"\.\./"\n\n def locate_htmlfiles(directory):\n html_set = []\n for root, dirs, files in os.walk(directory):\n for file in files:\n html_set.append(os.path.join(root, file))\n return html_set\n \n def process_html(content):\n content = re.sub(TOC_HTML_REGEX, 'navtoc.html', content)\n content = re.sub(PREV_DIR_REGEX, '', content)\n return content\n \n def process_navtoc(content):\n content = re.sub(NAV_TOC_HTML_REGEX, '', content)\n return content\n\n if __name__ == "__main__":\n html_files = locate_htmlfiles(os.path.join(SITE_INDEX, 'api'))\n navtoc_location = os.path.join(SITE_INDEX, 'toc.html')\n\n # Process the main toc.html and rename it to navtoc.html\n try:\n logging.info(\n "Process {}.".format(navtoc_location)\n )\n with open(navtoc_location, "r", encoding="utf8") as navtoc_stream:\n navtoc_content = navtoc_stream.read()\n new_navtoc_content = process_navtoc(navtoc_content)\n logging.info("Process {}.".format(navtoc_content))\n with open(navtoc_location, "w", encoding="utf8") as html_stream:\n html_stream.write(new_navtoc_content)\n except Exception as e:\n logging.error(e)\n exit(1)\n\n # Rename main toc.html to navtoc.html\n os.rename(navtoc_location, os.path.join(SITE_INDEX, 'navtoc.html'))\n\n # Process all html in api directory\n for html_location in html_files:\n try:\n logging.info(\n "Process {}.".format(html_location)\n )\n with open(html_location, "r", encoding="utf8") as html_stream:\n html_content = html_stream.read()\n new_content = process_html(html_content)\n logging.info("Process {}.".format(html_location))\n with open(html_location, "w", encoding="utf8") as html_stream:\n html_stream.write(new_content)\n except Exception as e:\n logging.error(e)\n exit(1)\n \n # Move all files from api to main site home directory\n for html_location in html_files:\n shutil.copy(html_location, SITE_INDEX)\n \n # Delete API Directory\n shutil.rmtree(os.path.join(SITE_INDEX, 'api')) | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\mashup-doc-index.yml | mashup-doc-index.yml | YAML | 3,129 | 0.95 | 0.125 | 0.071429 | react-lib | 571 | 2025-03-04T23:09:55.073261 | Apache-2.0 | false | b37048a2154f977d738b649ed6c4a85d |
parameters:\n ExclusionDataBaseFileName: ''\n TargetDirectory: ''\n PublishAnalysisLogs: false\n ExclusionFilePath: "$(Build.SourcesDirectory)/eng/guardian-tools/policheck/PolicheckExclusions.xml"\n\nsteps:\n - task: AzurePowerShell@5\n displayName: 'Download Policheck Exclusion Database'\n inputs:\n azureSubscription: 'Azure SDK Artifacts'\n ScriptType: 'InlineScript'\n azurePowerShellVersion: LatestVersion \n pwsh: true\n Inline: |\n azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb" "$(Build.BinariesDirectory)"\n env:\n AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'\n\n - task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2\n displayName: 'Run PoliCheck'\n inputs:\n targetType: F\n targetArgument: "$(Build.SourcesDirectory)/${{ parameters.TargetDirectory }}"\n result: PoliCheck.sarif\n optionsFC: 0\n optionsXS: 1\n optionsPE: 1|2|3|4\n optionsRulesDBPath: "$(Build.BinariesDirectory)/${{ parameters.ExclusionDataBaseFileName }}.mdb"\n optionsUEPATH: ${{ parameters.ExclusionFilePath }}\n\n - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2\n displayName: 'Post Analysis (PoliCheck)'\n inputs:\n GdnBreakAllTools: false\n GdnBreakGdnToolPoliCheck: true\n GdnBreakGdnToolPoliCheckSeverity: Warning\n continueOnError: true\n\n - ${{ if eq(parameters.PublishAnalysisLogs, 'true') }}:\n - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3\n displayName: 'Publish Security Analysis Logs'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\policheck.yml | policheck.yml | YAML | 1,704 | 0.8 | 0.02381 | 0 | python-kit | 642 | 2023-11-22T10:10:41.800035 | BSD-3-Clause | false | 1dd8b819163f425b40e1676431ad7b55 |
# This step is used to prevent duplication of artifact publishes when there is an issue that would prevent the overall success of the job.\n# Ensuring that we only publish when successful (and two a differently named artifact otherwise) will allow easy retry on a build pipeline\n# without running into the "cannot override artifact" failure when we finally do get a passing run.\n\n# ArtifactName - The name of the artifact in the "successful" case.\n# ArtifactPath - The path we will be publishing.\n# CustomCondition - Used if there is additional logic necessary to prevent attempt of publish.\n# SbomEnabled - Set whether to auto-inject 1es pipeline template sbom tasks\n\nparameters:\n ArtifactName: ''\n ArtifactPath: ''\n CustomCondition: true\n SbomEnabled: true\n\nsteps:\n - pwsh: |\n if ($env:AGENT_JOBSTATUS -eq "Failed") {\n Write-Host "Setting artifact name to ${{ parameters.ArtifactName }}-FailedAttempt$(System.JobAttempt) because there were failures." \n Write-Host "##vso[task.setvariable variable=PublishArtifactName;]${{ parameters.ArtifactName }}-FailedAttempt$(System.JobAttempt)"\n } else {\n Write-Host "Setting artifact name to ${{ parameters.ArtifactName }}" \n Write-Host "##vso[task.setvariable variable=PublishArtifactName;]${{ parameters.ArtifactName }}"\n }\n condition: and(succeededOrFailed(), ${{ parameters.CustomCondition }})\n displayName: Set Artifact Name \n\n - task: 1ES.PublishPipelineArtifact@1\n condition: and(succeededOrFailed(), ${{ parameters.CustomCondition }})\n displayName: 'Publish ${{ parameters.ArtifactName }} Artifacts'\n inputs:\n artifactName: '$(PublishArtifactName)'\n targetPath: '${{ parameters.ArtifactPath }}'\n # Disable sbom generation by default for forked PR builds to avoid a bunch of warnings\n ${{ if not(and(eq(variables['Build.Reason'],'PullRequest'), eq(variables['System.PullRequest.IsFork'], 'True'))) }}:\n sbomEnabled: ${{ parameters.SbomEnabled }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\publish-1es-artifact.yml | publish-1es-artifact.yml | YAML | 1,985 | 0.8 | 0.111111 | 0.25 | python-kit | 557 | 2024-11-28T03:34:32.713835 | BSD-3-Clause | false | a5ab830ab2f357db4e3a3ed23b25f019 |
# This step is used to prevent duplication of artifact publishes when there is an issue that would prevent the overall success of the job.\n# Ensuring that we only publish when successful (and two a differently named artifact otherwise) will allow easy retry on a build pipeline\n# without running into the "cannot override artifact" failure when we finally do get a passing run.\n\n# ArtifactName - The name of the artifact in the "successful" case.\n# ArtifactPath - The path we will be publishing.\n# CustomCondition - Used if there is additional logic necessary to prevent attempt of publish.\n\nparameters:\n ArtifactName: ''\n ArtifactPath: ''\n CustomCondition: true\n\nsteps:\n - task: PublishPipelineArtifact@1\n condition: and(succeeded(), ${{ parameters.CustomCondition }})\n displayName: 'Publish ${{ parameters.ArtifactName }} Artifacts'\n inputs:\n artifactName: '${{ parameters.ArtifactName }}'\n path: '${{ parameters.ArtifactPath }}'\n\n - task: PublishPipelineArtifact@1\n condition: and(failed(), ${{ parameters.CustomCondition }})\n displayName: 'Publish failed ${{ parameters.ArtifactName }} Artifacts'\n inputs:\n artifactName: '${{ parameters.ArtifactName }}-FailedAttempt$(System.JobAttempt)'\n path: '${{ parameters.ArtifactPath }}'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\publish-artifact.yml | publish-artifact.yml | YAML | 1,275 | 0.8 | 0.037037 | 0.26087 | awesome-app | 53 | 2024-10-25T09:40:22.592822 | GPL-3.0 | false | 4f08b39de13804f7af9ad0787d40e506 |
parameters:\n FolderForUpload: ''\n TargetLanguage: ''\n BlobName: '' # To be removed once all usages are removed in the languages\n BlobAccountName: 'https://azuresdkdocs.blob.core.windows.net'\n ScriptPath: 'eng/common/scripts/copy-docs-to-blobstorage.ps1'\n ArtifactLocation: ''\n RepoId: $(Build.Repository.Name)\n\nsteps:\n- template: /eng/common/pipelines/templates/steps/set-default-branch.yml\n\n- task: AzurePowerShell@5\n displayName: 'Copy Docs to Blob Storage'\n continueOnError: false\n inputs:\n azureSubscription: 'Azure SDK Artifacts'\n ScriptType: 'FilePath'\n ScriptPath: ${{ parameters.ScriptPath }}\n ScriptArguments: >\n -DocLocation "${{ parameters.FolderForUpload }}"\n -BlobAccountName "${{ parameters.BlobAccountName }}"\n -PublicArtifactLocation "${{ parameters.ArtifactLocation }}"\n -RepoReplaceRegex "(https://github.com/${{ parameters.RepoId }}/(?:blob|tree)/)$(DefaultBranch)"\n azurePowerShellVersion: latestVersion\n pwsh: true\n env:\n AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\publish-blobs.yml | publish-blobs.yml | YAML | 1,028 | 0.8 | 0 | 0 | vue-tools | 31 | 2024-05-08T11:13:16.046595 | GPL-3.0 | false | 204f683caec50516d2cbbb9811998992 |
parameters: \n TargetFolder: ''\n RootFolder: ''\n BuildSHA: ''\n RepoId: $(Build.Repository.Name)\n\nsteps:\n - task: PythonScript@0\n displayName: Replace Relative Readme Links with Absolute References\n inputs:\n scriptSource: inline\n script: |\n import argparse\n import sys\n import os\n import logging\n import glob\n import re\n import fnmatch\n from io import open\n try:\n from pathlib import Path\n except:\n from pathlib2 import Path\n\n # This script is intended to be run against a single folder. All readme.md files (regardless of casing) will have the relative links\n # updated with appropriate full reference links. This is a recursive update..\n\n logging.getLogger().setLevel(logging.INFO)\n\n RELATIVE_LINK_REPLACEMENT_SYNTAX = (\n "https://github.com/{repo_id}/tree/{build_sha}/{target_resource_path}"\n )\n\n LINK_DISCOVERY_REGEX = r"\[([^\]]*)\]\(([^)]+)\)"\n PREDEFINED_LINK_DISCOVERY_REGEX = r"(\[[^\]]+]\:)\s*([^\s]+)"\n\n IMAGE_FILE_EXTENSIONS = ['.jpeg', '.jpg', '.png', '.gif', '.tiff']\n RELATIVE_LINK_REPLACEMENT_SYNTAX_FOR_IMAGE = (\n "https://github.com/{repo_id}/raw/{build_sha}/{target_resource_path}"\n )\n\n def locate_readmes(directory):\n readme_set = []\n\n for root, dirs, files in os.walk(directory):\n for file in files:\n if file.lower() == "readme.md":\n readme_set.append(os.path.join(root, file))\n return readme_set\n\n\n def is_relative_link(link_value, readme_location):\n link_without_location = link_value\n if link_without_location.find('#') > 0:\n link_without_location = link_without_location[0:link_without_location.find('#')]\n\n try:\n return os.path.exists(\n os.path.abspath(os.path.join(os.path.dirname(readme_location), link_without_location))\n )\n except:\n return False\n\n\n def replace_relative_link(match, readme_location, root_folder, build_sha, repo_id):\n link_path = match.group(2).strip()\n\n if is_relative_link(link_path, readme_location):\n # if it is a relative reference, we need to find the path from the root of the repository\n resource_absolute_path = os.path.abspath(\n os.path.join(os.path.dirname(readme_location), link_path)\n )\n placement_from_root = os.path.relpath(resource_absolute_path, root_folder)\n\n suffix = Path(placement_from_root).suffix\n if (suffix in IMAGE_FILE_EXTENSIONS):\n updated_link = RELATIVE_LINK_REPLACEMENT_SYNTAX_FOR_IMAGE.format(\n repo_id=repo_id,\n build_sha=build_sha,\n target_resource_path=placement_from_root,\n ).replace("\\", "/")\n else:\n updated_link = RELATIVE_LINK_REPLACEMENT_SYNTAX.format(\n repo_id=repo_id,\n build_sha=build_sha,\n target_resource_path=placement_from_root,\n ).replace("\\", "/")\n\n return "[{}]({})".format(match.group(1), updated_link)\n else:\n return match.group(0)\n\n def replace_predefined_relative_links(match, readme_location, root_folder, build_sha, repo_id):\n link_path = match.group(2).strip()\n\n if is_relative_link(link_path, readme_location):\n # if it is a relative reference, we need to find the path from the root of the repository\n resource_absolute_path = os.path.abspath(\n os.path.join(os.path.dirname(readme_location), link_path)\n )\n placement_from_root = os.path.relpath(resource_absolute_path, root_folder)\n\n suffix = Path(placement_from_root).suffix\n if (suffix in IMAGE_FILE_EXTENSIONS):\n updated_link = RELATIVE_LINK_REPLACEMENT_SYNTAX_FOR_IMAGE.format(\n repo_id=repo_id,\n build_sha=build_sha,\n target_resource_path=placement_from_root,\n ).replace("\\", "/")\n else:\n updated_link = RELATIVE_LINK_REPLACEMENT_SYNTAX.format(\n repo_id=repo_id,\n build_sha=build_sha,\n target_resource_path=placement_from_root,\n ).replace("\\", "/")\n\n return "{} {}".format(match.group(1), updated_link)\n else:\n return match.group(0)\n\n\n def transfer_content_to_absolute_references(\n root_folder, build_sha, repo_id, readme_location, content\n ):\n content = re.sub(\n LINK_DISCOVERY_REGEX,\n lambda match, readme_location=readme_location, root_folder=root_folder, build_sha=build_sha, repo_id=repo_id: replace_relative_link(\n match, readme_location, root_folder, build_sha, repo_id\n ),\n content,\n )\n\n content = re.sub(\n PREDEFINED_LINK_DISCOVERY_REGEX,\n lambda match, readme_location=readme_location, root_folder=root_folder, build_sha=build_sha, repo_id=repo_id: replace_predefined_relative_links(\n match, readme_location, root_folder, build_sha, repo_id\n ),\n content,\n )\n\n return content\n\n\n if __name__ == "__main__":\n parser = argparse.ArgumentParser(\n description="Replaces relative links for any README.md under the target folder. Given any discovered relative link, will replace with the provided repoId and SHA. Case insensitive"\n )\n\n parser.add_argument(\n "-t",\n "--target",\n dest="target_folder",\n help="The target folder that contains a README ",\n default="${{ parameters.TargetFolder }}",\n )\n\n parser.add_argument(\n "-i",\n "--repoid",\n dest="repo_id",\n help='The target repository used as the base for the path replacement. Full Id, example: "Azure/azure-sdk-for-net"',\n default="${{ parameters.RepoId }}",\n )\n\n parser.add_argument(\n "-r",\n "--root",\n dest="root_folder",\n help="The root directory of the repository. This gives us the ability to rationalize links in situations where a relative link traverses UPWARDS from the readme.",\n default="${{ parameters.RootFolder }}",\n )\n\n parser.add_argument(\n "-s",\n "--sha",\n dest="build_sha",\n help="The commit hash associated with this change. Using this will mean that links will never be broken.",\n default="${{ parameters.BuildSHA }}",\n )\n\n args = parser.parse_args()\n\n logging.info("Root Folder: {}".format(args.root_folder))\n logging.info("Target Folder: {}".format(args.target_folder))\n logging.info("Repository Id: {}".format(args.repo_id))\n logging.info("Build SHA: {}".format(args.build_sha))\n\n readme_files = locate_readmes(args.target_folder)\n\n for readme_location in readme_files:\n try:\n logging.info(\n "Running Relative Link Replacement on {}.".format(readme_location)\n )\n\n with open(readme_location, "r", encoding="utf-8") as readme_stream:\n readme_content = readme_stream.read()\n\n new_content = transfer_content_to_absolute_references(\n args.root_folder,\n args.build_sha,\n args.repo_id,\n readme_location,\n readme_content,\n )\n\n with open(readme_location, "w", encoding="utf-8") as readme_stream:\n readme_stream.write(new_content)\n \n except Exception as e:\n logging.error(e)\n exit(1)\n\n - script: |\n git diff -U0\n displayName: Highlight Readme Updates | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\replace-relative-links.yml | replace-relative-links.yml | YAML | 8,675 | 0.95 | 0.106481 | 0.022472 | node-utils | 148 | 2024-11-16T13:04:52.799631 | Apache-2.0 | false | 8922faafb12df9fcd9c1ced95b53c48f |
parameters:\n - name: DaysValid\n default: 731\n type: number\n\nsteps:\n - task: PowerShell@2\n displayName: Retain pipeline run\n env:\n SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n inputs:\n pwsh: true\n filePath: $(Build.SourcesDirectory)/eng/common/scripts/Add-RetentionLease.ps1\n arguments: >\n -Organization azure-sdk\n -Project $(System.TeamProject)\n -DefinitionId $(System.DefinitionId)\n -RunId $(Build.BuildId)\n -DaysValid ${{ parameters.DaysValid }}\n -AccessToken $env:SYSTEM_ACCESSTOKEN\n -Debug | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\retain-run.yml | retain-run.yml | YAML | 577 | 0.7 | 0 | 0 | vue-tools | 297 | 2024-01-19T12:49:47.416333 | MIT | false | debce96c0b8ed54d2c15d7d2b32b73ce |
parameters:\n - name: ServiceDirectory\n type: string\n default: ""\n - name: DiffDirectory\n type: string\n default: $(Build.ArtifactStagingDirectory)/diff\n - name: PackageInfoDirectory\n type: string\n default: $(Build.ArtifactStagingDirectory)/PackageInfo\n - name: TargetPath\n type: string\n default: $(Build.SourcesDirectory)\n - name: ScriptDirectory\n type: string\n default: eng/common/scripts\n - name: ExcludePaths\n type: object\n default: []\n\nsteps:\n # There will be transitory period for every language repo where the <language> - pullrequest build definition will run\n # alongside the <language> - <service> - ci definitions. These pullrequest build definitions will have the ServiceDirectory parameter\n # set to 'auto', which will allow the expanding and contracting based on PR Diff.\n\n # The other public CI builds will pass a real service directory, which will not activate the PR diff logic and as such will operate\n # as before this change.\n - ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(parameters.ServiceDirectory, 'auto')) }}:\n - task: Powershell@2\n displayName: Generate PR Diff\n inputs:\n targetType: inline\n script: >\n ${{ parameters.ScriptDirectory }}/Generate-PR-Diff.ps1\n -TargetPath '${{ parameters.TargetPath }}'\n -ArtifactPath '${{ parameters.DiffDirectory }}'\n -ExcludePaths ('${{ convertToJson(parameters.ExcludePaths) }}' | ConvertFrom-Json)\n pwsh: true\n\n # When running in PR mode, we want the detected changed services to be attached to the build as tags.\n # However, the public identity does not have the permissions to attach tags to the build.\n # Instead, we will save the changed services to a file, attach it as an attachment for PiplineWitness to pick up and utilize.\n - pwsh: |\n $changedServices = (Get-Content -Path '${{ parameters.DiffDirectory }}/diff.json' -Raw | ConvertFrom-Json).ChangedServices\n\n if ($changedServices) {\n Write-Host "Attaching changed service names to the build for additional tag generation."\n $changedServices | ConvertTo-Json -AsArray | Out-File -FilePath $(System.DefaultWorkingDirectory)/tags.json -Encoding utf8\n Write-Host '##vso[task.addattachment type=AdditionalTags;name=AdditionalTags;]$(System.DefaultWorkingDirectory)/tags.json'\n }\n displayName: Upload tags.json with changed services\n\n - task: Powershell@2\n displayName: Save package properties filtered for PR\n inputs:\n filePath: ${{ parameters.ScriptDirectory }}/Save-Package-Properties.ps1\n arguments: >\n -PrDiff '${{ parameters.DiffDirectory }}/diff.json'\n -OutDirectory '${{ parameters.PackageInfoDirectory }}'\n pwsh: true\n - ${{ else }}:\n - task: Powershell@2\n displayName: Save package properties\n inputs:\n filePath: ${{ parameters.ScriptDirectory }}/Save-Package-Properties.ps1\n arguments: >\n -ServiceDirectory '${{parameters.ServiceDirectory}}'\n -OutDirectory '${{ parameters.PackageInfoDirectory }}'\n -AddDevVersion:($env:SETDEVVERSION -eq 'true')\n pwsh: true\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\save-package-properties.yml | save-package-properties.yml | YAML | 3,273 | 0.8 | 0.085714 | 0.123077 | vue-tools | 747 | 2023-08-10T22:31:39.059022 | BSD-3-Clause | false | b291ce64eabdb3584f40e1045eef8747 |
parameters:\n - name: DailyBranchVariableName\n type: string\n default: TargetBranchName\n\nsteps:\n - pwsh: |\n $branchName = $env:DAILYDOCSBRANCHNAMEOVERRIDE\n if (!$branchName) {\n $branchName = "daily/$(Get-Date -Format 'yyyy-MM-dd')-ignore-build"\n }\n Write-Host "Daily Branch Name: $branchName"\n Write-Host "##vso[task.setvariable variable=${{ parameters.DailyBranchVariableName }};]$branchName"\n displayName: Set daily docs branch name in $(${{ parameters.DailyBranchVariableName }})\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\set-daily-docs-branch-name.yml | set-daily-docs-branch-name.yml | YAML | 524 | 0.8 | 0.071429 | 0 | python-kit | 674 | 2025-02-15T14:50:46.792880 | GPL-3.0 | false | 8b4cbff349edae4da3d0495d5baabe50 |
parameters:\n WorkingDirectory: '$(System.DefaultWorkingDirectory)'\n RemoteRepo: 'origin'\n DefaultBranchVariableName: DefaultBranch\n Condition: 'succeeded()'\nsteps:\n- pwsh: |\n $setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1'\n if ($LASTEXITCODE -ne 0) {\n Write-Host "Not able to fetch the default branch from git command. Set to main."\n $setDefaultBranch = 'main'\n }\n Write-Host "Setting ${{ parameters.DefaultBranchVariableName }}=$setDefaultBranch"\n Write-Host "##vso[task.setvariable variable=${{ parameters.DefaultBranchVariableName }}]$setDefaultBranch"\n displayName: "Setup Default Branch"\n workingDirectory: ${{ parameters.workingDirectory }}\n condition: ${{ parameters.Condition }}\n ignoreLASTEXITCODE: true\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\set-default-branch.yml | set-default-branch.yml | YAML | 823 | 0.8 | 0.055556 | 0 | awesome-app | 412 | 2024-07-31T02:17:29.642289 | GPL-3.0 | false | 50010fddfde5517fabe0752669e508a3 |
parameters:\n - name: Paths\n type: object\n default: []\n - name: Repositories\n type: object\n default:\n - Name: $(Build.Repository.Name)\n Commitish: $(Build.SourceVersion)\n WorkingDirectory: $(System.DefaultWorkingDirectory)\n - name: SkipCheckoutNone\n type: boolean\n default: false\n - name: TokenToUseForAuth\n type: string\n default: ''\n\nsteps:\n - ${{ if not(parameters.SkipCheckoutNone) }}:\n - checkout: none\n\n - ${{ if ne(parameters.TokenToUseForAuth, '') }}:\n - pwsh: |\n $base64Token = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nobody:${{ parameters.TokenToUseForAuth }}"))\n Write-Host "##vso[task.setvariable variable=_base64AuthToken;issecret=true;]$base64Token"\n git config set --global "http.extraheader" "AUTHORIZATION: basic $base64Token"\n displayName: Setup git config auth header\n\n - task: PowerShell@2\n ${{ if eq(length(parameters.Repositories), 1) }}:\n displayName: 'Sparse checkout ${{ parameters.Repositories[0].Name }}'\n ${{ else }}:\n displayName: 'Sparse checkout repositories'\n inputs:\n targetType: inline\n # Define this inline, because of the chicken/egg problem with loading a script when nothing\n # has been checked out yet.\n script: |\n # Setting $PSNativeCommandArgumentPassing to 'Legacy' to use PowerShell\n # 7.2 behavior for command argument passing. Newer behaviors will result\n # in errors from git.exe.\n $PSNativeCommandArgumentPassing = 'Legacy'\n\n function Retry()\n {\n Run 3 @args\n }\n\n function Run()\n {\n $retries, $command, $arguments = $args\n if ($retries -isnot [int]) {\n $command, $arguments = $args\n $retries = 0\n }\n Write-Host "==>" $command $arguments\n $attempt = 0\n $sleep = 5\n\n while ($true) {\n $attempt++\n & $command $arguments\n if (!$LASTEXITCODE) { return }\n if ($attempt -gt $retries) { exit $LASTEXITCODE }\n Write-Warning "Attempt $attempt failed: $_. Trying again in $sleep seconds..."\n Start-Sleep -Seconds $sleep\n $sleep *= 2\n }\n }\n\n function SparseCheckout([Array]$paths, [Hashtable]$repository)\n {\n $dir = $repository.WorkingDirectory\n if (!$dir) {\n $dir = "./$($repository.Name)"\n }\n New-Item $dir -ItemType Directory -Force | Out-Null\n Push-Location $dir\n\n if (Test-Path .git/info/sparse-checkout) {\n $hasInitialized = $true\n Write-Host "Repository $($repository.Name) has already been initialized in $pwd. Skipping this step."\n } else {\n Write-Host "Repository $($repository.Name) is being initialized in $pwd"\n\n if ($repository.Commitish -match '^refs/pull/\d+/merge$') {\n Retry git clone --no-checkout --filter=tree:0 -c remote.origin.fetch=''+$($repository.Commitish):refs/remotes/origin/$($repository.Commitish)'' https://github.com/$($repository.Name) .\n } else {\n Retry git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) .\n }\n\n # Turn off git GC for sparse checkout. Note: The devops checkout task does this by default\n Run git config gc.auto 0\n\n Run git sparse-checkout init\n\n # Set non-cone mode otherwise path filters will not work in git >= 2.37.0\n # See https://github.blog/2022-06-27-highlights-from-git-2-37/#tidbits\n # '/*' '!/*/' -> only checkout files in top level directory\n # '/eng' -> checkout required eng/ scripts/configs\n # '.config' -> required for files like .config/1espt/PipelineAutobaseliningConfig.yml and .config/guardian/.gdnbaselines used by 1es PT scripts\n git sparse-checkout set --no-cone '/*' '!/*/' '/eng' '/.config'\n }\n\n # Prevent wildcard expansion in Invoke-Expression (e.g. for checkout path '/*')\n $quotedPaths = $paths | ForEach-Object { "'$_'" }\n $gitsparsecmd = "git sparse-checkout add $quotedPaths"\n Write-Host $gitsparsecmd\n Invoke-Expression -Command $gitsparsecmd\n\n Write-Host "Set sparse checkout paths to:"\n Get-Content .git/info/sparse-checkout\n\n # sparse-checkout commands after initial checkout will auto-checkout again\n if (!$hasInitialized) {\n # Remove refs/heads/ prefix from branch names\n $commitish = $repository.Commitish -replace '^refs/heads/', ''\n\n # use -- to prevent git from interpreting the commitish as a path\n # This will use the default branch if repo.Commitish is empty\n Retry git -c advice.detachedHead=false checkout $commitish --\n } else {\n Write-Host "Skipping checkout as repo has already been initialized"\n }\n\n Pop-Location\n }\n\n # Paths may be sourced as a yaml object literal OR a dynamically generated variable json string.\n # If the latter, convertToJson will wrap the 'string' in quotes, so remove them.\n $paths = '${{ convertToJson(parameters.Paths) }}'.Trim('"') | ConvertFrom-Json\n # Replace windows backslash paths, as Azure Pipelines default directories are sometimes formatted like 'D:\a\1\s'\n $repositories = '${{ convertToJson(parameters.Repositories) }}' -replace '\\', '/' | ConvertFrom-Json -AsHashtable\n foreach ($repo in $Repositories) {\n SparseCheckout $paths $repo\n }\n pwsh: true\n workingDirectory: $(System.DefaultWorkingDirectory)\n\n - ${{ if ne(parameters.TokenToUseForAuth, '') }}:\n - pwsh: |\n git config unset --global "http.extraheader"\n displayName: Removing git config auth header\n condition: always()\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\sparse-checkout.yml | sparse-checkout.yml | YAML | 6,076 | 0.95 | 0.138889 | 0.152 | awesome-app | 260 | 2025-05-27T08:47:15.574791 | BSD-3-Clause | false | 55eeb6a1749adec10bb9bdd5c9a55185 |
parameters:\n - name: PackageInfoLocations\n type: object\n default: []\n - name: RepoId\n type: string\n default: $(Build.Repository.Name)\n - name: WorkingDirectory\n type: string\n default: ''\n - name: ScriptDirectory\n type: string\n default: eng/common/scripts\n - name: TargetDocRepoName\n type: string\n default: ''\n - name: TargetDocRepoOwner\n type: string\n - name: Language\n type: string\n default: ''\n - name: DailyDocsBuild\n type: boolean\n default: false\n - name: SparseCheckoutPaths\n type: object\n default:\n - '**'\n - name: PackageSourceOverride\n type: string\n default: ''\nsteps:\n - ${{ if eq(length(parameters.PackageInfoLocations), 0) }}:\n - pwsh: |\n Write-Host "Skipping DocsMS Update because package list was empty."\n displayName: Skip DocsMS Update\n - ${{ else }}:\n - template: /eng/common/pipelines/templates/steps/enable-long-path-support.yml\n\n - pwsh: |\n Write-Host "###vso[task.setvariable variable=DocRepoLocation]${{ parameters.WorkingDirectory }}/doc"\n displayName: Set $(DocRepoLocation)\n\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n SkipCheckoutNone: true\n Repositories:\n - Name: ${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }}\n WorkingDirectory: $(DocRepoLocation)\n Paths: ${{ parameters.SparseCheckoutPaths }}\n\n # If performing a daily docs build set the $(TargetBranchName) to a daily branch\n # name and attempt to checkout the daily docs branch. If the branch doesn't\n # exist, create it\n - ${{ if eq(parameters.DailyDocsBuild, 'true') }}:\n - template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml\n\n - pwsh: |\n $ErrorActionPreference = "Continue"\n $RemoteName = "origin"\n $BranchName = "$(TargetBranchName)"\n # Fetch and checkout remote branch if it already exists otherwise create a new branch.\n git ls-remote --exit-code --heads $RemoteName $BranchName\n if ($LASTEXITCODE -eq 0) {\n Write-Host "git fetch $RemoteName $BranchName"\n git fetch $RemoteName $BranchName\n Write-Host "git checkout $BranchName."\n git checkout $BranchName\n } else {\n Write-Host "git checkout -b $BranchName."\n git checkout -b $BranchName\n }\n displayName: Checkout daily docs branch if it exists\n workingDirectory: $(DocRepoLocation)\n\n # If NOT performing a daily docs build, set the $(TargetBranchName) to the\n # default branch of the documentation repository.\n - ${{ if ne(parameters.DailyDocsBuild, 'true') }}:\n - template: /eng/common/pipelines/templates/steps/set-default-branch.yml\n parameters:\n WorkingDirectory: $(DocRepoLocation)\n DefaultBranchVariableName: TargetBranchName\n - pwsh: |\n $packageInfoJson = '${{ convertToJson(parameters.PackageInfoLocations) }}'.Trim('"').Replace("\\", "/")\n # Without -NoEnumerate, a single element array[T] gets unwrapped as a single item T.\n $packageInfoLocations = ConvertFrom-Json $packageInfoJson -NoEnumerate\n ${{ parameters.ScriptDirectory }}/Update-DocsMsMetadata.ps1 `\n -PackageInfoJsonLocations $packageInfoLocations `\n -DocRepoLocation "$(DocRepoLocation)" `\n -Language '${{parameters.Language}}' `\n -RepoId '${{ parameters.RepoId }}' `\n -PackageSourceOverride '${{ parameters.PackageSourceOverride }}'\n displayName: Apply Documentation Updates\n\n - template: /eng/common/pipelines/templates/steps/git-push-changes.yml\n parameters:\n BaseRepoBranch: $(TargetBranchName)\n BaseRepoOwner: ${{ parameters.TargetDocRepoOwner }}\n CommitMsg: "Update docs metadata"\n TargetRepoName: ${{ parameters.TargetDocRepoName }}\n TargetRepoOwner: ${{ parameters.TargetDocRepoOwner }}\n WorkingDirectory: $(DocRepoLocation)\n ScriptDirectory: ${{ parameters.WorkingDirectory }}/${{ parameters.ScriptDirectory }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\update-docsms-metadata.yml | update-docsms-metadata.yml | YAML | 4,129 | 0.8 | 0.058252 | 0.072165 | python-kit | 882 | 2024-04-22T11:08:15.894780 | GPL-3.0 | false | dbf409933570b9ab3578de956f0171f3 |
parameters:\n ArtifactPath: $(Build.ArtifactStagingDirectory)\n Artifacts: []\n ConfigFileDir: $(Build.ArtifactStagingDirectory)/PackageInfo\n\nsteps:\n - ${{ if and(ne(variables['Skip.PackageValidation'], 'true'), and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))) }}:\n - pwsh: |\n echo "##vso[task.setvariable variable=SetAsReleaseBuild]false"\n displayName: "Set as release build"\n condition: and(succeeded(), eq(variables['SetAsReleaseBuild'], ''))\n\n - task: AzureCLI@2\n inputs:\n azureSubscription: opensource-api-connection\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: |\n $(Build.SourcesDirectory)/eng/common/scripts/Validate-All-Packages.ps1 `\n -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) `\n -ArtifactPath ${{ parameters.ArtifactPath }} `\n -RepoRoot $(Build.SourcesDirectory) `\n -APIKey $(azuresdk-apiview-apikey) `\n -ConfigFileDir '${{ parameters.ConfigFileDir }}' `\n -BuildDefinition $(System.CollectionUri)$(System.TeamProject)/_build?definitionId=$(System.DefinitionId) `\n -PipelineUrl $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId) `\n -IsReleaseBuild $$(SetAsReleaseBuild)\n workingDirectory: $(Pipeline.Workspace)\n displayName: Validate packages and update work items\n continueOnError: true\n condition: >-\n and(\n succeededOrFailed(),\n not(endsWith(variables['Build.Repository.Name'], '-pr'))\n )\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\validate-all-packages.yml | validate-all-packages.yml | YAML | 1,672 | 0.8 | 0.028571 | 0 | vue-tools | 794 | 2023-12-07T10:29:16.284514 | GPL-3.0 | false | 790326de3dd2c448f849b2df6df0af06 |
parameters:\n WorkingDirectory: '$(System.DefaultWorkingDirectory)'\nsteps:\n - pwsh: |\n $differByCaseFiles = git ls-files | Group-Object | Where-Object { $_.Count -gt 1 } \n\n if ($differByCaseFiles) \n {\n foreach ($fileGroup in $differByCaseFiles) {\n Write-Host "Duplicated Files: "\n Write-Host "[ $($fileGroup.Group) ]"\n }\n Write-Host "Do NOT name the files which only differ in case. Please check above files."\n exit 1\n }\n Write-Host "There are no file names that only differ in case."\n displayName: Check file case duplicates\n workingDirectory: ${{ parameters.WorkingDirectory }} | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\validate-filename.yml | validate-filename.yml | YAML | 657 | 0.7 | 0.058824 | 0 | python-kit | 58 | 2025-07-06T00:29:25.669562 | BSD-3-Clause | false | e3454c9366dc8fb8c186f62c25b23113 |
parameters:\n - name: ScriptDirectory\n type: string\n default: 'eng/common/scripts'\n - name: AgentImage\n type: string\n\nsteps:\n - task: PowerShell@2\n displayName: Verify agent OS\n inputs:\n pwsh: true\n workingDirectory: $(System.DefaultWorkingDirectory)\n filePath: ${{ parameters.ScriptDirectory }}/Verify-AgentOS.ps1\n arguments: >\n -AgentImage "${{ parameters.AgentImage }}"\n\n - template: /eng/common/pipelines/templates/steps/bypass-local-dns.yml\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\verify-agent-os.yml | verify-agent-os.yml | YAML | 491 | 0.7 | 0 | 0 | awesome-app | 202 | 2024-03-05T05:02:13.853429 | GPL-3.0 | false | 3ee023e8d8d592979207a14cd0b61b19 |
parameters:\n- name: PackageName\n type: string\n default: 'not-specified'\n- name: ServiceName\n type: string\n default: ''\n- name: ServiceDirectory\n type: string\n default: ''\n- name: ForRelease\n type: boolean\n default: false\n- name: Condition\n type: string\n default: succeeded()\n\nsteps:\n - task: Powershell@2\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLog.ps1\n arguments: >\n -PackageName '${{ parameters.PackageName }}'\n -ServiceDirectory '${{ coalesce(parameters.ServiceDirectory, parameters.ServiceName) }}'\n -ForRelease $${{ parameters.ForRelease }}\n pwsh: true\n workingDirectory: $(Pipeline.Workspace)\n displayName: Verify ChangeLogEntry for ${{ parameters.PackageName }}\n condition: ${{ parameters.Condition }}\n continueOnError: false\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\verify-changelog.yml | verify-changelog.yml | YAML | 835 | 0.7 | 0.033333 | 0 | python-kit | 445 | 2024-04-29T16:53:07.136741 | MIT | false | 78ced3e313281abaf142b531c2ba72eb |
parameters:\n- name: PackagePropertiesFolder\n type: string\n- name: Condition\n type: string\n default: succeeded()\n\nsteps:\n - task: Powershell@2\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLogs.ps1\n arguments: >\n -PackagePropertiesFolder '${{ parameters.PackagePropertiesFolder }}'\n pwsh: true\n displayName: Verify ChangeLogEntries\n condition: ${{ parameters.Condition }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\verify-changelogs.yml | verify-changelogs.yml | YAML | 438 | 0.7 | 0 | 0 | node-utils | 938 | 2023-11-26T13:27:03.034410 | MIT | false | 206125428e5227b9da55bfc2ef55ea51 |
parameters:\n Directory: 'not-specified'\n IgnoreLinksFile: '$(Build.SourcesDirectory)/eng/ignore-links.txt'\n WorkingDirectory: '$(System.DefaultWorkingDirectory)'\n ScriptDirectory: 'eng/common/scripts'\n Recursive: $false\n CheckLinkGuidance: $true\n Urls: '(Get-ChildItem -Path ./ -Recurse -Include *.md)'\n BranchReplaceRegex: "^(${env:SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI}/(?:blob|tree)/)$(DefaultBranch)(/.*)$"\n BranchReplacementName: "${env:SYSTEM_PULLREQUEST_SOURCECOMMITID}"\n Condition: succeeded() # If you want to run on failure for the link checker, set it to `Condition: succeededOrFailed()`.\n\nsteps:\n - template: /eng/common/pipelines/templates/steps/set-default-branch.yml\n parameters:\n Condition: ${{ parameters.Condition }}\n - task: PowerShell@2\n displayName: Link verification check\n condition: ${{ parameters.Condition }}\n inputs:\n pwsh: true\n workingDirectory: '${{ parameters.WorkingDirectory }}/${{ parameters.Directory }}'\n filePath: ${{ parameters.ScriptDirectory }}/Verify-Links.ps1\n arguments: >\n -urls ${{ parameters.Urls }}\n -rootUrl "file://${{ parameters.WorkingDirectory }}/${{ parameters.Directory }}"\n -recursive: ${{ parameters.Recursive }}\n -ignoreLinksFile ${{ parameters.IgnoreLinksFile }}\n -branchReplaceRegex "${{ parameters.BranchReplaceRegex }}"\n -branchReplacementName ${{ parameters.BranchReplacementName }}\n -devOpsLogging: $true\n -checkLinkGuidance: ${{ parameters.CheckLinkGuidance }}\n -inputCacheFile "https://azuresdkartifacts.blob.core.windows.net/verify-links-cache/verify-links-cache.txt"\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\verify-links.yml | verify-links.yml | YAML | 1,647 | 0.8 | 0.030303 | 0 | vue-tools | 852 | 2024-12-18T07:52:01.851332 | MIT | false | b72d585bb5a6580d2e7f24dae84c4538 |
# Template for all Python Scripts in this repository\nparameters:\n SourceDirectory: ''\n BasePathLength: 49\n Condition: succeeded()\n\nsteps:\n - task: PythonScript@0\n displayName: Analyze Path Lengths\n condition: ${{ parameters.Condition }}\n inputs:\n scriptSource: inline\n script: |\n # Verifies Length of file path for all files in the SourceDirectory.\n # File paths and directory paths must be less than 260 and 248 characters respectively on windows OS\n # Repo users get a limited number of characters for the repo clone path. As Specified by the BasePathLength parameter.\n # Script makes sure that paths in the repo are less than 260 and 248 for files and directories respectively after adding the BasePathLength.\n import os\n import sys\n\n source_directory = r'${{ parameters.SourceDirectory }}'\n break_switch = False\n long_file_paths = []\n long_dir_paths = []\n\n def pluralize(string, plural_string, count):\n return plural_string if count > 1 else string\n\n print('Analyzing length of paths...')\n for root, dirs, files in os.walk('{0}'.format(source_directory)):\n for file in files:\n file_path = os.path.relpath(os.path.join(root, file), source_directory)\n if ((len(file_path) + ${{ parameters.BasePathLength }}) > 260):\n long_file_paths.append(file_path)\n\n dir_path = os.path.relpath(root, source_directory)\n if ((len(dir_path) + ${{ parameters.BasePathLength }}) > 248):\n long_dir_paths.append(dir_path)\n\n if (len(long_file_paths) > 0):\n print('With a base path length of {0} the following file path{1} exceed the allow path length of 260 characters'.format(${{ parameters.BasePathLength }}, pluralize('', 's', len(long_file_paths))))\n print(*long_file_paths, sep = "\n")\n break_switch = True\n\n if (len(long_dir_paths) > 0):\n print('With a base path length of {0} the following directory path{1} exceed the allow path length of 248 characters'.format(${{ parameters.BasePathLength }}, pluralize('', 's', len(long_dir_paths))))\n print(*long_dir_paths, sep = "\n")\n break_switch = True\n\n if break_switch == True:\n print("Some file paths are too long. Please reduce path lengths")\n exit(1)\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\verify-path-length.yml | verify-path-length.yml | YAML | 2,429 | 0.95 | 0.25 | 0.113636 | node-utils | 578 | 2024-10-10T14:49:06.609019 | MIT | false | 3baaf32af5a7a950cf732ba16ba598ea |
parameters:\n- name: ScanPath\n type: string\n default: ''\n # Where ScanPath takes a single path, ScanPaths takes a comma separated list of paths to scan\n- name: ScanPaths\n type: string\n default: ''\n- name: RepoRoot\n type: string\n default: $(Build.SourcesDirectory)\n- name: SettingsPath\n type: string\n default: '$(Build.SourcesDirectory)/eng/.docsettings.yml'\n- name: DocWardenVersion\n type: string\n default: ''\n- name: Condition\n type: string\n default: succeeded()\n\nsteps:\n- task: PowerShell@2\n displayName: "Verify Readmes"\n condition: ${{ parameters.Condition }}\n inputs:\n filePath: "eng/common/scripts/Verify-Readme.ps1"\n arguments: >\n -DocWardenVersion '${{ parameters.DocWardenVersion }}'\n -ScanPaths '${{ coalesce(parameters.ScanPath, parameters.ScanPaths) }}'\n -RepoRoot ${{ parameters.RepoRoot }}\n -SettingsPath ${{ parameters.SettingsPath }}\n pwsh: true | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\verify-readme.yml | verify-readme.yml | YAML | 905 | 0.8 | 0 | 0.03125 | awesome-app | 932 | 2025-01-15T14:24:01.804926 | MIT | false | 284782c9d8bcae7627d1085c9ff3ff6a |
parameters:\n- name: PackagePropertiesFolder\n type: string\n- name: RepoRoot\n type: string\n default: $(Build.SourcesDirectory)\n- name: SettingsPath\n type: string\n default: '$(Build.SourcesDirectory)/eng/.docsettings.yml'\n- name: DocWardenVersion\n type: string\n default: ''\n- name: Condition\n type: string\n default: succeeded()\n- name: IncludeIndirect\n type: boolean\n default: true\n\nsteps:\n- pwsh: |\n $includeIndirect = $${{ parameters.IncludeIndirect }}\n $packageProperties = Get-ChildItem -Recurse "${{ parameters.PackagePropertiesFolder }}" *.json\n $paths = @()\n\n if (-not $includeIndirect) {\n $packageProperties = $packageProperties | Where-Object { (Get-Content -Raw $_ | ConvertFrom-Json).IncludedForValidation -eq $false }\n }\n\n foreach($propertiesFile in $packageProperties) {\n $PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json\n\n $paths += (Join-Path "$(Build.SourcesDirectory)" $PackageProp.DirectoryPath)\n }\n\n $scanPaths = $paths -join ","\n Write-Host "##vso[task.setvariable variable=ScanPathArgument;]$scanPaths"\n displayName: Populate Scan Paths\n condition: ${{ parameters.Condition }}\n\n- task: PowerShell@2\n displayName: "Verify Readmes"\n condition: ${{ parameters.Condition }}\n inputs:\n filePath: "eng/common/scripts/Verify-Readme.ps1"\n arguments: >\n -DocWardenVersion '${{ parameters.DocWardenVersion }}'\n -ScanPaths '$(ScanPathArgument)'\n -RepoRoot ${{ parameters.RepoRoot }}\n -SettingsPath ${{ parameters.SettingsPath }}\n pwsh: true\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\verify-readmes.yml | verify-readmes.yml | YAML | 1,552 | 0.8 | 0.019608 | 0 | node-utils | 959 | 2024-06-05T10:03:21.209618 | GPL-3.0 | false | 747cbdd215da0791c37f1b807ce4128c |
parameters:\n- name: ServiceDirectory\n type: string\n default: ''\n- name: PackageName\n type: string\n default: ''\n- name: ArtifactLocation\n type: string\n default: ''\n\nsteps:\n - task: Powershell@2\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-RestApiSpecLocation.ps1\n arguments: >\n -ServiceDirectory "${{ parameters.ServiceDirectory }}"\n -PackageName "${{ parameters.PackageName }}"\n -ArtifactLocation: "${{ parameters.ArtifactLocation }}"\n pwsh: true\n workingDirectory: $(Pipeline.Workspace)\n displayName: Verify REST API spec location for "${{ parameters.PackageName }}"\n env:\n GH_TOKEN: $(azuresdk-github-pat)\n condition: and(succeededOrFailed(), ne(variables['Skip.Verify-RestApiSpecLocation'], 'true'))\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\verify-restapi-spec-location.yml | verify-restapi-spec-location.yml | YAML | 795 | 0.7 | 0.04 | 0 | python-kit | 929 | 2024-08-06T19:50:47.839546 | BSD-3-Clause | false | ddd9d8461ab536a4409f05361a9f61ed |
steps:\n - task: Powershell@2\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/common/scripts/Write-FileSystemMetrics.ps1\n pwsh: true\n displayName: Write filesystem metrics\n continueOnError: true\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\pipelines\templates\steps\write-filesystemmetrics.yml | write-filesystemmetrics.yml | YAML | 228 | 0.7 | 0 | 0 | node-utils | 43 | 2024-07-05T19:43:30.725894 | MIT | false | 44450dd37ef26bf05e46c36fe1a02d23 |
parameters:\n rootFolder: '$(Build.SourcesDirectory)'\n\nsteps:\n - pwsh: |\n New-Item -ItemType Directory -Force "${{ parameters.rootFolder }}/proxy-logs"\n Copy-Item -Path "${{ parameters.rootFolder }}/test-proxy.log" -Destination "${{ parameters.rootFolder }}/proxy-logs/proxy.log"\n Copy-Item -Path "${{ parameters.rootFolder }}/test-proxy-error.log" -Destination "${{ parameters.rootFolder }}/proxy-logs/proxy-error.log"\n displayName: Copy Log File\n condition: succeededOrFailed()\n\n - template: ../pipelines/templates/steps/publish-artifact.yml\n parameters:\n ArtifactName: "$(System.StageName)-$(System.JobName)-$(System.JobAttempt)-proxy-logs"\n ArtifactPath: "${{ parameters.rootFolder }}/proxy-logs"\n\n - pwsh: |\n Remove-Item -Force ${{ parameters.rootFolder }}/proxy-logs/proxy.log\n displayName: Cleanup Copied Log File\n condition: succeededOrFailed()\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\testproxy\publish-proxy-logs.yml | publish-proxy-logs.yml | YAML | 901 | 0.7 | 0 | 0 | vue-tools | 281 | 2024-01-17T17:17:55.557438 | Apache-2.0 | true | ce75b1cf33d93b3bd5c3c9ab4777ba8f |
# Cloud Configuration will be splat into parameters of `Add-AzEnvironment`. It\n# should be JSON in the form (not all fields are required):\n# {\n# "Name": "<environment name>",\n# "PublishSettingsFileUrl": "<publish settings file url>",\n# "ServiceEndpoint": "<service endpoint>",\n# "ManagementPortalUrl": "<management portal url>",\n# "ActiveDirectoryEndpoint": "<active directory endpoint>",\n# "ActiveDirectoryServiceEndpointResourceId": "<active directory service endpoint resource id>",\n# "ResourceManagerEndpoint": "<resource manager endpoint>",\n# "GalleryEndpoint": "<gallery endpoint>",\n# "GraphEndpoint": "<graph endpoint>",\n# "GraphAudience": "<graph audience>",\n# "AzureKeyVaultDnsSuffix": "<key vault suffix>",\n# "AzureKeyVaultServiceEndpointResourceId": "<key vault service endpoint resource id>"\n# }\n\nsteps:\n - bash: sudo chown -R runner ~/.Azure\n displayName: (MacOS) Grant access to ~/.Azure\n condition: contains(variables['OSVmImage'], 'mac')\n\n - task: Powershell@2\n displayName: Setup Az Modules and Dogfood Environment\n inputs:\n targetType: inline\n pwsh: true\n script: |\n eng/common/scripts/Import-AzModules.ps1\n\n $environmentSpec = @"\n $(env-config-dogfood)\n "@ | ConvertFrom-Json -AsHashtable;\n Add-AzEnvironment @environmentSpec\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\common\TestResources\setup-environments.yml | setup-environments.yml | YAML | 1,335 | 0.95 | 0 | 0.516129 | awesome-app | 244 | 2024-07-19T00:37:01.509243 | GPL-3.0 | true | 011856cfb75ffdb5deca000b01109f81 |
pr: none\n\ntrigger:\n branches:\n include:\n - main\n paths:\n include:\n - eng/containers/\n\nextends:\n template: /eng/pipelines/templates/stages/1es-redirect.yml\n parameters:\n stages:\n - stage:\n displayName: Docker Build and Publish\n variables:\n - template: /eng/pipelines/templates/variables/globals.yml\n - template: /eng/pipelines/templates/variables/image.yml\n - name: configPath\n value: ./eng/containers/UbuntuNetCoreKeyring\n - name: containerRegistry\n value: 'azsdkengsys'\n - name: imageRepository\n value: 'dotnet/ubuntu_netcore_keyring'\n - name: imageTag\n value: $(build.buildid)\n\n jobs:\n - job:\n displayName: Docker Build and Publish\n pool:\n name: $(LINUXPOOL)\n image: $(LINUXVMIMAGE)\n os: linux\n\n templateContext:\n outputs:\n - output: containerImage\n image: image:tag\n remoteImage:\n - $(containerRegistry).azurecr.io/$(imageRepository):$(imageTag)\n\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n\n - task: AzureCLI@2\n displayName: Login to $(containerRegistry)\n inputs:\n azureSubscription: "Azure SDK Engineering System"\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: |\n az acr login --name $(containerRegistry)\n\n - task: 1ES.BuildContainerImage@1\n displayName: Build Docker Image\n inputs:\n path: $(configPath)\n image: image:tag\n enableNetwork: true\n useBuildKit: true\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\containers\ci.yml | ci.yml | YAML | 1,684 | 0.7 | 0 | 0 | vue-tools | 352 | 2024-10-22T13:13:44.121988 | MIT | false | a293bf5386f636a577ecc1dc5a20f398 |
trigger:\n branches:\n include:\n - main\n paths:\n include:\n - eng/packages/http-client-csharp\n - eng/scripts/typespec\npr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n paths:\n include:\n - eng/packages/http-client-csharp\n - eng/scripts/typespec\n\nparameters:\n - name: UseTypeSpecNext\n displayName: "Use TypeSpec Next"\n type: boolean\n default: false\n - name: ShouldPublish\n displayName: "Publish packages"\n type: boolean\n default: false\n - name: PublishPublic\n displayName: "Publish to npmjs.org"\n type: boolean\n default: false\n - name: ShouldRegenerate\n displayName: "Regenerate clients"\n type: boolean\n default: false\n - name: PublishNugetPackages\n displayName: "Publish NuGet package artifacts"\n type: boolean\n default: false\n\nvariables:\n - template: /eng/pipelines/templates/variables/image.yml\n\nextends:\n template: /eng/common/pipelines/templates/archetype-typespec-emitter.yml\n parameters:\n EmitterPackageJsonOutputPath: eng/http-client-csharp-emitter-package.json\n EmitterPackagePath: eng/packages/http-client-csharp\n SparseCheckoutPaths:\n - /sdk/core/Azure.Core/src/Shared\n - /sdk/core/Azure.Core.TestFramework/src\n BuildPrereleaseVersion: true\n UseTypeSpecNext: ${{ parameters.UseTypeSpecNext }}\n ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n ${{ if eq(variables['Build.Reason'], 'Manual') }}:\n ShouldPublish: ${{ parameters.ShouldPublish }}\n ShouldRegenerate: ${{ parameters.ShouldRegenerate }}\n HasNugetPackages: ${{ parameters.PublishNugetPackages }}\n ${{ if startswith(variables['Build.SourceBranch'], 'refs/pull/') }}: # PR ref's can't be published to public, even in a manual run\n PublishPublic: false\n PublishDependsOnTest: false\n ${{ else }}: # Any other manual run can go to public\n PublishPublic: ${{ parameters.PublishPublic }}\n PublishDependsOnTest: ${{ parameters.PublishPublic }}\n ${{ else }}: # All automatic runs publish, but only CI of main goes public\n ShouldPublish: true\n ShouldRegenerate: true\n PublishDependsOnTest: false\n PublishPublic: ${{ and(eq(variables['Build.Reason'], 'IndividualCI'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}\n HasNugetPackages: true\n RegenerationJobCount: 5\n MinimumPerJob: 10\n OnlyGenerateTypespec: true\n TestMatrix:\n All:\n TestArguments: -UnitTests -GenerationChecks -Filter .NET\n SpectorName: "http-client-csharp"\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\packages\http-client-csharp\ci.yml | ci.yml | YAML | 2,619 | 0.8 | 0.037975 | 0 | react-lib | 739 | 2024-06-23T17:27:31.752161 | GPL-3.0 | false | 25b6f9ce4ddb65ec6a4b615b8be8cbb8 |
trigger:\n branches:\n include:\n - main\n paths:\n include:\n - eng/packages/http-client-csharp\n - eng/packages/http-client-csharp-mgmt\n - eng/scripts/typespec\npr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n paths:\n include:\n - eng/packages/http-client-csharp\n - eng/packages/http-client-csharp-mgmt\n - eng/scripts/typespec\n\nparameters:\n - name: UseTypeSpecNext\n displayName: "Use TypeSpec Next"\n type: boolean\n default: false\n - name: ShouldPublish\n displayName: "Publish packages"\n type: boolean\n default: false\n - name: PublishPublic\n displayName: "Publish to npmjs.org"\n type: boolean\n default: false\n - name: ShouldRegenerate\n displayName: "Regenerate clients"\n type: boolean\n default: false\n\nvariables:\n - template: /eng/pipelines/templates/variables/image.yml\n\nextends:\n template: /eng/common/pipelines/templates/archetype-typespec-emitter.yml\n parameters:\n EmitterPackageJsonOutputPath: eng/http-client-csharp-mgmt-emitter-package.json\n EmitterPackagePath: eng/packages/http-client-csharp-mgmt\n SparseCheckoutPaths:\n - /sdk/core/Azure.Core/src/Shared\n - /sdk/core/Azure.Core.TestFramework/src\n BuildPrereleaseVersion: true\n UseTypeSpecNext: ${{ parameters.UseTypeSpecNext }}\n ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n ${{ if eq(variables['Build.Reason'], 'Manual') }}:\n ShouldPublish: ${{ parameters.ShouldPublish }}\n ShouldRegenerate: ${{ parameters.ShouldRegenerate }}\n ${{ if startswith(variables['Build.SourceBranch'], 'refs/pull/') }}: # PR ref's can't be published to public, even in a manual run\n PublishPublic: false\n PublishDependsOnTest: false\n ${{ else }}: # Any other manual run can go to public\n PublishPublic: ${{ parameters.PublishPublic }}\n PublishDependsOnTest: ${{ parameters.PublishPublic }}\n ${{ else }}: # All automatic runs publish, but only CI of main goes public\n ShouldPublish: true\n ShouldRegenerate: true\n PublishDependsOnTest: false\n PublishPublic: ${{ and(eq(variables['Build.Reason'], 'IndividualCI'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}\n RegenerationJobCount: 5\n MinimumPerJob: 10\n OnlyGenerateTypespec: true\n TestMatrix:\n All:\n TestArguments: -UnitTests -GenerationChecks -Filter .NET\n SpectorName: "http-client-csharp-mgmt"\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\packages\http-client-csharp-mgmt\ci.yml | ci.yml | YAML | 2,509 | 0.8 | 0.04 | 0 | python-kit | 646 | 2025-02-03T12:30:58.371006 | GPL-3.0 | false | 23fbbd55c17e8cd8d40214bad9f9ec26 |
trigger: none\n\npr:\n branches:\n include:\n - main\n paths:\n include:\n - eng/pipelines/aggregate-reports.yml\n - eng/CredScanSuppression.json\n\npool:\n name: azsdk-pool-mms-win-2022-general\n vmImage: windows-2022\n\nvariables:\n - template: templates/variables/globals.yml\n\nstages:\n - stage: AggregateReports\n displayName: Aggregate Reports\n\n jobs:\n - job: GenerateReports\n timeoutInMinutes: 120\n steps:\n - template: /eng/pipelines/templates/steps/install-dotnet.yml\n\n - task: PowerShell@2\n displayName: Download Latest Dev Packages\n inputs:\n pwsh: true\n filePath: 'eng/scripts/DownloadDevPackages.ps1'\n arguments: >\n -WorkingDirectory '$(Build.ArtifactStagingDirectory)'\n -NupkgFilesDestination 'nupkgFiles'\n\n - pwsh: |\n ."eng/common/spelling/Invoke-Cspell.ps1" `\n -CSpellConfigPath "./.vscode/cspell.json" `\n -ScanGlobs "sdk/*/*/api/*.cs"\n displayName: Check spelling of public API surface\n # Spelling errors in public api surface are not blockers yet but will\n # become blockers when this is rolled out to all services. For now, turn\n # the pipeline yellow if spelling errors are detected but do not block.\n continueOnError: true\n\n - template: /eng/common/pipelines/templates/steps/verify-links.yml\n parameters:\n Directory: ""\n CheckLinkGuidance: $true\n\n - pwsh: |\n New-Item -Path '$(Build.ArtifactStagingDirectory)' -Name 'reports' -ItemType 'directory'\n displayName: Create Directory for Aggregate Reports\n\n - task: PowerShell@2\n displayName: Generate Dependency Report\n inputs:\n pwsh: true\n filePath: 'eng/scripts/dependencies/AnalyzeDeps.ps1'\n arguments: >\n -PackagesPath '$(Build.ArtifactStagingDirectory)/nupkgFiles'\n -LockfilePath '$(Build.SourcesDirectory)/eng/Packages.Data.props'\n -OutPath '$(Build.ArtifactStagingDirectory)/reports/dependencies.html'\n -DumpPath '$(Build.ArtifactStagingDirectory)/reports'\n\n - task: PowerShell@2\n displayName: 'Generate azure-sdk.deps.json'\n inputs:\n pwsh: true\n filePath: 'eng/scripts/dependencies/generate-deps.ps1'\n arguments: >\n -PackagesPath '$(Build.ArtifactStagingDirectory)/nupkgFiles'\n -DepsOutputFile '$(Build.ArtifactStagingDirectory)/reports/azure-sdk.deps.json'\n -ProjectRefPath '$(Build.ArtifactStagingDirectory)/reports'\n\n - task: PowerShell@2\n displayName: 'Validate dependencies with pwsh servicing'\n inputs:\n pwsh: true\n filePath: 'eng/scripts/dependencies/compare-deps-files.ps1'\n arguments: >\n -PSDepsFile 'https://aka.ms/ps-deps-servicing'\n -AzSdkDepsFile '$(Build.ArtifactStagingDirectory)/reports/azure-sdk.deps.json'\n\n - task: PowerShell@2\n displayName: 'Validate dependencies with pwsh stable'\n inputs:\n pwsh: true\n filePath: 'eng/scripts/dependencies/compare-deps-files.ps1'\n arguments: >\n -PSDepsFile 'https://aka.ms/ps-deps-stable'\n -AzSdkDepsFile '$(Build.ArtifactStagingDirectory)/reports/azure-sdk.deps.json'\n\n - task: PowerShell@2\n displayName: 'Validate dependencies with pwsh preview'\n inputs:\n pwsh: true\n filePath: 'eng/scripts/dependencies/compare-deps-files.ps1'\n arguments: >\n -PSDepsFile 'https://aka.ms/ps-deps-preview'\n -AzSdkDepsFile '$(Build.ArtifactStagingDirectory)/reports/azure-sdk.deps.json'\n\n - task: PublishPipelineArtifact@1\n displayName: 'Publish Report Artifacts'\n inputs:\n artifactName: reports\n path: '$(Build.ArtifactStagingDirectory)/reports'\n\n - task: AzureFileCopy@6\n displayName: 'Upload Dependency Report'\n inputs:\n sourcePath: '$(Build.ArtifactStagingDirectory)/reports/*'\n azureSubscription: 'Azure SDK Artifacts'\n destination: AzureBlob\n storage: azuresdkartifacts\n containerName: 'azure-sdk-for-net'\n blobPrefix: dependencies\n AdditionalArgumentsForBlobCopy: '--exclude-pattern=*data.js*'\n\n - task: AzureFileCopy@6\n displayName: 'Upload Dependency Graph'\n inputs:\n sourcePath: '$(Build.ArtifactStagingDirectory)/reports/*'\n azureSubscription: 'Azure SDK Artifacts'\n destination: AzureBlob\n storage: azuresdkartifacts\n containerName: 'azure-sdk-for-net'\n blobPrefix: dependencies/dependencyGraph\n AdditionalArgumentsForBlobCopy: '--include-pattern=*data.js*'\n\n - task: PowerShell@2\n displayName: "Verify Repository Resource Refs"\n inputs:\n pwsh: true\n workingDirectory: $(Build.SourcesDirectory)\n filePath: eng/common/scripts/Verify-Resource-Ref.ps1\n\n - stage: ComplianceTools\n displayName: Compliance Tools\n dependsOn: []\n\n jobs:\n - job: ComplianceTools\n timeoutInMinutes: 120\n steps:\n - template: /eng/common/pipelines/templates/steps/policheck.yml\n parameters:\n ExclusionDataBaseFileName: "DotNetPoliCheckExclusion"\n PublishAnalysisLogs: false\n\n - template: /eng/common/pipelines/templates/steps/credscan.yml\n parameters:\n BaselineFilePath: $(Build.sourcesdirectory)/eng/dotnet.gdnbaselines\n\n - job: APIScan\n timeoutInMinutes: 180\n steps:\n - template: /eng/pipelines/templates/steps/install-dotnet.yml\n\n - task: PowerShell@2\n displayName: Download Latest Dev Packages\n inputs:\n pwsh: true\n filePath: 'eng/scripts/DownloadDevPackages.ps1'\n arguments: >\n -WorkingDirectory '$(Build.ArtifactStagingDirectory)'\n -NupkgFilesDestination 'nupkgFiles'\n\n - task: AzureCLI@2\n displayName: Azure CLI Login\n inputs:\n azureSubscription: azure-sdk-apiscan\n scriptType: pscore\n scriptLocation: inlineScript\n addSpnToEnvironment: true\n inlineScript: |\n az --version\n az account show -o json\n Write-Host "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$($env:servicePrincipalId)"\n Write-Host "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$($env:tenantId)"\n Write-Host "##vso[task.setvariable variable=ARM_OIDC_TOKEN;issecret=true]$($env:idToken)"\n\n - pwsh: |\n # Need to re-login with the az login so that it presists and can be used in the APISca task\n az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_OIDC_TOKEN)\n az account show -o json\n displayName: Persist CLI Login for ApiScan usage\n\n - task: securedevelopmentteam.vss-secure-development-tools.build-task-apiscan.APIScan@2\n displayName: 'Run APIScan'\n inputs:\n softwareFolder: $(Build.ArtifactStagingDirectory)\n # SoftwareName cannot change as it is used for looking up baselining data\n softwareName: 'Azure SDK Libraries'\n softwareVersionNum: '$(OfficialBuildId)'\n isLargeApp: false\n preserveLogsFolder: true\n verbosityLevel: standard\n env:\n AzureServicesAuthConnectionString: RunAs=Developer;DeveloperTool=AzureCli\n\n - pwsh: |\n az account show -o json\n az logout\n az account clear\n displayName: Logout of Azure CLI\n condition: succeededOrFailed()\n\n - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2\n displayName: 'Post Analysis (ApiScan)'\n inputs:\n GdnBreakAllTools: false\n GdnBreakGdnToolApiScan: true\n GdnBreakGdnToolApiScanSeverity: Warning\n continueOnError: true\n\n - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3\n displayName: 'Publish Analysis Logs'\n inputs:\n APIScan: true\n condition: succeededOrFailed()\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\aggregate-reports.yml | aggregate-reports.yml | YAML | 8,981 | 0.8 | 0.026906 | 0.025773 | awesome-app | 196 | 2023-11-15T10:33:56.821116 | BSD-3-Clause | false | 97e80c4198bcc730f2e27ce7c29a6b78 |
trigger: none\n\nparameters:\n- name: UpdateMain\n displayName: |\n Update main branch.\n type: boolean\n default: true\n\n- name: StartMainSDKCIRun\n displayName: |\n Kick off the main SDK CI docs run when manually running the pipeline\n type: boolean\n default: false\n\n- name: ForceDailyUpdate\n displayName: |\n Force the daily branch update (includes starting daily branch run).\n type: boolean\n default: false\n\n\nvariables:\n - template: /eng/pipelines/templates/variables/globals.yml\n - template: /eng/pipelines/templates/variables/image.yml\n\n # Globals sets skipComponentGovernanceDetection by default\n - name: skipComponentGovernanceDetection\n value: false\n\njobs:\n - template: /eng/common/pipelines/templates/jobs/docindex.yml\n\n - job: UpdateDocsMsBuildConfig\n pool:\n name: $(LINUXPOOL)\n variables:\n DocRepoLocation: $(Pipeline.Workspace)/docs\n steps:\n # Checkout the eng folder from the SDK repo\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n SkipCheckoutNone: true\n Paths:\n # This is for retrieving code owners for service level readme metadata\n - .github/CODEOWNERS\n\n # Sync docs repo\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths:\n - bundlepackages/\n - metadata/\n - docs-ref-toc/\n - api/overview/azure\n Repositories:\n - Name: $(DocRepoOwner)/$(DocRepoName)\n WorkingDirectory: $(DocRepoLocation)\n\n # Install the tool for toc step to use\n - task: NuGetToolInstaller@1\n inputs:\n versionSpec: 6.3.1\n\n - template: /eng/common/pipelines/templates/steps/set-default-branch.yml\n\n # Updating main is the default reason to kick off manual builds of the docIndex run.\n # Manual builds of docIndex are typically done to update Main when certain updates are\n # made. These updates include new libraries and CSV updates in azure-sdk which, depending\n # on the column(s) updated can cause anything from package deprecation to service level\n # readme or ToC updates.\n - ${{ if or(eq(variables['Build.Reason'], 'Schedule'), parameters.UpdateMain) }}:\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1\n arguments: >-\n -DocRepoLocation $(DocRepoLocation)\n displayName: Verify Required Docs Json Members\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1\n arguments: -DocRepoLocation $(DocRepoLocation)\n displayName: Move deprecated packages to legacy moniker\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Update-DocsMsPackages.ps1\n arguments: -DocRepoLocation $(DocRepoLocation)\n displayName: Update Docs Onboarding for main branch\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1\n arguments: >-\n -DocRepoLocation $(DocRepoLocation)\n -ReadmeFolderRoot 'api/overview/azure'\n displayName: Generate Service Level Readme for main branch\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Update-DocsMsToc.ps1\n arguments: >-\n -DocRepoLocation $(DocRepoLocation)\n -OutputLocation $(DocRepoLocation)/docs-ref-toc/reference-unified.yml\n -ReadmeFolderRoot "api/overview/azure"\n displayName: Generate ToC for main branch\n\n - template: /eng/common/pipelines/templates/steps/git-push-changes.yml\n parameters:\n BaseRepoBranch: $(DefaultBranch)\n BaseRepoOwner: $(DocRepoOwner)\n CommitMsg: "Update docs CI configuration"\n TargetRepoName: $(DocRepoName)\n TargetRepoOwner: $(DocRepoOwner)\n WorkingDirectory: $(DocRepoLocation)\n\n - task: AzureCLI@2\n displayName: Queue Docs CI build for main branch\n condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(${{ parameters.StartMainSDKCIRun }}, true)))\n inputs:\n azureSubscription: msdocs-apidrop-connection\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: |\n # Resource here is the Devops API scope\n $accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv\n $buildParamJson = (@{ params = (Get-Content ./eng/docsSDKCIConfig.json -Raw) -replace '%%DocsBranchName%%', "main" } | ConvertTo-Json)\n eng/common/scripts/Queue-Pipeline.ps1 `\n -Organization "apidrop" `\n -Project "Content%20CI" `\n -DefinitionId 397 `\n -BuildParametersJson $buildParamJson `\n -BearerToken $accessToken\n\n # The scenario for running a Manual build is normally only for the main updates. The daily build\n # should really only get kicked off for scheduled runs.\n - ${{ if or(eq(variables['Build.Reason'], 'Schedule'), parameters.ForceDailyUpdate) }}:\n - template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml\n parameters:\n DailyBranchVariableName: DailyDocsBranchName\n - pwsh: |\n $ErrorActionPreference = "Continue"\n git checkout "origin/$(DailyDocsBranchName)" 2>&1 | Out-Null\n $LASTEXITCODE = 0 # This ignores any error from git checkout\n git status\n displayName: Checkout daily branch if it exists\n workingDirectory: $(DocRepoLocation)\n\n - pwsh: |\n $publicFeedUrl = "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"\n Write-Host "##vso[task.setvariable variable=PackageSourceOverride]$publicFeedUrl"\n displayName: Set package source variable\n workingDirectory: $(DocRepoLocation)\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1\n arguments: >-\n -DocRepoLocation $(DocRepoLocation)\n displayName: Verify Required Docs Json Members\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1\n arguments: -DocRepoLocation $(DocRepoLocation)\n displayName: Move deprecated packages to legacy moniker\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Update-DocsMsPackages.ps1\n # Use the dotnet public daily package preview feed as the source for\n # updated packages.\n arguments: >\n -DocRepoLocation $(DocRepoLocation)\n -PackageSourceOverride $(PackageSourceOverride)\n displayName: Update Docs Onboarding for Daily docs\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1\n arguments: >-\n -DocRepoLocation $(DocRepoLocation)\n -ReadmeFolderRoot 'api/overview/azure'\n displayName: Generate Service Level Readme for Daily docs\n\n - task: Powershell@2\n inputs:\n pwsh: true\n filePath: eng/common/scripts/Update-DocsMsToc.ps1\n arguments: >-\n -DocRepoLocation $(DocRepoLocation)\n -OutputLocation $(DocRepoLocation)/docs-ref-toc/reference-unified.yml\n -ReadmeFolderRoot "api/overview/azure"\n -PackageSourceOverride $(PackageSourceOverride)\n displayName: Generate ToC for Daily docs\n\n - template: /eng/common/pipelines/templates/steps/git-push-changes.yml\n parameters:\n BaseRepoBranch: $(DailyDocsBranchName)\n BaseRepoOwner: $(DocRepoOwner)\n CommitMsg: "Update targeting packages based on release metadata. (Daily docs)"\n TargetRepoName: $(DocRepoName)\n TargetRepoOwner: $(DocRepoOwner)\n WorkingDirectory: $(DocRepoLocation)\n ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts\n PushArgs: -f\n\n - task: AzureCLI@2\n displayName: Queue Docs CI build\n inputs:\n azureSubscription: msdocs-apidrop-connection\n scriptType: pscore\n scriptLocation: inlineScript\n inlineScript: |\n $accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv\n $buildParamJson = (@{ params = (Get-Content ./eng/docsSDKCIConfig.json -Raw) -replace '%%DocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)\n eng/common/scripts/Queue-Pipeline.ps1 `\n -Organization "apidrop" `\n -Project "Content%20CI" `\n -DefinitionId 397 `\n -BuildParametersJson $buildParamJson `\n -BearerToken $accessToken\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\docindex.yml | docindex.yml | YAML | 9,476 | 0.8 | 0.077586 | 0.073171 | vue-tools | 342 | 2023-09-28T02:52:13.214503 | BSD-3-Clause | false | e8dab21914b23edb633edb705c4e5eba |
trigger: none\n\nvariables:\n- template: /eng/pipelines/templates/variables/image.yml\n\nextends:\n template: /eng/common/pipelines/templates/jobs/prepare-pipelines.yml\n parameters:\n Repository: Azure/azure-sdk-for-net\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\prepare-pipelines.yml | prepare-pipelines.yml | YAML | 218 | 0.7 | 0.111111 | 0 | react-lib | 509 | 2023-11-30T23:44:52.262404 | MIT | false | 0fcc938b46190c91184d409a2146e83d |
pr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n - pipelinev3*\n paths:\n include:\n - "*"\n\n exclude:\n - eng/packages/http-client-csharp/\n\nparameters:\n - name: Service\n type: string\n default: auto\n # Switch to canary to test canary 1es branch. 1es template validation will set this parameter\n # to canary on run.\n - name: oneESTemplateTag\n type: string\n default: release\n values:\n - release\n - canary\n\nextends:\n template: /eng/pipelines/templates/stages/archetype-sdk-client.yml\n parameters:\n ServiceDirectory: ${{ parameters.Service }}\n CheckAOTCompat: true\n BuildSnippets: true\n oneESTemplateTag: ${{ parameters.oneESTemplateTag }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\pullrequest.yml | pullrequest.yml | YAML | 729 | 0.8 | 0 | 0.0625 | python-kit | 117 | 2023-09-17T08:53:02.733392 | MIT | false | c1aaccf8fce36c3e1857deb2d7f2f33d |
parameters:\n - name: Artifacts\n type: object\n default: []\n - name: TestPipeline\n type: boolean\n default: false\n - name: ServiceDirectory\n type: string\n default: not-specified\n - name: SDKType\n type: string\n default: all\n - name: CheckAOTCompat\n type: boolean\n default: false\n - name: AOTTestInputs\n type: object\n default: []\n - name: BuildSnippets\n type: boolean\n default: true\n - name: DependsOn\n type: string\n default: ''\n - name: CloudConfig\n type: object\n default: {}\n - name: Matrix\n type: string\n - name: UsePlatformContainer\n type: boolean\n default: false\n - name: OSName\n type: string\n\njobs:\n - job:\n displayName: "Build"\n dependsOn: ${{ parameters.DependsOn }}\n condition: and(succeededOrFailed(), ne(${{ parameters.Matrix }}, '{}'))\n strategy:\n matrix: $[ ${{ parameters.Matrix }} ]\n\n variables:\n - template: /eng/pipelines/templates/variables/codeql.yml\n - name: Codeql.BuildIdentifier\n value: ${{ parameters.ServiceDirectory }}\n - name: SDKType\n value: ${{ parameters.SDKType }}\n\n pool:\n # 1es pipeline templates converts `image` to demands: ImageOverride under the hood\n # which is incompatible with image selection in the default non-1es hosted pools\n ${{ if eq(parameters.OSName, 'macOS') }}:\n vmImage: $(OSVmImage)\n ${{ else }}:\n image: $(OSVmImage)\n name: $(Pool)\n os: ${{ parameters.OSName }}\n ${{ if eq(parameters.UsePlatformContainer, 'true') }}:\n # Add a default so the job doesn't fail when the matrix is empty\n container: $[ variables['Container'] ]\n\n steps:\n - template: /eng/pipelines/templates/steps/build.yml\n parameters:\n Artifacts: ${{ parameters.Artifacts }}\n TestPipeline: ${{ parameters.TestPipeline }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n SDKType: ${{ parameters.SDKType }}\n CheckAOTCompat: ${{ parameters.CheckAOTCompat }}\n AOTTestInputs: ${{ parameters.AOTTestInputs }}\n\n - job:\n displayName: "Analyze"\n dependsOn: ${{ parameters.DependsOn }}\n condition: and(succeededOrFailed(), ne(${{ parameters.Matrix }}, '{}'))\n\n # allow duplication of the job by matrix\n strategy:\n matrix: $[ ${{ parameters.Matrix }} ]\n\n # but immediately ignore the matrix for the job name\n pool:\n name: $(LINUXPOOL)\n image: $(LINUXVMIMAGE)\n os: linux\n\n steps:\n - template: /eng/pipelines/templates/steps/analyze.yml\n parameters:\n Artifacts: ${{ parameters.Artifacts }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n SDKType: ${{ parameters.SDKType }}\n BuildSnippets: ${{ parameters.BuildSnippets }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\jobs\batched-build-analyze.yml | batched-build-analyze.yml | YAML | 2,775 | 0.8 | 0.03125 | 0.056818 | vue-tools | 201 | 2024-09-03T11:12:48.321372 | MIT | false | 0a5330b8760fa5e95818f2be7a78757f |
parameters:\n - name: Artifacts\n type: object\n default: []\n - name: TestPipeline\n type: boolean\n default: false\n - name: ArtifactName\n type: string\n default: packages\n - name: SDKType\n type: string\n default: all\n - name: ServiceDirectory\n type: string\n default: not-specified\n - name: BuildSnippets\n type: boolean\n default: true\n - name: CheckAOTCompat\n type: boolean\n default: false\n - name: AOTTestInputs\n type: object\n default: []\n - name: TestSetupSteps\n type: stepList\n default: []\n - name: TestTimeoutInMinutes\n type: number\n - name: MatrixConfigs\n type: object\n - name: AdditionalMatrixConfigs\n type: object\n default: []\n - name: MatrixFilters\n type: object\n default: []\n - name: MatrixReplace\n type: object\n default: []\n - name: TestDependsOnDependency\n type: string\n default: not-specified\n - name: LimitForPullRequest\n type: boolean\n default: false\n - name: ExcludePaths\n type: object\n default: []\n\njobs:\n - ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n - template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml\n parameters:\n GenerateJobName: generate_build_matrix\n JobTemplatePath: /eng/pipelines/templates/jobs/batched-build-analyze.yml\n MatrixConfigs:\n - Name: NET_ci_build_base\n Path: eng/pipelines/templates/stages/build-matrix.json\n Selection: sparse\n GenerateVMJobs: true\n SparseCheckoutPaths:\n - "/*"\n - "!SessionRecords"\n EnablePRGeneration: true\n PRMatrixSetting: ProjectNames\n PRJobBatchSize: 10\n AdditionalParameters:\n Artifacts: ${{ parameters.Artifacts }}\n TestPipeline: ${{ parameters.TestPipeline }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n SDKType: ${{ parameters.SDKType }}\n CheckAOTCompat: ${{ parameters.CheckAOTCompat }}\n AOTTestInputs: ${{ parameters.AOTTestInputs }}\n BuildSnippets: ${{ parameters.BuildSnippets }}\n PreGenerationSteps:\n - template: /eng/pipelines/templates/steps/pr-matrix-presteps.yml\n parameters:\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n PublishingArtifactName: BuildPackagesArtifact\n ForceDirect: true\n ExcludePaths: ${{ parameters.ExcludePaths }}\n\n - ${{ else }}:\n - job: Build\n pool:\n name: $(WINDOWSPOOL)\n image: $(WINDOWSVMIMAGE)\n os: windows\n\n variables:\n - template: /eng/pipelines/templates/variables/codeql.yml\n - name: Codeql.BuildIdentifier\n value: ${{ parameters.ServiceDirectory }}\n - name: SDKType\n value: ${{ parameters.SDKType }}\n\n steps:\n - template: /eng/pipelines/templates/steps/build.yml\n parameters:\n Artifacts: ${{ parameters.Artifacts }}\n TestPipeline: ${{ parameters.TestPipeline }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n SDKType: ${{ parameters.SDKType }}\n CheckAOTCompat: ${{ parameters.CheckAOTCompat }}\n AOTTestInputs: ${{ parameters.AOTTestInputs }}\n\n - job: "Analyze"\n timeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}\n condition: and(succeededOrFailed(), ne(variables['Skip.Analyze'], true))\n templateContext:\n outputs:\n - output: pipelineArtifact\n targetPath: '$(Build.ArtifactStagingDirectory)'\n artifactName: 'verify'\n\n pool:\n name: $(LINUXPOOL)\n image: $(LINUXVMIMAGE)\n os: linux\n\n steps:\n - template: /eng/pipelines/templates/steps/analyze.yml\n parameters:\n Artifacts: ${{ parameters.Artifacts }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n SDKType: ${{ parameters.SDKType }}\n BuildSnippets: ${{ parameters.BuildSnippets }}\n\n # For some pipelines like mgmt which are tested in aggregate we want to limit the pipeline to no tests or\n # other stages that are aggregate in nature as those are tested in another aggregate pipeline\n - ${{ if or(ne(variables['Build.Reason'], 'PullRequest'), ne(parameters.LimitForPullRequest, 'true')) }}:\n - job: Compliance\n pool:\n name: $(WINDOWSPOOL)\n image: $(WINDOWSVMIMAGE)\n os: windows\n steps:\n - task: UsePythonVersion@0\n displayName: "Use Python 3.11"\n inputs:\n versionSpec: "3.11"\n\n - template: /eng/common/pipelines/templates/steps/validate-filename.yml\n\n - template: /eng/common/pipelines/templates/steps/check-spelling.yml\n\n - template: /eng/common/pipelines/templates/steps/verify-links.yml\n parameters:\n ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:\n Directory: ''\n Urls: (eng/common/scripts/get-markdown-files-from-changed-files.ps1)\n ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:\n Directory: sdk/${{ parameters.ServiceDirectory }}\n CheckLinkGuidance: $true\n\n - template: /eng/common/pipelines/templates/steps/verify-path-length.yml\n parameters:\n SourceDirectory: $(Build.SourcesDirectory)\n\n - template: /eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml\n\n - template: /eng/common/pipelines/templates/steps/credscan.yml\n parameters:\n BaselineFilePath: $(Build.sourcesdirectory)/eng/dotnet.gdnbaselines\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n\n - template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml\n parameters:\n GenerateJobName: generate_target_service_test_matrix\n JobTemplatePath: /eng/pipelines/templates/jobs/ci.tests.yml\n MatrixConfigs: ${{ parameters.MatrixConfigs }}\n MatrixFilters: ${{ parameters.MatrixFilters }}\n MatrixReplace: ${{ parameters.MatrixReplace }}\n CloudConfig:\n Cloud: public\n ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n SparseCheckoutPaths:\n - "/*"\n - "!SessionRecords"\n EnablePRGeneration: true\n PRMatrixSetting: ProjectNames\n PRJobBatchSize: 20\n PRMatrixIndirectFilters:\n - 'AdditionalTestArguments=.*true'\n - 'Pool=.*LinuxPool$'\n PreGenerationSteps:\n - template: /eng/pipelines/templates/steps/pr-matrix-presteps.yml\n parameters:\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n PublishingArtifactName: TestPackagesArtifact\n ExcludePaths: ${{ parameters.ExcludePaths }}\n\n AdditionalParameters:\n SDKType: ${{ parameters.SDKType }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n TestSetupSteps: ${{ parameters.TestSetupSteps }}\n TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}\n\n - ${{ if ne(parameters.TestDependsOnDependency, 'not-specified') }}:\n - template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml\n parameters:\n GenerateJobName: generate_target_dependencies_test_matrix\n JobTemplatePath: /eng/pipelines/templates/jobs/ci.tests.yml\n MatrixConfigs: ${{ parameters.MatrixConfigs }}\n MatrixFilters: ${{ parameters.MatrixFilters }}\n MatrixReplace:\n # Force UseProjectReferenceToAzureClients option to always be true because we only want to test with ProjectReference for dependency tests\n - AdditionalTestArguments=\/p:UseProjectReferenceToAzureClients\=false/\/p:UseProjectReferenceToAzureClients\=true\n - ${{ each matrixReplace in parameters.MatrixReplace }}:\n - ${{ matrixReplace }}\n CloudConfig:\n Cloud: public\n SparseCheckoutPaths:\n - /*\n - '!/sdk/*/**/SessionRecords/*'\n PreGenerationSteps:\n - ${{ each config in parameters.MatrixConfigs }}:\n - template: /eng/pipelines/templates/steps/dependency.tests.yml\n parameters:\n TestDependsOnDependency: ${{ parameters.TestDependsOnDependency }}\n # The value for ProjectListOverrideFilePropertyName should be the same as AdditionalParameters ProjectListOverrideFilePropertyName below\n ProjectListOverrideFilePropertyName: 'ProjectListOverrideFile'\n ProjectFilesOutputFolder: $(Build.ArtifactStagingDirectory)\n ExcludeTargetTestProjects: true\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n MatrixConfigsFile: ${{ config.Path }}\n AdditionalParameters:\n SDKType: ${{ parameters.SDKType }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n TestSetupSteps: ${{ parameters.TestSetupSteps }}\n TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}\n # The value for ProjectListOverrideFilePropertyName should be the same as dependency.tests.yml parameter ProjectListOverrideFilePropertyName\n ProjectListOverrideFilePropertyName: 'ProjectListOverrideFile'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\jobs\ci.yml | ci.yml | YAML | 9,223 | 0.8 | 0.038298 | 0.022936 | node-utils | 629 | 2024-08-30T15:43:00.419595 | BSD-3-Clause | false | 7bc2fbb48d226805fd7815704b1571ee |
parameters:\n- name: BuildToolsPath\n type: string\n default: '$(Build.SourcesDirectory)/azure-sdk-build-tools'\n- name: NugetVersion\n type: string\n default: '5.4.x'\n- name: DependsOn\n type: string\n default: Build\n- name: ShouldPublishToNuget\n type: boolean\n default: false\n- name: ShouldPublishToDevOps\n type: boolean\n default: false\n\n\njobs:\n - job: Release\n dependsOn: ${{ parameters.DependsOn }}\n pool:\n name: azsdk-pool-mms-win-2022-general\n vmImage: windows-2022\n\n steps:\n - checkout: self\n\n - checkout: azure-sdk-build-tools\n\n - download: current\n artifact: packages\n displayName: Download published Nuget Packages\n\n - template: pipelines/steps/net-signing.yml@azure-sdk-build-tools\n parameters:\n PackagesPath: '$(PIPELINE.WORKSPACE)/packages'\n BuildToolsPath: '${{ parameters.BuildToolsPath }}'\n\n - ${{ if and(eq(parameters.ShouldPublishToNuget, 'true'), eq(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-net')) }}:\n\n - template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml\n parameters:\n ArtifactLocation: '$(PIPELINE.WORKSPACE)/packages'\n PackageRepository: Nuget\n ReleaseSha: $(Build.SourceVersion)\n\n - template: pipelines/steps/publish-symbols.yml@azure-sdk-build-tools\n displayName: 'Upload Symbols'\n parameters:\n BuildToolsRepositoryPath: ${{ parameters.BuildToolsPath }}\n PackagesPath: $(PIPELINE.WORKSPACE)/packages\n StagingDirectory: $(Build.ArtifactStagingDirectory)/symbols\n\n - task: NuGetToolInstaller@1\n displayName: 'Use NuGet ${{ parameters.NugetVersion }}'\n inputs:\n versionSpec: ${{ parameters.NugetVersion }}\n\n - task: NuGetCommand@2\n displayName: 'Publish to Nuget'\n inputs:\n command: push\n packagesToPush: '$(PIPELINE.WORKSPACE)/packages/**/*.nupkg;!$(PIPELINE.WORKSPACE)/packages/**/*.symbols.nupkg'\n nuGetFeedType: external\n publishFeedCredentials: Nuget.org\n\n - ${{ if eq(parameters.ShouldPublishToDevOps, 'true') }}:\n\n - pwsh: |\n # For safety default to publishing to the private feed.\n # Publish to https://dev.azure.com/azure-sdk/internal/_packaging?_a=feed&feed=azure-sdk-for-net-pr\n $devopsFeedId = '590cfd2a-581c-4dcb-a12e-6568ce786175/fa8b2d77-74d9-48d7-bb96-badb2b9c6ca4'\n if ('$(Build.Repository.Name)' -eq 'Azure/azure-sdk-for-net') {\n # Publish to https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net\n $devopsFeedId = '29ec6040-b234-4e31-b139-33dc4287b756/fa8c16a3-dbe0-4de2-a297-03065ec1ba3f'\n }\n echo "##vso[task.setvariable variable=DevOpsFeedID]$devopsFeedId"\n echo "Using DevopsFeedId = $devopsFeedId"\n displayName: Setup DevOpsFeedId\n\n - task: NuGetCommand@2\n displayName: 'Publish to DevOps Feed'\n inputs:\n command: push\n packagesToPush: '$(PIPELINE.WORKSPACE)/packages/**/*.nupkg;!$(PIPELINE.WORKSPACE)/packages/**/*.symbols.nupkg'\n publishVstsFeed: $(DevOpsFeedID)\n\n - template: /eng/common/pipelines/templates/steps/publish-artifact.yml\n parameters:\n ArtifactPath: '$(PIPELINE.WORKSPACE)/packages'\n ArtifactName: 'packages-signed' | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\jobs\mgmt-release.yml | mgmt-release.yml | YAML | 3,458 | 0.8 | 0.076923 | 0.038961 | node-utils | 6 | 2024-06-17T19:48:52.729594 | MIT | false | f3c5bbbf209120f348124f806830aded |
parameters:\n# LanguageVersion in context of .NET perf tests corresponds to the .NET framework version and is set in individual perf.yml files\n- name: LanguageVersion\n type: string\n default: ''\n- name: ServiceDirectory\n type: string\n default: ''\n- name: PackageVersions\n type: string\n default: '.*'\n- name: Tests\n type: string\n default: '.*'\n- name: Arguments\n type: string\n default: '.*'\n- name: Iterations\n type: number\n default: '5'\n- name: Profile\n type: boolean\n default: false\n- name: AdditionalArguments\n type: string\n default: ''\n- name: EnvVars\n type: object\n default: {}\n\nextends:\n template: /eng/common/pipelines/templates/jobs/perf.yml\n parameters:\n Variables:\n - template: /eng/pipelines/templates/variables/globals.yml\n Language: Net\n LanguageVersion: ${{ parameters.LanguageVersion }}\n InstallLanguageSteps:\n - template: /eng/pipelines/templates/steps/install-dotnet.yml\n parameters:\n EnableNuGetCache: false\n - ${{ if parameters.Profile }}:\n - task: PowerShell@2\n displayName: 'Install dotnet-trace'\n inputs:\n targetType: 'inline'\n script: 'dotnet tool install -g dotnet-trace'\n workingDirectory: '$(Build.SourcesDirectory)/sdk'\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n PackageVersions: ${{ parameters.PackageVersions }}\n Tests: ${{ parameters.Tests }}\n Arguments: ${{ parameters.Arguments }}\n Iterations: ${{ parameters.Iterations }}\n Profile: ${{ parameters.Profile }}\n AdditionalArguments: ${{ parameters.AdditionalArguments }}\n EnvVars: ${{ parameters.EnvVars}}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\jobs\perf.yml | perf.yml | YAML | 1,618 | 0.8 | 0.017857 | 0.018182 | vue-tools | 560 | 2024-09-04T20:14:08.248749 | Apache-2.0 | false | 8c04aa7ed8a6434bc3bf5cc60f0ee5dc |
resources:\n repositories:\n - repository: 1ESPipelineTemplates\n type: git\n name: 1ESPipelineTemplates/1ESPipelineTemplates\n ref: refs/tags/release\n - repository: 1ESPipelineTemplatesCanary\n type: git\n name: 1ESPipelineTemplates/1ESPipelineTemplates\n ref: refs/tags/canary\n - repository: azure-sdk-build-tools\n type: git\n name: internal/azure-sdk-build-tools\n ref: refs/tags/azure-sdk-build-tools_20250307.1\n\nparameters:\n- name: stages\n type: stageList\n default: []\n- name: oneESTemplateTag\n type: string\n default: release\n- name: UseOfficial\n type: boolean\n default: true\n\nextends:\n ${{ if and(parameters.UseOfficial, eq(parameters.oneESTemplateTag, 'canary')) }}:\n template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplatesCanary\n ${{ elseif eq(parameters.oneESTemplateTag, 'canary') }}:\n template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplatesCanary\n ${{ elseif and(parameters.UseOfficial, eq(variables['System.TeamProject'], 'internal')) }}:\n template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates\n ${{ else }}:\n template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates\n parameters:\n ${{ if eq(parameters.oneESTemplateTag, 'canary') }}:\n # Enable 1es template team to verify validation has been run on canary\n customBuildTags:\n - 1ES.PT.Tag-refs/tags/canary\n settings:\n skipBuildTagsForGitHubPullRequests: true\n ${{ if and(eq(variables['Build.DefinitionName'], 'net - core'), eq(variables['Build.SourceBranchName'], 'main'), eq(variables['System.TeamProject'], 'internal')) }}:\n featureFlags:\n autoBaseline: true\n sdl:\n ${{ if and(eq(variables['Build.DefinitionName'], 'net - core'), eq(variables['Build.SourceBranchName'], 'main'), eq(variables['System.TeamProject'], 'internal')) }}:\n autobaseline:\n isMainPipeline: true\n enableForGitHub: true\n sourceRepositoriesToScan:\n exclude:\n - repository: azure-sdk-build-tools\n sourceAnalysisPool:\n name: azsdk-pool-mms-win-2022-general\n image: azsdk-pool-mms-win-2022-1espt\n os: windows\n binskim:\n # Exclude aot checking project, and imported azure-sdk-build-tools gpg/azcopy binaries\n # See https://dev.azure.com/securitytools/SecurityIntegration/_wiki/wikis/Guardian/1378/Glob-Format\n # Exclude Microsoft.Azure.KeyVault.Core.dll track 1 dependency that we no longer support but is causing issues\n analyzeTargetGlob: +:file|**/*.dll;+:file|**/*.exe;-:f|**/net452/Microsoft.Azure.KeyVault.Core.dll;-:f|**/net461/Microsoft.Azure.KeyVault.Core.dll;-:f|**/tools/NuGet.exe;-:f|**/tools/gpg/**/*.dll;-:f|**/tools/gpg/**/*.exe;-:f|**/tools/azcopy/**/*.exe;-:f|**/tools/azcopy/**/*.dll;-:f|**/aotcompatibility/**/*.exe\n # Turn off the build warnings caused by disabling some sdl checks\n createAdoIssuesForJustificationsForDisablement: false\n eslint:\n enabled: false\n justificationForDisabling: 'ESLint injected task has failures because it uses an old version of mkdirp. We should not fail for tools not controlled by the repo. See: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3499746'\n codeql:\n compiled:\n enabled: false\n justificationForDisabling: CodeQL times our pipelines out by running for 2+ hours before being force canceled.\n psscriptanalyzer:\n compiled: true\n break: true\n policy: M365\n credscan:\n suppressionsFile: $(Build.SourcesDirectory)/eng/CredScanSuppression.json\n scanFolder: $(Build.SourcesDirectory)/credscan.tsv\n toolVersion: 2.3.12.23\n\n stages: ${{ parameters.stages }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\stages\1es-redirect.yml | 1es-redirect.yml | YAML | 3,746 | 0.95 | 0.074074 | 0.064103 | node-utils | 61 | 2025-04-30T05:37:02.996341 | MIT | false | aea5de16d76fde29247c3c16d40dad6e |
parameters:\n Artifacts: []\n TestPipeline: false\n ArtifactName: 'not-specified'\n # Publish to https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net\n DevOpsFeedId: '29ec6040-b234-4e31-b139-33dc4287b756/fa8c16a3-dbe0-4de2-a297-03065ec1ba3f'\n\nstages:\n - stage: Signing\n variables:\n - template: /eng/pipelines/templates/variables/globals.yml\n - template: /eng/pipelines/templates/variables/image.yml\n dependsOn: ${{parameters.DependsOn}}\n pool:\n name: $(WINDOWSPOOL)\n image: $(WINDOWSVMIMAGE)\n os: windows\n jobs:\n - job: SignPackage\n\n templateContext:\n outputs:\n - output: pipelineArtifact\n displayName: 'Store signed packages in ${{parameters.ArtifactName}}-signed artifact'\n targetPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}\n artifactName: ${{parameters.ArtifactName}}-signed\n\n steps:\n - checkout: azure-sdk-build-tools\n path: azure-sdk-build-tools\n - download: current\n displayName: Download ${{parameters.ArtifactName}}\n artifact: ${{parameters.ArtifactName}}\n timeoutInMinutes: 5\n - template: pipelines/steps/net-signing.yml@azure-sdk-build-tools\n parameters:\n PackagesPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}\n BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools\n\n - ${{if and(in(variables['Build.Reason'], 'Manual', ''), eq(variables['System.TeamProject'], 'internal'))}}:\n - ${{ each artifact in parameters.Artifacts }}:\n - ${{if ne(artifact.skipReleaseStage, 'true')}}:\n - stage:\n variables:\n - template: /eng/pipelines/templates/variables/globals.yml\n - template: /eng/pipelines/templates/variables/image.yml\n displayName: 'Release: ${{artifact.name}}'\n dependsOn: Signing\n condition: and(succeeded(), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-net-pr'))\n pool:\n name: $(WINDOWSPOOL)\n image: $(WINDOWSVMIMAGE)\n os: windows\n jobs:\n - ${{if ne(artifact.skipTagRepository, 'true')}}:\n - job: TagRepository\n displayName: "Create release tag"\n condition: ne(variables['Skip.TagRepository'], 'true')\n\n steps:\n - checkout: self\n fetchDepth: 1\n - download: current\n displayName: Download ${{parameters.ArtifactName}}-signed\n artifact: ${{parameters.ArtifactName}}-signed\n - template: /eng/pipelines/templates/steps/install-dotnet.yml\n parameters:\n EnableNuGetCache: false\n - template: /eng/common/pipelines/templates/steps/retain-run.yml\n - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml\n parameters:\n PackageName: "Azure.Template"\n ServiceDirectory: "template"\n TestPipeline: ${{ parameters.TestPipeline }}\n - template: /eng/common/pipelines/templates/steps/verify-changelog.yml\n parameters:\n PackageName: ${{artifact.name}}\n ServiceName: ${{parameters.ServiceDirectory}}\n ForRelease: true\n - template: /eng/common/pipelines/templates/steps/verify-restapi-spec-location.yml\n parameters:\n PackageName: ${{artifact.name}}\n ServiceDirectory: ${{parameters.ServiceDirectory}}\n ArtifactLocation: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed\n - task: PowerShell@2\n inputs:\n filePath: $(System.DefaultWorkingDirectory)/eng/scripts/InstallationCheck.ps1\n pwsh: true\n arguments: >\n -ArtifactsDirectory "$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed" -Artifact ${{artifact.name}}\n condition: and(succeeded(),ne('${{ artifact.skipPublishPackage }}', 'true'))\n displayName: Verify Package Installation\n - template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml\n parameters:\n ArtifactLocation: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}\n PackageRepository: Nuget\n ReleaseSha: $(Build.SourceVersion)\n\n - ${{if ne(artifact.skipPublishPackage, 'true')}}:\n - deployment: PublishPackage\n displayName: Publish package to Nuget.org and DevOps Feed\n condition: and(succeeded(), ne(variables['Skip.PublishPackage'], 'true'))\n environment: package-publish\n dependsOn: TagRepository\n\n pool:\n name: azsdk-pool-mms-ubuntu-2004-general\n image: azsdk-pool-mms-ubuntu-2004-1espt\n os: linux\n\n templateContext:\n type: releaseJob # Required, this indicates this deployment job is a release job\n isProduction: true # Required, must be 'true' or 'false'\n inputs: # All input build artifacts must be declared here\n - input: pipelineArtifact # Required, type of the input artifact\n artifactName: ${{parameters.ArtifactName}}-signed # Required, name of the pipeline artifact\n targetPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed # Optional, specifies where the artifact is downloaded to\n\n strategy:\n runOnce:\n deploy:\n steps:\n - task: 1ES.PublishNuget@1\n displayName: Publish ${{artifact.name}} package to NuGet.org\n inputs:\n packageParentPath: '$(Pipeline.Workspace)'\n packagesToPush: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.nupkg;!$(Pipeline.Workspace)//${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.symbols.nupkg'\n nuGetFeedType: external\n publishFeedCredentials: Nuget.org\n\n - task: 1ES.PublishNuget@1\n displayName: Publish to DevOps Feed\n inputs:\n packageParentPath: '$(Pipeline.Workspace)'\n packagesToPush: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.nupkg;!$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.symbols.nupkg'\n publishVstsFeed: ${{ parameters.DevOpsFeedID }}\n\n - ${{if ne(artifact.skipSymbolsUpload, 'true')}}:\n - job: UploadSymbols\n displayName: Upload Symbols to Symbols Server\n condition: and(succeeded(), ne(variables['Skip.SymbolsUpload'], 'true'))\n dependsOn: PublishPackage\n\n templateContext:\n outputs:\n - ${{if ne(artifact.skipSymbolsUpload, 'true')}}:\n - output: pipelineArtifact\n displayName: 'Store converted symbols in ${{artifact.name}}-symbols artifact'\n targetPath: $(Build.ArtifactStagingDirectory)/symbols\n artifactName: ${{artifact.name}}-symbols\n\n variables:\n build-tools-repo-path: $(Pipeline.Workspace)/s/azure-sdk-build-tools\n sdk-repo-path: $(Pipeline.Workspace)/s/azure-sdk-for-net\n\n steps:\n # checkout azure-sdk-build-tools to $(Pipeline.Workspace)/s\n # As a "single repo" checkout, this will set $(Build.Repository.LocalPath), $(Build.SourcesDirectory)\n # and $(System.DefaultWorkingDirectory) to the repo path, even if a custom path is supplied\n - checkout: azure-sdk-build-tools\n path: s/azure-sdk-build-tools\n # checkout azure-sdk-for-net to $(Pipeline.Workspace)/azure-sdk-for-net\n # Sparse checkout defaults to $(System.DefaultWorkingDirectory) so we must specify a custom path\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n SkipCheckoutNone: true\n Repositories:\n - Name: $(Build.Repository.Name)\n Commitish: $(Build.SourceVersion)\n WorkingDirectory: $(sdk-repo-path)\n\n # download "packages" artifact to $(Pipeline.Workspace)/packages\n - download: current\n displayName: Download ${{parameters.ArtifactName}}\n artifact: ${{parameters.ArtifactName}}\n - download: current\n displayName: Download ${{parameters.ArtifactName}}-signed\n artifact: ${{parameters.ArtifactName}}-signed\n - template: /pipelines/steps/publish-symbols.yml@azure-sdk-build-tools\n parameters:\n BuildToolsRepositoryPath: $(build-tools-repo-path)\n PackagesPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}\n StagingDirectory: $(Build.ArtifactStagingDirectory)/symbols\n - template: /eng/common/pipelines/templates/steps/create-apireview.yml\n parameters:\n ArtifactPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}\n Artifacts: ${{parameters.Artifacts}}\n ConfigFileDir: $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo\n MarkPackageAsShipped: true\n ArtifactName: ${{parameters.ArtifactName}}\n PackageName: ${{artifact.name}}\n SourceRootPath: $(sdk-repo-path)\n\n - ${{if ne(artifact.skipPublishDocMs, 'true')}}:\n - job: PublicDocsMS\n displayName: Publish to Docs.MS\n condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))\n dependsOn: PublishPackage\n\n pool:\n name: $(LINUXPOOL)\n image: $(LINUXVMIMAGE)\n os: linux\n\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths:\n - sdk/**/*.md\n - .github/CODEOWNERS\n - download: current\n displayName: Download ${{parameters.ArtifactName}}\n artifact: ${{parameters.ArtifactName}}\n - template: /eng/common/pipelines/templates/steps/update-docsms-metadata.yml\n parameters:\n PackageInfoLocations:\n - $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{artifact.name}}.json\n WorkingDirectory: $(System.DefaultWorkingDirectory)\n TargetDocRepoOwner: $(DocRepoOwner)\n TargetDocRepoName: $(DocRepoName)\n Language: 'dotnet'\n SparseCheckoutPaths:\n - /api/overview/azure/\n - /metadata/\n\n - ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}:\n - job: PublishDocs\n displayName: Publish Docs to GitHub pages\n condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))\n dependsOn: PublishPackage\n\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n - download: current\n displayName: Download ${{parameters.ArtifactName}}\n artifact: ${{parameters.ArtifactName}}\n - template: /eng/common/pipelines/templates/steps/publish-blobs.yml\n parameters:\n FolderForUpload: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}'\n TargetLanguage: 'dotnet'\n ArtifactLocation: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}'\n\n - ${{if ne(artifact.skipUpdatePackageVersion, 'true')}}:\n - job: UpdatePackageVersion\n displayName: "Update Package Version"\n condition: and(succeeded(), ne(variables['Skip.UpdatePackageVersion'], 'true'))\n dependsOn: PublishPackage\n\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n paths:\n - /sdk\n - '!**/*.cs'\n\n - template: /eng/pipelines/templates/steps/install-dotnet.yml\n parameters:\n EnableNuGetCache: false\n - pwsh: |\n eng/scripts/Update-PkgVersion.ps1 -ServiceDirectory '${{parameters.ServiceDirectory}}' -PackageName '${{artifact.name}}'\n displayName: Increment package version\n - template: /eng/common/pipelines/templates/steps/create-pull-request.yml\n parameters:\n RepoName: azure-sdk-for-net\n PRBranchName: increment-package-version-${{ parameters.ServiceDirectory }}-$(Build.BuildId)\n CommitMsg: "Increment package version after release of ${{ artifact.name }}"\n PRTitle: "Increment version for ${{ parameters.ServiceDirectory }} releases"\n CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}'\n\n - ${{if ne(artifact.skipSmokeTests, 'true')}}:\n - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}:\n - template: /eng/pipelines/templates/jobs/smoke.tests.yml\n parameters:\n Daily: false\n Artifact: ${{ artifact }}\n ArtifactName: ${{ parameters.ArtifactName }}\n\n - stage: Integration\n variables:\n - template: /eng/pipelines/templates/variables/globals.yml\n - template: /eng/pipelines/templates/variables/image.yml\n dependsOn: Signing\n jobs:\n - job: PublishPackages\n condition: and(succeeded(), or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal'))))\n displayName: Publish package to daily feed\n pool:\n name: $(WINDOWSPOOL)\n image: $(WINDOWSVMIMAGE)\n os: windows\n templateContext:\n outputParentDirectory: '$(Pipeline.Workspace)'\n outputs:\n - ${{ each artifact in parameters.Artifacts }}:\n - output: nuget\n displayName: 'Publish to DevOps Feed'\n packageParentPath: '$(Pipeline.Workspace)'\n packagesToPush: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.nupkg;!$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}/*.symbols.nupkg'\n publishVstsFeed: $(DevOpsFeedID)\n\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n - download: current\n displayName: Download ${{parameters.ArtifactName}}-signed\n artifact: ${{parameters.ArtifactName}}-signed\n - pwsh: |\n # For safety default to publishing to the private feed.\n # Publish to https://dev.azure.com/azure-sdk/internal/_packaging?_a=feed&feed=azure-sdk-for-net-pr\n $devopsFeedId = '590cfd2a-581c-4dcb-a12e-6568ce786175/fa8b2d77-74d9-48d7-bb96-badb2b9c6ca4'\n if ('$(Build.Repository.Name)' -eq 'Azure/azure-sdk-for-net') {\n $devopsFeedId = '${{ parameters.DevOpsFeedID }}'\n }\n echo "##vso[task.setvariable variable=DevOpsFeedID]$devopsFeedId"\n echo "Using DevopsFeedId = $devopsFeedId"\n displayName: Setup DevOpsFeedId\n\n - job: PublishDocsToNightlyBranch\n dependsOn: PublishPackages\n condition: and(succeeded(), or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal'))))\n pool:\n name: $(LINUXPOOL)\n image: $(LINUXVMIMAGE)\n os: linux\n steps:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths:\n - sdk/**/*.md\n - .github/CODEOWNERS\n - download: current\n displayName: Download ${{parameters.ArtifactName}}\n artifact: ${{parameters.ArtifactName}}\n - pwsh: |\n Get-ChildItem -Recurse $(Pipeline.Workspace)/${{parameters.ArtifactName}}/\n displayName: Show visible artifacts\n - template: /eng/common/pipelines/templates/steps/update-docsms-metadata.yml\n parameters:\n PackageInfoLocations:\n - ${{ each artifact in parameters.Artifacts }}:\n - ${{if ne(artifact.skipPublishDocMs, 'true')}}:\n - $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{artifact.name}}.json\n WorkingDirectory: $(System.DefaultWorkingDirectory)\n TargetDocRepoOwner: $(DocRepoOwner)\n TargetDocRepoName: $(DocRepoName)\n Language: 'dotnet'\n DailyDocsBuild: true\n SparseCheckoutPaths:\n - /api/overview/azure/\n - /metadata/\n\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\stages\archetype-net-release.yml | archetype-net-release.yml | YAML | 18,733 | 0.8 | 0.065714 | 0.02795 | awesome-app | 534 | 2023-10-03T07:38:47.546937 | BSD-3-Clause | false | 7433d0e6231607b3930e6096d730bc8a |
parameters:\n - name: Artifacts\n type: object\n default: []\n - name: TestPipeline\n type: boolean\n default: false\n - name: ArtifactName\n type: string\n default: packages\n - name: SDKType\n type: string\n default: all\n - name: ServiceDirectory\n type: string\n default: not-specified\n - name: BuildSnippets\n type: boolean\n default: true\n - name: CheckAOTCompat\n type: boolean\n default: false\n - name: AOTTestInputs\n type: object\n default: []\n - name: TestSetupSteps\n type: stepList\n default: []\n - name: TestTimeoutInMinutes\n type: number\n default: 60\n - name: MatrixConfigs\n type: object\n default:\n - Name: NET_ci_test_base\n Path: eng/pipelines/templates/stages/platform-matrix.json\n Selection: sparse\n GenerateVMJobs: true\n - name: AdditionalMatrixConfigs\n type: object\n default: []\n - name: MatrixFilters\n type: object\n default: []\n - name: MatrixReplace\n type: object\n default: []\n - name: TestDependsOnDependency\n type: string\n default: not-specified\n - name: LimitForPullRequest\n type: boolean\n default: false\n - name: oneESTemplateTag\n type: string\n default: true\n - name: ExcludePaths\n type: object\n default: []\n\nextends:\n template: /eng/pipelines/templates/stages/1es-redirect.yml\n parameters:\n oneESTemplateTag: ${{ parameters.oneESTemplateTag }}\n stages:\n - stage: Build\n variables:\n - template: /eng/pipelines/templates/variables/globals.yml\n - template: /eng/pipelines/templates/variables/image.yml\n jobs:\n - template: /eng/pipelines/templates/jobs/ci.yml\n parameters:\n SDKType: ${{ parameters.SDKType }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n Artifacts: ${{ parameters.Artifacts }}\n ${{ if eq(parameters.ServiceDirectory, 'template') }}:\n TestPipeline: true\n ArtifactName: packages\n LimitForPullRequest: ${{ parameters.LimitForPullRequest }}\n BuildSnippets: ${{ parameters.BuildSnippets }}\n CheckAOTCompat: ${{ parameters.CheckAOTCompat }}\n AOTTestInputs: ${{ parameters.AOTTestInputs }}\n TestSetupSteps: ${{ parameters.TestSetupSteps }}\n TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}\n MatrixConfigs:\n - ${{ each config in parameters.MatrixConfigs }}:\n - ${{ config }}\n - ${{ each config in parameters.AdditionalMatrixConfigs }}:\n - ${{ config }}\n MatrixFilters: ${{ parameters.MatrixFilters }}\n MatrixReplace:\n # For nightly/release pipelines we build and test release only\n - ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n - BuildConfiguration=Debug/Release\n - ${{ parameters.MatrixReplace }}\n TestDependsOnDependency: ${{ parameters.TestDependsOnDependency }}\n\n # The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.\n - ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:\n\n - template: archetype-net-release.yml\n parameters:\n SDKType: ${{ parameters.SDKType }}\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n DependsOn:\n - Build\n Artifacts: ${{ parameters.Artifacts }}\n ${{ if eq(parameters.ServiceDirectory, 'template') }}:\n TestPipeline: true\n ArtifactName: packages\n\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\stages\archetype-sdk-client.yml | archetype-sdk-client.yml | YAML | 3,717 | 0.8 | 0.036036 | 0.018692 | react-lib | 710 | 2023-11-07T13:58:48.839069 | Apache-2.0 | false | 67f9d721ee19d266795f93d1d115715d |
parameters:\n - name: TargetDirectory\n type: string\n - name: CustomTestSteps\n type: object\n default: []\n - name: EnvVars\n type: object\n default: {}\n - name: TargetTags\n type: string\n default: ''\n\nvariables:\n - template: /eng/pipelines/templates/variables/globals.yml\n\nstages:\n - stage: 'Test'\n jobs:\n - job: 'Test'\n\n strategy:\n matrix:\n Windows:\n Pool: 'azsdk-pool-mms-win-2022-general'\n Image: 'windows-2022'\n Linux:\n Pool: 'azsdk-pool-mms-ubuntu-2004-general'\n Image: 'MMSUbuntu20.04'\n Mac:\n Pool: 'Azure Pipelines'\n Image: 'macos-latest'\n\n pool:\n name: $(Pool)\n vmImage: $(Image)\n\n steps:\n - template: /eng/pipelines/templates/steps/run-pester-tests.yml\n parameters:\n TargetDirectory: ${{ parameters.TargetDirectory }}\n CustomTestSteps: ${{ parameters.CustomTestSteps }}\n EnvVars: ${{ parameters.EnvVars }}\n TargetTags: ${{ parameters.TargetTags }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\stages\archetype-sdk-tool-pwsh.yml | archetype-sdk-tool-pwsh.yml | YAML | 1,117 | 0.7 | 0 | 0 | node-utils | 6 | 2024-11-03T00:14:05.538119 | GPL-3.0 | false | b712521d8f7c68d7666f224c4e260d0e |
parameters:\n - name: Artifacts\n type: object\n default: []\n - name: ServiceDirectory\n type: string\n default: not-specified\n - name: SDKType\n type: string\n default: all\n - name: BuildSnippets\n type: boolean\n default: true\n\nsteps:\n - ${{ if not(contains(variables['Build.DefinitionName'], '-pr - ')) }}:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths:\n - "/*"\n - "!SessionRecords"\n\n - template: /eng/pipelines/templates/steps/install-dotnet.yml\n\n - template: /eng/common/pipelines/templates/steps/cache-ps-modules.yml\n\n - ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n - task: DownloadPipelineArtifact@2\n inputs:\n artifact: BuildPackagesArtifact\n path: $(Build.ArtifactStagingDirectory)/PackageInfo\n - ${{ else }}:\n - template: /eng/common/pipelines/templates/steps/save-package-properties.yml\n parameters:\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n\n - template: /eng/pipelines/templates/steps/set-artifact-packages.yml\n parameters:\n PackageInfo: '$(Build.ArtifactStagingDirectory)/PackageInfo'\n Artifacts: ${{ parameters.Artifacts }}\n\n - template: /eng/common/pipelines/templates/steps/verify-samples.yml\n parameters:\n ServiceDirectories: "$(ChangedServices)"\n\n - task: UsePythonVersion@0\n displayName: 'Use Python 3.11'\n inputs:\n versionSpec: '3.11'\n\n - template: /eng/common/pipelines/templates/steps/verify-readmes.yml\n parameters:\n PackagePropertiesFolder: '$(Build.ArtifactStagingDirectory)/PackageInfo'\n\n - task: NodeTool@0\n inputs:\n versionSpec: 20.x\n displayName: 'Use Node 20.x'\n\n - task: DotNetCoreCLI@2\n displayName: 'Install Snippet Generator Tool'\n inputs:\n command: custom\n custom: 'tool'\n arguments: 'restore'\n workingDirectory: '$(Agent.BuildDirectory)'\n\n - pwsh: |\n $failed = $false\n if ('$(ProjectNames)' -and '$(ProjectNames)' -notlike '$(*') {\n $serviceDirectories = "$(ChangedServices)" -split ","\n $ScanPaths = @()\n foreach ($ServiceDirectory in $serviceDirectories) {\n ./eng/scripts/CodeChecks.ps1 `\n -ServiceDirectory $ServiceDirectory `\n -SDKType ${{ parameters.SDKType }} `\n -SpellCheckPublicApiSurface `\n\n if ($LASTEXITCODE -ne 0) {\n $failed = $true\n }\n }\n\n if ($failed) {\n exit 1\n }\n }\n else {\n Write-Host "No services were directly changed. Skipping code checks."\n }\n displayName: Verify Generated Code\n env:\n EnableSourceLink: false\n\n - template: /eng/pipelines/templates/steps/dotnet-diagnostics.yml\n parameters:\n LogFilePath: $(Build.ArtifactStagingDirectory)/rebuild.binlog\n\n - task: Powershell@2\n displayName: Build snippets\n condition: and(succeeded(), eq(${{ parameters.BuildSnippets }}, true))\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/scripts/Build-Snippets.ps1\n arguments: >\n -PackageInfoFolder "$(Build.ArtifactStagingDirectory)/PackageInfo"\n -SdkType "${{ parameters.SDKType }}"\n -ProjectNames "$(ProjectNames)"\n -DiagnosticArguments "$(DiagnosticArguments)"\n -BuildConfiguration "$(BuildConfiguration)"\n pwsh: true\n\n - ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml\n parameters:\n ArtifactPath: '$(Build.ArtifactStagingDirectory)'\n ArtifactName: 'verify_$(System.JobName)'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\analyze.yml | analyze.yml | YAML | 3,611 | 0.8 | 0.051724 | 0 | awesome-app | 657 | 2023-11-18T08:54:55.123344 | BSD-3-Clause | false | 10f8f6849f497bf4a8bf27b6fa8a5731 |
parameters:\n ServiceDirectory: ''\n PackageInfoFolder: ''\n AOTTestInputs: []\n\nsteps:\n\n- ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n - task: Powershell@2\n displayName: Check for AOT compatibility regressions for PR\n inputs:\n targetType: filepath\n filePath: $(Build.SourcesDirectory)/eng/scripts/compatibility/Check-AOT-Compatibility-For-PR.ps1\n arguments: >-\n -PackageInfoFolder "${{ parameters.PackageInfoFolder }}"\n -ProjectNames "$(ProjectNames)"\n workingDirectory: $(Build.SourcesDirectory)/eng/scripts/compatibility\n- ${{ else }}:\n - ${{ each aotTestInput in parameters.AOTTestInputs }}:\n - task: Powershell@2\n displayName: Check for AOT compatibility regressions in ${{ aotTestInput.ArtifactName }}\n inputs:\n targetType: filepath\n filePath: $(Build.SourcesDirectory)/eng/scripts/compatibility/Check-AOT-Compatibility.ps1\n arguments: >-\n -ServiceDirectory ${{ parameters.ServiceDirectory }}\n -PackageName ${{ aotTestInput.ArtifactName }}\n -ExpectedWarningsFilePath ${{ aotTestInput.ExpectedWarningsFilePath }}\n workingDirectory: $(Build.SourcesDirectory)/eng/scripts/compatibility\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\aot-compatibility.yml | aot-compatibility.yml | YAML | 1,205 | 0.7 | 0.137931 | 0 | python-kit | 703 | 2023-11-27T16:59:24.147784 | BSD-3-Clause | false | f9c637e1484e818eb3eabffe859300f0 |
parameters:\n - name: Artifacts\n type: object\n default: []\n - name: ServiceDirectory\n type: string\n - name: DocGenerationDir\n type: string\n default: "$(Build.SourcesDirectory)/doc/ApiDocGeneration"\n - name: LibType\n type: string\n default: client\n - name: PackageInfoFolder\n type: string\n\n\nsteps:\n - task: PowerShell@2\n displayName: Download and Extract Required Software\n inputs:\n pwsh: true\n filePath: eng/scripts/doc-generation.ps1\n workingDirectory: $(Build.BinariesDirectory)\n env:\n DOC_GENERATION_DIR: ${{ parameters.DocGenerationDir }}\n\n - ${{ each artifact in parameters.Artifacts }}:\n - task: PowerShell@2\n displayName: Build DocFx Documentation Site for ${{artifact.name}}\n inputs:\n pwsh: true\n filePath: $(Build.SourcesDirectory)/doc/ApiDocGeneration/Generate-Api-Docs.ps1\n arguments: >\n -ArtifactName '${{artifact.name}}'\n -ServiceDirectory '${{parameters.ServiceDirectory}}'\n -ArtifactsDirectoryName '${{artifact.directoryName}}'\n -RepoRoot $(Build.SourcesDirectory)\n -BinDirectory $(Build.BinariesDirectory)\n -DocGenDir ${{parameters.DocGenerationDir}}\n -ArtifactStagingDirectory '$(Build.ArtifactStagingDirectory)'\n -verbose\n\n # artifacts will only be blank if the template is called with no Artifact parameter,\n # which should only happen in the case of a PR build. In this case we locate all that were directly\n # changed and build their docs.\n - ${{ if not(parameters.Artifacts) }}:\n - pwsh: |\n $failedBuild = $false\n\n $targetedPackages = Get-ChildItem -Recurse "${{ parameters.PackageInfoFolder }}" *.json\n | ForEach-Object { Get-Content -Raw _ | ConvertFrom-Json }\n | Where-Object { $_.IncludedForValidation -ne $true }\n\n if ($targetedPackages) {\n foreach($pkg in $targetedPackages) {\n $artifactDirectory = ($pkg.DirectoryPath -split '\\|/')[-1]\n\n &"$(Build.SourcesDirectory)/doc/ApiDocGeneration/Generate-Api-Docs.ps1" `\n -ArtifactName '$($pkg.name)' `\n -ServiceDirectory '$($pkg.ServiceDirectory)' `\n -ArtifactsDirectoryName '$artifactDirectory' `\n -RepoRoot $(Build.SourcesDirectory) `\n -BinDirectory $(Build.BinariesDirectory) `\n -DocGenDir ${{parameters.DocGenerationDir}} `\n -ArtifactStagingDirectory '$(Build.ArtifactStagingDirectory)' `\n -verbose\n\n if ($LASTEXITCODE -ne 0) {\n $failedBuild = $true\n }\n }\n }\n else {\n Write-Host "No directly targeted packages found. Skipping doc generation."\n }\n\n if ($failedBuild) {\n exit 1\n }\n displayName: Generate Docs for Pull Request\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\archetype-sdk-docs.yml | archetype-sdk-docs.yml | YAML | 2,847 | 0.8 | 0.0875 | 0.042254 | awesome-app | 117 | 2025-01-15T08:11:15.944115 | BSD-3-Clause | false | dd59d92170eb6e09e92c777c888f7b5c |
parameters:\n - name: Artifacts\n type: object\n default: []\n - name: TestPipeline\n type: boolean\n default: false\n - name: ServiceDirectory\n type: string\n default: not-specified\n - name: SDKType\n type: string\n default: all\n - name: CheckAOTCompat\n type: boolean\n default: false\n - name: AOTTestInputs\n type: object\n default: []\n - name: BuildSnippets\n type: boolean\n default: true\n\nsteps:\n - ${{ if not(contains(variables['Build.DefinitionName'], '-pr - ')) }}:\n - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml\n parameters:\n Paths:\n - "/*"\n - "!SessionRecords"\n - template: /eng/pipelines/templates/steps/install-dotnet.yml\n - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml\n parameters:\n PackageName: "Azure.Template"\n ServiceDirectory: "template"\n TestPipeline: ${{ parameters.TestPipeline }}\n - template: /eng/common/pipelines/templates/steps/set-default-branch.yml\n - pwsh: |\n echo "##vso[build.addbuildtag]Scheduled"\n displayName: "Tag scheduled builds"\n condition: and(eq(variables['Build.SourceBranchName'],variables['DefaultBranch']),eq(variables['Build.Reason'],'Schedule'))\n # Set env variable SkipDevBuildNumber to generate package properties with non alpha version\n # Package version is used to create or update package work item from CI pipeline\n - pwsh: |\n echo "##vso[task.setvariable variable=SkipDevBuildNumber]true"\n displayName: "Set SkipDevBuildNumber env variable"\n\n # run this before setting SetDevVersion to true, so that versioning properties will be non-dev always\n - ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n - task: DownloadPipelineArtifact@2\n inputs:\n artifact: BuildPackagesArtifact\n path: $(Build.ArtifactStagingDirectory)/PackageInfo\n - ${{ else }}:\n - template: /eng/common/pipelines/templates/steps/save-package-properties.yml\n parameters:\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n\n - template: /eng/common/pipelines/templates/steps/daily-dev-build-variable.yml\n\n - template: /eng/pipelines/templates/steps/set-artifact-packages.yml\n parameters:\n PackageInfo: '$(Build.ArtifactStagingDirectory)/PackageInfo'\n Artifacts: ${{ parameters.Artifacts }}\n ${{ if ne(parameters.ServiceDirectory, 'auto') }}:\n SetOverrideFile: false\n\n - pwsh: |\n # Reset SkipDevBuildNumber as empty\n $skipDevBuildNumber = ""\n echo "##vso[task.setvariable variable=SkipDevBuildNumber]$skipDevBuildNumber"\n Write-Host "SkipDevBuildNumber: [$(SkipDevBuildNumber)]"\n $skipDevBuildNumber = "false"\n # For .NET builds the only case we want to not have dev build numbers on our packages is when it is manually queued and\n # the SetDevVersion property isn't set to true. All other cases should contain dev version numbers.\n if ('$(Build.Reason)' -eq 'Manual' -and '$(SetDevVersion)' -ne 'true') {\n $skipDevBuildNumber = "true"\n }\n $versioningProperties = "/p:OfficialBuildId=$(OfficialBuildId) /p:SkipDevBuildNumber=$skipDevBuildNumber";\n echo "##vso[task.setvariable variable=VersioningProperties]$versioningProperties"\n displayName: "Setup .NET specific versioning properties"\n\n - task: UsePythonVersion@0\n displayName: 'Use Python 3.11'\n inputs:\n versionSpec: '3.11'\n\n - template: /eng/pipelines/templates/steps/dotnet-diagnostics.yml\n parameters:\n LogFilePath: $(Build.ArtifactStagingDirectory)/pack.binlog\n\n # Due to discovering differing pack errors during debug vs release builds, we simply always opt into the more advanced\n # release pack. This ensures that the public ci is packing the same way as what we will eventually release, and we won't be\n # surprised by new errors that pop up only in internal when public CI was clean.\n - ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n # only use the project list override file if the service directory is not auto\n - pwsh: |\n dotnet pack eng/service.proj -warnaserror `\n /p:ValidateRunApiCompat=true `\n /p:SDKType=${{ parameters.SDKType }} `\n /p:IncludeTests=false `\n /p:PublicSign=false $(VersioningProperties) `\n /p:Configuration=Release `\n /p:CommitSHA=$(Build.SourceVersion) `\n /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) `\n /p:ServiceDirectory=* `\n /p:ProjectListOverrideFile=$(ProjectListOverrideFile) `\n /p:IncludePerf=false `\n /p:IncludeStress=false `\n /p:IncludeIntegrationTests=false `\n /p:EnableOverrideExclusions=true `\n $(DiagnosticArguments)\n displayName: "Build and Package for PR"\n - ${{ else }}:\n - script: >-\n dotnet pack eng/service.proj -warnaserror\n /p:ValidateRunApiCompat=true\n /p:SDKType=${{ parameters.SDKType }}\n /p:ServiceDirectory=${{ parameters.ServiceDirectory }}\n /p:IncludeTests=false\n /p:PublicSign=false $(VersioningProperties)\n /p:Configuration=Release\n /p:CommitSHA=$(Build.SourceVersion)\n /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory)\n $(DiagnosticArguments)\n displayName: "Build and Package Service Directory"\n\n # save package properties again, this time honoring the dev version number\n - ${{ if ne(parameters.ServiceDirectory, 'auto') }}:\n - template: /eng/common/pipelines/templates/steps/save-package-properties.yml\n parameters:\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n\n - task: Powershell@2\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/scripts/Save-Package-Namespaces-Property.ps1\n arguments: >\n -RepoRoot $(Build.SourcesDirectory)\n -PackageInfoDirectory $(Build.ArtifactStagingDirectory)/PackageInfo\n -BuildConfiguration Release\n pwsh: true\n workingDirectory: $(Pipeline.Workspace)\n displayName: Update package properties with namespaces\n condition: and(succeeded(), ne(variables['ProjectNames'], ''))\n\n - template: ../steps/archetype-sdk-docs.yml\n parameters:\n ServiceDirectory: ${{parameters.ServiceDirectory}}\n Artifacts: ${{parameters.Artifacts}}\n DocGenerationDir: "$(Build.SourcesDirectory)/doc/ApiDocGeneration"\n LibType: 'client'\n PackageInfoFolder: '$(Build.ArtifactStagingDirectory)/PackageInfo'\n\n - ${{ if eq(parameters.CheckAOTCompat, 'true') }}:\n - template: /eng/pipelines/templates/steps/aot-compatibility.yml\n parameters:\n ServiceDirectory: ${{ parameters.ServiceDirectory }}\n AOTTestInputs: ${{ parameters.AOTTestInputs }}\n PackageInfoFolder: '$(Build.ArtifactStagingDirectory)/PackageInfo'\n\n - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0\n displayName: "Component Detection"\n # ComponentGovernance is currently unable to run on pull requests of public projects. Running on\n # scheduled builds should be good enough.\n condition: and(succeededOrFailed(), ne(variables['Build.Reason'],'PullRequest'))\n inputs:\n ignoreDirectories: '.nuget'\n\n - ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml\n parameters:\n ArtifactPath: '$(Build.ArtifactStagingDirectory)'\n ArtifactName: 'packages_$(System.JobName)'\n - ${{ else }}:\n - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml\n parameters:\n ArtifactPath: '$(Build.ArtifactStagingDirectory)'\n ArtifactName: 'packages'\n\n - template: /eng/common/pipelines/templates/steps/create-apireview.yml\n parameters:\n Artifacts: ${{parameters.Artifacts}}\n\n - template: /eng/common/pipelines/templates/steps/detect-api-changes.yml\n parameters:\n Artifacts: ${{ parameters.Artifacts }}\n ${{ if eq(parameters.ServiceDirectory, 'auto') }}:\n ArtifactName: 'packages_$(System.JobName)'\n\n - template: /eng/common/pipelines/templates/steps/validate-all-packages.yml\n parameters:\n Artifacts: ${{ parameters.Artifacts }}\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\build.yml | build.yml | YAML | 8,186 | 0.8 | 0.057292 | 0.074286 | python-kit | 84 | 2023-11-30T06:55:36.758583 | GPL-3.0 | false | 53bcf77fbad58366b12b4fdce56cbeb7 |
parameters:\n- name: LogFilePath\n type: string\n default: $(Build.ArtifactStagingDirectory)/msbuild.binlog\n\nsteps:\n- pwsh: |\n if ('$(System.Debug)' -eq 'true') {\n Write-Host "##vso[task.setvariable variable=DiagnosticArguments;]/binaryLogger:LogFile=${{ parameters.LogFilePath }}"\n } else {\n Write-Host "##vso[task.setvariable variable=DiagnosticArguments;]"\n }\n displayName: Set diagnostic arguments\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\dotnet-diagnostics.yml | dotnet-diagnostics.yml | YAML | 421 | 0.8 | 0.076923 | 0 | react-lib | 794 | 2024-03-19T04:33:59.945796 | MIT | false | 71775f407e38e3a14f66fee29098802f |
parameters:\n EnableNuGetCache: true\n NuGetCacheKey: 'Build'\n Container: false\n\nsteps:\n - task: MSBuild@1\n displayName: Install DevOps Logger\n condition: and(succeeded(), eq(${{ parameters.Container }}, false))\n inputs:\n solution: eng/InstallDevopsLogger.proj\n msbuildArguments: /p:WorkFolder="$(Agent.WorkFolder)" /p:BuildDirectory="$(Agent.BuildDirectory)"\n # Installation steps need to be uncommented when switching to a newer SDK that's not available on DevOps agents\n - task: UseDotNet@2\n displayName: 'Use .NET SDK'\n retryCountOnTaskFailure: 3\n inputs:\n useGlobalJson: true\n performMultiLevelLookup: true\n - task: UseDotNet@2 # We need .NET 8 for the .NET 8 tests\n displayName: 'Use .NET 8.0 SDK'\n retryCountOnTaskFailure: 3\n inputs:\n # AspNetCore runtime pack can't be installed outside of SDK and we need it for integration tests\n packageType: sdk\n performMultiLevelLookup: true\n version: "8.0.x"\n - task: Cache@2\n inputs:\n key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/Packages.Data.props | ${{parameters.NuGetCacheKey}}'\n path: $(NUGET_PACKAGES)\n condition: and(succeeded(), ${{parameters.EnableNuGetCache}})\n continueOnError: true\n displayName: Cache NuGet packages | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\install-dotnet.yml | install-dotnet.yml | YAML | 1,286 | 0.8 | 0.060606 | 0.060606 | awesome-app | 3 | 2025-01-26T23:47:12.027269 | GPL-3.0 | false | 78ed334620c5d721e1fbb71b13f3d59d |
parameters:\n - name: PublishingArtifactName\n type: string\n - name: ServiceDirectory\n type: string\n - name: ForceDirect\n type: boolean\n default: false\n - name: ExcludePaths\n type: object\n default: []\n\nsteps:\n - script: |\n echo "##vso[task.setvariable variable=DISCOVER_DEPENDENT_PACKAGES]1"\n displayName: Enable AdditionalDependency Calculation\n\n - template: /eng/pipelines/templates/steps/install-dotnet.yml\n\n - template: /eng/common/pipelines/templates/steps/save-package-properties.yml\n parameters:\n ServiceDirectory: ${{parameters.ServiceDirectory}}\n PackageInfoDirectory: $(Build.ArtifactStagingDirectory)/PackageInfoPublishing\n ExcludePaths: ${{ parameters.ExcludePaths }}\n\n # when we publish the packageinfo as an artifact, it actually cleans up the original files. Since we need them during matrix generation steps\n # that will execute directly after the pregeneration steps here, we output them to a publishing directory, copy from there into the target PackageInfoDirectory,\n # and then publish the originals\n - pwsh: |\n mkdir "$(Build.ArtifactStagingDirectory)/PackageInfo"\n Get-ChildItem -Path "$(Build.ArtifactStagingDirectory)/PackageInfoPublishing" -File `\n | Copy-Item -Destination "$(Build.ArtifactStagingDirectory)/PackageInfo/$($_.Name)" -Force\n displayName: Copy ArtifactInfo from Publishing Directory\n\n - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml\n parameters:\n ArtifactName: '${{ parameters.PublishingArtifactName }}'\n ArtifactPath: '$(Build.ArtifactStagingDirectory)/PackageInfoPublishing'\n\n - pwsh: |\n $packageInfos = Get-ChildItem -Path "$(Build.ArtifactStagingDirectory)/PackageInfo" -Filter "*.json" -Recurse `\n | ForEach-Object { Get-Content $_.FullName | ConvertFrom-Json }\n\n $directPackages = $packageInfos | Where-Object { $_.IncludedForValidation -eq $false }\n\n if (!$directPackages) {\n Write-Host "Falling back to Azure.Template from the original package list. There are no other direct packages for assembly."\n\n # grab just the Azure.Template package from the original list, set it to direct\n Get-ChildItem -Path "$(Build.ArtifactStagingDirectory)/PackageInfo" -Filter "Azure.Template.json" -Recurse |\n ForEach-Object {\n $json = Get-Content $_.FullName | ConvertFrom-Json\n $json.IncludedForValidation = $false\n $json | ConvertTo-Json -Depth 100 | Set-Content $_.FullName\n }\n }\n\n # remove all the indirect packages from the list of packages that we want to generate matrix for\n Get-ChildItem -Path "$(Build.ArtifactStagingDirectory)/PackageInfo" -Filter "*.json" -Recurse |\n ForEach-Object {\n $json = Get-Content $_.FullName | ConvertFrom-Json\n if ($json.IncludedForValidation -eq $true) {\n Remove-Item $_.FullName -Force\n }\n }\n displayName: Only target direct packages for build and test\n condition: and(succeededOrFailed(), eq(${{ parameters.ForceDirect }}, true))\n\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\pr-matrix-presteps.yml | pr-matrix-presteps.yml | YAML | 3,087 | 0.8 | 0.073529 | 0.087719 | python-kit | 517 | 2024-10-27T23:10:01.694736 | Apache-2.0 | false | 1042c23382fc27740a50f6a32c54e2c8 |
parameters:\n PackageInfo: ''\n Artifacts: []\n IncludeIndirect: true\n Restore: false\n SetOverrideFile: true\nsteps:\n # Package-Properties folder contains the package properties for all discovered packages that were either A) affected by the PR or\n # B) explicitly present in the service directory. This repo splits the builds into two categories: "mgmt" and "dataplane". While\n # a given directory may contain both, there will be a separate build definition to release the management packages. Due to this\n # we need to artificially filter the packages to ensure that only the packages targeted for THAT ci.yml are built.\n # When we merge the PR adding net - pullrequest, this code will also merge, meaning the public - <service> - ci builds will still operate\n # EXACTLY the same as they did before the pipelinev3 change. This is important to ensure that we don't accidentally build the wrong packages\n # while in the integration period. After we disable all the public `net - <service> - ci` builds, only the `net - pullrequest` build WONT provide\n # an artifact list, which will allow the expand/contract. Meanwhile the internal builds will continue to provide the artifact list from their\n # individual ci.yml and ci.mgmt.yml files.\n - pwsh: |\n $artifacts = '${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json\n $includeIndirect = $${{ parameters.IncludeIndirect }}\n $knownArtifacts = @()\n if ($artifacts) {\n $knownArtifacts = $artifacts | ForEach-Object { $_.name }\n }\n\n $packageProperties = Get-ChildItem -Recurse "${{ parameters.PackageInfo }}" *.json `\n | Where-Object { if($knownArtifacts) { $knownArtifacts -contains $_.Name.Replace(".json", "") } else { $true } }\n\n if (-not $includeIndirect) {\n $packageProperties = $packageProperties | Where-Object { (Get-Content -Raw $_ | ConvertFrom-Json).IncludedForValidation -eq $false }\n }\n\n $pkgNames = $packageProperties | ForEach-Object { $_.Name.Replace(".json", "") }\n\n $setting = $pkgNames -join ","\n Write-Host "Setting ProjectNames to: `n$setting"\n Write-Host "##vso[task.setvariable variable=ProjectNames;]$setting"\n\n if (!$pkgNames) {\n Write-Host "No packages were identified for this build."\n }\n displayName: Resolve Targeted Packages\n condition: eq(variables['ProjectNames'], '')\n\n # this script sets $(ChangedServices) and populates a props file with the targeted set of projects\n # for the build. This file is set to variable $(ProjectListOverrideFile).\n - pwsh: |\n ./eng/scripts/splittestdependencies/set-artifact-packages.ps1 `\n -ProjectNames "$(ProjectNames)" `\n -PackageInfoFolder "${{ parameters.PackageInfo }}" `\n -OutputPath $(Build.SourcesDirectory)/projlist `\n -SetOverrideFile $${{ parameters.SetOverrideFile }}\n displayName: Resolve Service and Project List\n condition: ne(variables['ProjectNames'], '')\n\n - ${{ if eq(parameters.Restore, true) }}:\n - template: /eng/common/testproxy/test-proxy-tool.yml\n parameters:\n runProxy: false\n\n - pwsh: |\n $packageProperties = Get-ChildItem -Recurse '${{ parameters.PackageInfo }}' -Filter *.json `\n | Foreach-Object { Get-Content -Raw -Path $_.FullName | ConvertFrom-Json }\n $packageSet = "$(ProjectNames)" -split ","\n $changedProjects = $packageProperties | Where-Object { $packageSet -contains $_.ArtifactName }\n\n foreach ($proj in $changedProjects) {\n $assets = Join-Path (Join-Path "$(Build.SourcesDirectory)" $proj.DirectoryPath) "assets.json"\n if (Test-Path $assets) {\n Write-Host "Restoring $assets"\n if ($IsWindows) {\n & "$(Build.BinariesDirectory)/test-proxy/test-proxy.exe" restore -a $assets\n } else {\n & "$(Build.BinariesDirectory)/test-proxy/test-proxy" restore -a $assets\n }\n }\n }\n displayName: Restore Recordings\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\set-artifact-packages.yml | set-artifact-packages.yml | YAML | 3,981 | 0.95 | 0.155844 | 0.161765 | node-utils | 690 | 2025-05-19T01:11:33.993544 | GPL-3.0 | false | cdf8df53ea7176dd2924c82e3b17b8c5 |
parameters:\n SourceFolder: '' # ArtifactName (aka "packages")\n TargetFolder: '' # artifact.safename (azuretemplate)\n FileFilter: '' #${{artifact.name}}.[0-9]*.[0-9]*.[0-9]*\n Exclude: '' # Regex of the exlude packges (aka "*.symbols.nupkg")\nsteps:\n - pwsh: |\n New-Item -Force -Type Directory -Name ${{parameters.TargetFolder}} -Path $(Pipeline.Workspace)\n Write-Host "Copy-Item -Force -Recurse $(Pipeline.Workspace)/${{parameters.SourceFolder}}/${{parameters.FileFilter}} $(Pipeline.Workspace)/${{parameters.TargetFolder}}"\n Copy-Item -Force -Recurse $(Pipeline.Workspace)/${{parameters.SourceFolder}}/${{parameters.FileFilter}} $(Pipeline.Workspace)/${{parameters.TargetFolder}} -Exclude "${{parameters.Exclude}}"\n displayName: Stage artifacts\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\stage-artifacts.yml | stage-artifacts.yml | YAML | 767 | 0.8 | 0 | 0 | vue-tools | 414 | 2024-02-06T18:21:23.045027 | GPL-3.0 | false | 0b592d11901df22ad4d82d78a9fc051a |
steps:\n - pwsh: |\n New-Item $(Build.ArtifactStagingDirectory)/dumps -ItemType directory\n foreach($dumpFile in (Get-ChildItem -Path . -Recurse -Filter *.dmp -File))\n {\n $fileFullName = $dumpFile.FullName\n $fileName = $dumpFile.Name\n Move-Item -Path $fileFullName -Destination $(Build.ArtifactStagingDirectory)/dumps/$fileName -ErrorAction SilentlyContinue\n Write-Host "##vso[task.setvariable variable=uploadDump]true"\n }\n [System.IO.Compression.ZipFile]::CreateFromDirectory("$(Build.ArtifactStagingDirectory)/dumps","$(Build.ArtifactStagingDirectory)/dumps.zip")\n condition: always()\n displayName: Copy dumps to staging directory\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\steps\upload-dumps.yml | upload-dumps.yml | YAML | 690 | 0.8 | 0 | 0 | node-utils | 205 | 2025-06-09T02:52:51.664764 | MIT | false | d824f219d9bf0822b346012cff5b35dd |
variables:\n DocWardenVersion: '0.6.1'\n OfficialBuildId: $(Build.BuildNumber)\n AdditionalTestArguments: ''\n skipComponentGovernanceDetection: true\n nugetMultiFeedWarnLevel: 'none'\n ${{ if ne(variables['System.TeamProject'], 'internal') }}:\n BuildConfiguration: 'Debug'\n ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n BuildConfiguration: 'Release'\n DocFxVersion: 'v2.56.1'\n CollectCoverage: false\n NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages/\n DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1\n AzuriteLocation: $(Pipeline.Workspace)/.storage/azurite\n AzuriteVersion: 3.11.0\n DOTNET_CLI_TELEMETRY_OPTOUT: 1\n DOTNET_NOLOGO: 1\n Codeql.SkipTaskAutoInjection: true\n # Define optional AdditionalTestFilters via pipeline runtime variables or matrix config variables\n # See https://docs.microsoft.com/dotnet/core/testing/selective-unit-tests?pivots=nunit\n AdditionalTestFilters: "Placeholder!=DefaultIgnoreMe"\n\n # Docs publishing variables for repo/owner\n DocRepoOwner: 'Azure'\n DocRepoName: 'azure-docs-sdk-dotnet'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\variables\globals.yml | globals.yml | YAML | 1,045 | 0.8 | 0.115385 | 0.12 | python-kit | 3 | 2025-03-17T00:26:53.767960 | MIT | false | 395cc68461b092ee5f43eba6953e9bd3 |
# Default pool image selection. Set as variable so we can override at pipeline level\n\nvariables:\n - name: LINUXPOOL\n value: azsdk-pool-mms-ubuntu-2004-general\n - name: WINDOWSPOOL\n value: azsdk-pool-mms-win-2022-general\n - name: MACPOOL\n value: Azure Pipelines\n\n - name: LINUXVMIMAGE\n value: azsdk-pool-mms-ubuntu-2004-1espt\n - name: LINUXNEXTVMIMAGE\n value: ubuntu-22.04\n - name: WINDOWSVMIMAGE\n value: azsdk-pool-mms-win-2022-1espt\n - name: MACVMIMAGE\n value: macos-latest\n\n # Values required for pool.os field in 1es pipeline templates\n - name: LINUXOS\n value: linux\n - name: WINDOWSOS\n value: windows\n - name: MACOS\n value: macOS\n\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\pipelines\templates\variables\image.yml | image.yml | YAML | 676 | 0.95 | 0.037037 | 0.086957 | vue-tools | 3 | 2024-07-06T13:36:36.689853 | BSD-3-Clause | false | 1b4b7c37264aefc6cb4c92707641ad4c |
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.\n# Excludes eng/scripts/typespec as these are only used in the eng/packages/http-client-csharp/ci.yml pipeline.\n\ntrigger:\n branches:\n include:\n - main\n - feature/*\n - release/*\n - hotfix/*\n paths:\n include:\n - eng/scripts/*\n exclude:\n - eng/scripts/typespec\n\npr:\n branches:\n include:\n - main\n - feature/*\n - release/*\n - hotfix/*\n paths:\n include:\n - eng/scripts/*\n exclude:\n - eng/scripts/typespec\n\nextends:\n template: /eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml\n parameters:\n TargetDirectory: eng/scripts/\n TargetTags: 'UnitTest'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\scripts\ci.yml | ci.yml | YAML | 730 | 0.8 | 0 | 0.064516 | vue-tools | 17 | 2024-11-28T06:59:55.435541 | MIT | false | 864e6ee1672edb2023e8603233b20c09 |
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.\ntrigger:\n branches:\n include:\n - main\n - feature/*\n - release/*\n - hotfix/*\n paths:\n include:\n - eng/scripts/docs\n\npr:\n branches:\n include:\n - main\n - feature/*\n - release/*\n - hotfix/*\n paths:\n include:\n - eng/scripts/docs\n\nextends:\n template: /eng/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml\n parameters:\n TargetDirectory: eng/common-tests/doc-automation/service-readme-generation\n TargetTags: 'UnitTest'\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\scripts\docs\ci.yml | ci.yml | YAML | 578 | 0.8 | 0 | 0.038462 | react-lib | 99 | 2024-05-20T15:57:28.677825 | BSD-3-Clause | false | 1f64490e7f3b38fe0dda854d58c3ef99 |
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.\n\ntrigger: none\n\npr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n paths:\n include:\n - sdk/LowercaseProviderShortName/ci.mgmt.yml\n - sdk/LowercaseProviderShortName/Azure.ResourceManager.Template/\n\nextends:\n template: /eng/pipelines/templates/stages/archetype-sdk-client.yml\n parameters:\n ServiceDirectory: LowercaseProviderShortName\n LimitForPullRequest: true\n Artifacts:\n - name: Azure.ResourceManager.Template\n safeName: AzureManagementTemplateSafeName\n | dataset_sample\yaml\Azure_azure-sdk-for-net\eng\templates\Azure.ResourceManager.Template\content\ci.mgmt.yml | ci.mgmt.yml | YAML | 607 | 0.8 | 0 | 0.047619 | python-kit | 735 | 2024-03-09T23:34:36.135129 | BSD-3-Clause | false | 687f9dc19b06600383be11ec3f6df852 |
pr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n - pipelinev3*\n paths:\n include:\n - "*"\n\n exclude:\n - eng/packages/http-client-csharp/\n\nparameters:\n - name: Service\n type: string\n default: auto\n\nextends:\n template: /eng/pipelines/templates/stages/archetype-sdk-client.yml\n parameters:\n ServiceDirectory: ${{ parameters.Service }}\n CheckAOTCompat: true\n BuildSnippets: true\n ExcludePaths:\n - eng/packages/http-client-csharp/\n | dataset_sample\yaml\Azure_azure-sdk-for-net\sdk\pullrequest.yml | pullrequest.yml | YAML | 505 | 0.8 | 0 | 0 | awesome-app | 270 | 2024-09-04T06:43:26.954548 | Apache-2.0 | false | 485b301e61eda533a12da3afc1028c2e |
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.\n\ntrigger: none\npr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n paths:\n include:\n - sdk/advisor/ci.mgmt.yml\n - sdk/advisor/Azure.ResourceManager.Advisor/\n\nextends:\n template: /eng/pipelines/templates/stages/archetype-sdk-client.yml\n parameters:\n ServiceDirectory: advisor\n LimitForPullRequest: true\n Artifacts:\n - name: Azure.ResourceManager.Advisor\n safeName: AzureResourceManagerAdvisor\n | dataset_sample\yaml\Azure_azure-sdk-for-net\sdk\advisor\ci.mgmt.yml | ci.mgmt.yml | YAML | 543 | 0.8 | 0 | 0.047619 | react-lib | 689 | 2023-08-26T20:40:00.609266 | MIT | false | a6b8b20d3f09079ee4338f4bd7a8a0c1 |
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.\n\ntrigger: none\npr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n paths:\n include:\n - sdk/agricultureplatform/ci.mgmt.yml\n - sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/\n\nextends:\n template: /eng/pipelines/templates/stages/archetype-sdk-client.yml\n parameters:\n ServiceDirectory: agricultureplatform\n LimitForPullRequest: true\n Artifacts:\n - name: Azure.ResourceManager.AgriculturePlatform\n safeName: AzureResourceManagerAgriculturePlatform\n | dataset_sample\yaml\Azure_azure-sdk-for-net\sdk\agricultureplatform\ci.mgmt.yml | ci.mgmt.yml | YAML | 615 | 0.8 | 0 | 0.047619 | node-utils | 989 | 2023-07-26T09:06:55.919116 | GPL-3.0 | false | c47dbf744b8577d261fb1469f44774ef |
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.\n\ntrigger: none\npr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n paths:\n include:\n - sdk/agrifood/ci.mgmt.yml\n - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/\n\nextends:\n template: /eng/pipelines/templates/stages/archetype-sdk-client.yml\n parameters:\n SDKType: mgmtclient\n ServiceDirectory: agrifood\n LimitForPullRequest: true\n Artifacts:\n - name: Azure.ResourceManager.AgFoodPlatform\n safeName: AzureResourceManagerAgFoodPlatform\n | dataset_sample\yaml\Azure_azure-sdk-for-net\sdk\agrifood\ci.mgmt.yml | ci.mgmt.yml | YAML | 591 | 0.8 | 0 | 0.045455 | node-utils | 627 | 2023-11-22T01:08:38.462194 | Apache-2.0 | false | c1aa83a8380f77a2c760e437cdc1f0d6 |
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.\ntrigger:\n branches:\n include:\n - main\n - hotfix/*\n - release/*\n paths:\n include:\n - sdk/agrifood/ci.yml\n - sdk/agrifood/service.projects\n - sdk/agrifood/Azure.Verticals.AgriFood.Farming\n\npr:\n branches:\n include:\n - main\n - feature/*\n - hotfix/*\n - release/*\n paths:\n include:\n - sdk/agrifood/ci.yml\n - sdk/agrifood/service.projects\n - sdk/agrifood/Azure.Verticals.AgriFood.Farming\n\nextends:\n template: /eng/pipelines/templates/stages/archetype-sdk-client.yml\n parameters:\n SDKType: client\n ServiceDirectory: agrifood\n ArtifactName: packages\n Artifacts:\n - name: Azure.Verticals.AgriFood.Farming\n safeName: AzureVerticalsAgriFoodFarming | dataset_sample\yaml\Azure_azure-sdk-for-net\sdk\agrifood\ci.yml | ci.yml | YAML | 798 | 0.8 | 0 | 0.030303 | vue-tools | 206 | 2024-11-08T20:52:55.402730 | MIT | false | 05a7eb4d2d0202d291b5daf9ebe24005 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.