From ead96bf7c467ff5b95b7c4352b5380df2a8486a4 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 11:23:35 -0600 Subject: [PATCH 01/75] Generation pipeline migration to 1ES --- .azure-pipelines/generation-pipeline.yml | 1539 ++++++++++------- .../build-and-publish-kiota.yml | 9 +- .../build-and-publish-typewriter.yml | 10 +- .../generation-templates/capture-metadata.yml | 23 +- .../generation-templates/capture-openapi.yml | 51 +- .../generation-templates/download-kiota.yml | 12 +- .../download-typewriter.yml | 11 +- .../language-generation-kiota.yml | 4 +- .../language-generation.yml | 7 +- .../set-up-for-generation-kiota.yml | 28 +- .../set-up-for-generation.yml | 22 +- 11 files changed, 913 insertions(+), 803 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 13cdebb15..07a128b3d 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -1,6 +1,7 @@ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# contains an end to end validation pipeline using C# compilation tests for staging beta metadata - +# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. +# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. +# This pipeline will be extended to the Custom template +# The pool section has been filled with placeholder values, check the following link for guidance: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/onboardingesteams/overview, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage trigger: none pr: none schedules: @@ -12,126 +13,116 @@ schedules: always: true resources: - repositories: - - repository: msgraph-sdk-dotnet - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-dotnet - ref: main - - repository: msgraph-beta-sdk-dotnet - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-dotnet - ref: main - - repository: msgraph-sdk-php - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-php - ref: main - - repository: msgraph-beta-sdk-php - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-php - ref: main - - repository: msgraph-typescript-typings - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-typescript-typings - ref: main - - repository: msgraph-beta-typescript-typings - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-typescript-typings - ref: main - - repository: msgraph-sdk-java - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-java - ref: main - - repository: msgraph-beta-sdk-java - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-java - ref: main - - repository: msgraph-sdk-go - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-go - ref: main - - repository: msgraph-beta-sdk-go - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-go - ref: main - - repository: msgraph-sdk-typescript - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-typescript - ref: main - - repository: msgraph-beta-sdk-typescript - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-typescript - ref: main - - repository: msgraph-sdk-python - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-python - ref: main - - repository: msgraph-beta-sdk-python - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-python - ref: main - - repository: msgraph-metadata - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-metadata - - repository: microsoft-graph-docs - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/microsoft-graph-docs - - repository: kiota - type: github - endpoint: microsoftkiota - name: microsoft/kiota - - repository: Agents-M365Copilot - type: github - endpoint: microsoftkiota - name: microsoft/Agents-M365Copilot - - -pool: 1es-ubuntu-latest-m - + repositories: + - repository: msgraph-sdk-dotnet + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-dotnet + ref: main + - repository: msgraph-beta-sdk-dotnet + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-dotnet + ref: main + - repository: msgraph-sdk-php + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-php + ref: main + - repository: msgraph-beta-sdk-php + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-php + ref: main + - repository: msgraph-typescript-typings + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-typescript-typings + ref: main + - repository: msgraph-beta-typescript-typings + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-typescript-typings + ref: main + - repository: msgraph-sdk-java + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-java + ref: main + - repository: msgraph-beta-sdk-java + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-java + ref: main + - repository: msgraph-sdk-go + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-go + ref: main + - repository: msgraph-beta-sdk-go + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-go + ref: main + - repository: msgraph-sdk-typescript + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-typescript + ref: main + - repository: msgraph-beta-sdk-typescript + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-typescript + ref: main + - repository: msgraph-sdk-python + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-python + ref: main + - repository: msgraph-beta-sdk-python + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-python + ref: main + - repository: msgraph-metadata + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-metadata + - repository: microsoft-graph-docs + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/microsoft-graph-docs + - repository: kiota + type: github + endpoint: microsoftkiota + name: microsoft/kiota + - repository: Agents-M365Copilot + type: github + endpoint: microsoftkiota + name: microsoft/Agents-M365Copilot parameters: - - name: v1BranchPrefix - default: v1.0/pipelinebuild - displayName: V1 Branch Prefix - - - name: betaBranchPrefix - default: beta/pipelinebuild - displayName: Beta Branch Prefix (should be different than V1) - - - name: skipMetadataCaptureAndClean - default: false - displayName: Skip metadata capture and clean - type: boolean - - - name: skipOpenApiCaptureAndClean - default: false - displayName: Skip OpenAPI capture and clean - type: boolean - - - name: publishChanges - default: true - type: boolean - displayName: Publish changes? - - - name: overrideSkipCI - default: false - type: boolean - displayName: Override [skip ci]? Checking this box will generate the SDK PRs - +- name: v1BranchPrefix + default: v1.0/pipelinebuild + displayName: V1 Branch Prefix +- name: betaBranchPrefix + default: beta/pipelinebuild + displayName: Beta Branch Prefix (should be different than V1) +- name: skipMetadataCaptureAndClean + default: false + displayName: Skip metadata capture and clean + type: boolean +- name: skipOpenApiCaptureAndClean + default: false + displayName: Skip OpenAPI capture and clean + type: boolean +- name: publishChanges + default: true + type: boolean + displayName: Publish changes? +- name: overrideSkipCI + default: false + type: boolean + displayName: Override [skip ci]? Checking this box will generate the SDK PRs variables: buildConfiguration: 'Release' cleanMetadataFileBeta: '$(Build.SourcesDirectory)/msgraph-metadata/clean_beta_metadata/cleanMetadataWithDescriptionsbeta.xml' @@ -158,288 +149,390 @@ variables: conversionSettingsDirectory: '$(Build.SourcesDirectory)/msgraph-metadata/conversion-settings' transformScript: '$(Build.SourcesDirectory)/msgraph-metadata/transforms/csdl/preprocess_csdl.xsl' docsDirectory: '$(Build.SourcesDirectory)/microsoft-graph-docs' - v1Branch: ${{ parameters.v1BranchPrefix }}/$(Build.BuildId) betaBranch: ${{ parameters.betaBranchPrefix }}/$(Build.BuildId) - publishChanges: ${{ parameters.publishChanges }} overrideSkipCI: ${{ parameters.overrideSkipCI }} skipMetadataCaptureAndClean: ${{ parameters.skipMetadataCaptureAndClean }} skipOpenApiCaptureAndClean: ${{ parameters.skipOpenApiCaptureAndClean }} phpVersion: 7.2 - -# This stage is the core dependency for all other stages. -stages: -- stage: stage_build_and_publish_typewriter - dependsOn: [] # remove the implicit dependency to any previous stage - jobs: - - job: build_and_publish_typewriter - steps: - - template: generation-templates/build-and-publish-typewriter.yml - -- stage: stage_build_and_publish_kiota - dependsOn: [] # remove the implicit dependency to any previous stage - jobs: - - job: build_and_publish_kiota - steps: - - template: generation-templates/build-and-publish-kiota.yml - +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + pool: + name: Azure-Pipelines-1ESPT-ExDShared + vmImage: ubuntu-latest + stages: + - stage: stage_build_and_publish_typewriter + dependsOn: [] # remove the implicit dependency to any previous stage + jobs: + - job: build_and_publish_typewriter + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: typewriter + steps: + - template: /.azure-pipelines/generation-templates/build-and-publish-typewriter.yml@self + - stage: stage_build_and_publish_kiota + dependsOn: [] # remove the implicit dependency to any previous stage + jobs: + - job: build_and_publish_kiota + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: kiota + steps: + - template: /.azure-pipelines/generation-templates/build-and-publish-kiota.yml@self # Downloads the latest public beta metadata. If there are changes, we checkin # the public metadata into microsoftgraph/msgraph-metadata, and then run the # metadata through the cleaning and documentation processes before validating # the results with generated and built .NET code files as a smoke test. -- stage: stage_v1_metadata - dependsOn: stage_build_and_publish_typewriter - condition: | - and(succeeded('stage_build_and_publish_typewriter'), - eq( ${{ parameters.skipMetadataCaptureAndClean }}, false)) - jobs: - - job: v1_metadata - steps: - - template: generation-templates/capture-metadata.yml - parameters: - endpoint: 'v1.0' - inputMetadata: $(rawMetadataFileV1) - outputPath: $(cleanMetadataFileV1OutputPath) - cleanMetadataFile: $(cleanMetadataFileV1) - cleanMetadataFolder: $(cleanMetadataFolderV1) - cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsV1) - metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource) + - stage: stage_v1_metadata + dependsOn: stage_build_and_publish_typewriter + condition: | + and(succeeded('stage_build_and_publish_typewriter'), + eq( ${{ parameters.skipMetadataCaptureAndClean }}, false)) + jobs: + - job: v1_metadata + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: ${{ parameters.cleanMetadataFolder }} + inputs: + - input: pipelineArtifact + buildType: 'current' + artifactName: 'typewriter' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self + parameters: + endpoint: 'v1.0' + inputMetadata: $(rawMetadataFileV1) + outputPath: $(cleanMetadataFileV1OutputPath) + cleanMetadataFile: $(cleanMetadataFileV1) + cleanMetadataFolder: $(cleanMetadataFolderV1) + cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsV1) + metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource) # Same description as stage_v1_metadata -- stage: stage_beta_metadata - dependsOn: stage_build_and_publish_typewriter - condition: | - and(succeeded('stage_build_and_publish_typewriter'), - eq( ${{ parameters.skipMetadataCaptureAndClean }}, false)) - jobs: - - job: beta_metadata - steps: - - template: generation-templates/capture-metadata.yml - parameters: - endpoint: 'beta' - inputMetadata: $(rawMetadataFileBeta) - outputPath: $(cleanMetadataFileBetaOutputPath) - cleanMetadataFile: $(cleanMetadataFileBeta) - cleanMetadataFolder: $(cleanMetadataFolderBeta) - cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsBeta) - metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource) - -- stage: stage_v1_openapi - dependsOn: stage_v1_metadata - condition: and(in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped'), eq( ${{ parameters.skipOpenApiCaptureAndClean }}, false)) - jobs: - - template: generation-templates/capture-openapi.yml - parameters: - endpoint: 'v1.0' - outputPath: $(cleanOpenAPIFileV1OutputPath) - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - -- stage: stage_beta_openapi - dependsOn: stage_beta_metadata - condition: and(in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped'), eq( ${{ parameters.skipOpenApiCaptureAndClean }}, false)) - jobs: - - template: generation-templates/capture-openapi.yml - parameters: - endpoint: 'beta' - outputPath: $(cleanOpenAPIFileBetaOutputPath) - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - -- stage: stage_csharp_v1_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: csharp_v1_kiota - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'csharp' - version: '' - repoName: 'msgraph-sdk-dotnet' - baseBranchName : 'main' - branchName: 'kiota/$(v1Branch)' - targetClassName: "BaseGraphServiceClient" - targetNamespace: "Microsoft.Graph" - commitMessagePrefix: "feat(generation): update request builders and models" - customArguments: "-b" # Enable the backing store - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + - stage: stage_beta_metadata + dependsOn: stage_build_and_publish_typewriter + condition: | + and(succeeded('stage_build_and_publish_typewriter'), + eq( ${{ parameters.skipMetadataCaptureAndClean }}, false)) + jobs: + - job: beta_metadata + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: ${{ parameters.cleanMetadataFolder }} + inputs: + - input: pipelineArtifact + buildType: 'current' + artifactName: 'typewriter' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self parameters: - repoName: msgraph-sdk-dotnet - -- stage: stage_csharp_beta_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: csharp_beta_kiota - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'csharp' - version: 'beta' - repoName: 'msgraph-beta-sdk-dotnet' - baseBranchName : 'main' - branchName: 'kiota/$(betaBranch)' - targetClassName: "BaseGraphServiceClient" - targetNamespace: "Microsoft.Graph.Beta" - commitMessagePrefix: "feat(generation): update request builders and models" - customArguments: "-b" # Enable the backing store - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + endpoint: 'beta' + inputMetadata: $(rawMetadataFileBeta) + outputPath: $(cleanMetadataFileBetaOutputPath) + cleanMetadataFile: $(cleanMetadataFileBeta) + cleanMetadataFolder: $(cleanMetadataFolderBeta) + cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsBeta) + metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource) + + - stage: stage_v1_openapi + dependsOn: stage_v1_metadata + condition: and(in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped'), eq( ${{ parameters.skipOpenApiCaptureAndClean }}, false)) + jobs: + - template: /.azure-pipelines/generation-templates/capture-openapi.yml@self + parameters: + endpoint: 'v1.0' + outputPath: $(cleanOpenAPIFileV1OutputPath) + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + + - stage: stage_beta_openapi + dependsOn: stage_beta_metadata + condition: and(in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped'), eq( ${{ parameters.skipOpenApiCaptureAndClean }}, false)) + jobs: + - template: /.azure-pipelines/generation-templates/capture-openapi.yml@self + parameters: + endpoint: 'beta' + outputPath: $(cleanOpenAPIFileBetaOutputPath) + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + + - stage: stage_csharp_v1_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_v1_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-dotnet - -- stage: stage_go_v1 - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: go_v1 - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'go' - version: '' - repoName: 'msgraph-sdk-go' - branchName: $(v1Branch) - targetClassName: "GraphBaseServiceClient" - targetNamespace: "github.com/microsoftgraph/msgraph-sdk-go/" - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store - commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - languageSpecificSteps: - - template: generation-templates/go.yml + language: 'csharp' + version: '' + repoName: 'msgraph-sdk-dotnet' + baseBranchName: 'main' + branchName: 'kiota/$(v1Branch)' + targetClassName: "BaseGraphServiceClient" + targetNamespace: "Microsoft.Graph" + commitMessagePrefix: "feat(generation): update request builders and models" + customArguments: "-b" # Enable the backing store + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + languageSpecificSteps: + - template: generation-templates/dotnet-kiota.yml + parameters: + repoName: msgraph-sdk-dotnet + + - stage: stage_csharp_beta_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_beta_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-sdk-go - -- stage: stage_go_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: go_beta - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'go' - version: 'beta' - repoName: 'msgraph-beta-sdk-go' - branchName: $(betaBranch) - targetClassName: "GraphBaseServiceClient" - targetNamespace: "github.com/microsoftgraph/msgraph-beta-sdk-go/" - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store - commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - languageSpecificSteps: - - template: generation-templates/go.yml + language: 'csharp' + version: 'beta' + repoName: 'msgraph-beta-sdk-dotnet' + baseBranchName: 'main' + branchName: 'kiota/$(betaBranch)' + targetClassName: "BaseGraphServiceClient" + targetNamespace: "Microsoft.Graph.Beta" + commitMessagePrefix: "feat(generation): update request builders and models" + customArguments: "-b" # Enable the backing store + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + languageSpecificSteps: + - template: generation-templates/dotnet-kiota.yml + parameters: + repoName: msgraph-beta-sdk-dotnet + + - stage: stage_go_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: go_v1 + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-go - -- stage: stage_java_v1_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: java_v1_kiota - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'java' - version: '' - repoName: 'msgraph-sdk-java' - baseBranchName: 'main' - branchName: '$(v1Branch)' - targetClassName: "BaseGraphServiceClient" - targetNamespace: "com.Microsoft.Graph" - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - commitMessagePrefix: "feat(generation): update request builders and models" - languageSpecificSteps: - - template: generation-templates/java-kiota.yml + language: 'go' + version: '' + repoName: 'msgraph-sdk-go' + branchName: $(v1Branch) + targetClassName: "GraphBaseServiceClient" + targetNamespace: "github.com/microsoftgraph/msgraph-sdk-go/" + customArguments: "-b -e '/me' -e '/me/**'" + commitMessagePrefix: "feat(generation): update request builders and models" + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + languageSpecificSteps: + - template: generation-templates/go.yml + parameters: + repoName: msgraph-sdk-go + - stage: stage_go_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: go_beta + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-sdk-java - namespacePath: com/microsoft/graph - -- stage: stage_java_beta_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: java_beta_kiota - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'java' - version: 'beta' - repoName: 'msgraph-beta-sdk-java' - baseBranchName: 'main' - branchName: '$(betaBranch)' - targetClassName: "BaseGraphServiceClient" - targetNamespace: "com.Microsoft.Graph.Beta" - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - commitMessagePrefix: "feat(generation): update request builders and models" - languageSpecificSteps: - - template: generation-templates/java-kiota.yml + language: 'go' + version: 'beta' + repoName: 'msgraph-beta-sdk-go' + branchName: $(betaBranch) + targetClassName: "GraphBaseServiceClient" + targetNamespace: "github.com/microsoftgraph/msgraph-beta-sdk-go/" + customArguments: "-b -e '/me' -e '/me/**'" + commitMessagePrefix: "feat(generation): update request builders and models" + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + languageSpecificSteps: + - template: generation-templates/go.yml + parameters: + repoName: msgraph-beta-sdk-go + - stage: stage_java_v1_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: java_v1_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-java - namespacePath: com/microsoft/graph/beta - - -- stage: stage_php_beta_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: php_beta_kiota - steps: - - template: generation-templates/language-generation-kiota.yml + language: 'java' + version: '' + repoName: 'msgraph-sdk-java' + baseBranchName: 'main' + branchName: '$(v1Branch)' + targetClassName: "BaseGraphServiceClient" + targetNamespace: "com.Microsoft.Graph" + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store + commitMessagePrefix: "feat(generation): update request builders and models" + languageSpecificSteps: + - template: generation-templates/java-kiota.yml + parameters: + repoName: msgraph-sdk-java + namespacePath: com/microsoft/graph + - stage: stage_java_beta_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: java_beta_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'java' + version: 'beta' + repoName: 'msgraph-beta-sdk-java' + baseBranchName: 'main' + branchName: '$(betaBranch)' + targetClassName: "BaseGraphServiceClient" + targetNamespace: "com.Microsoft.Graph.Beta" + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store + commitMessagePrefix: "feat(generation): update request builders and models" + languageSpecificSteps: + - template: generation-templates/java-kiota.yml + parameters: + repoName: msgraph-beta-sdk-java + namespacePath: com/microsoft/graph/beta + - stage: stage_php_beta_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: php_beta_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' version: 'beta' @@ -451,25 +544,36 @@ stages: commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - - template: generation-templates/php-kiota.yml - parameters: - repoName: msgraph-beta-sdk-php - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store - -- stage: stage_php_v1_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: php_v1_kiota - steps: - - template: generation-templates/language-generation-kiota.yml + - template: generation-templates/php-kiota.yml + parameters: + repoName: msgraph-beta-sdk-php + customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store + + - stage: stage_php_v1_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: php_v1_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' version: '' @@ -481,280 +585,375 @@ stages: commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - - template: generation-templates/php-kiota.yml - parameters: - repoName: msgraph-sdk-php - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store - -- stage: stage_typescript_v1 - dependsOn: - - stage_build_and_publish_typewriter - - stage_v1_metadata - condition: | - and - ( - eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), - in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_v1 - steps: - - template: generation-templates/language-generation.yml - parameters: - language: 'TypeScript' - version: '' - repoName: 'msgraph-typescript-typings' - branchName: $(v1Branch) - cleanMetadataFile: $(cleanMetadataFileV1) - cleanMetadataFolder: $(cleanMetadataFolderV1) - languageSpecificSteps: - - template: generation-templates/typescript.yml + - template: generation-templates/php-kiota.yml + parameters: + repoName: msgraph-sdk-php + customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store + + - stage: stage_typescript_v1 + dependsOn: + - stage_build_and_publish_typewriter + - stage_v1_metadata + condition: | + and + ( + eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_v1 + templateContext: + inputs: + - input: pipelineArtifact + buildType: 'current' + artifactName: 'typewriter' + targetPath: '$(Build.SourcesDirectory)' + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + steps: + - template: /.azure-pipelines/generation-templates/language-generation.yml@self parameters: + language: 'TypeScript' + version: '' repoName: 'msgraph-typescript-typings' - -- stage: stage_typescript_beta - dependsOn: - - stage_build_and_publish_typewriter - - stage_beta_metadata - condition: | - and - ( - eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), - in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_beta - steps: - - template: generation-templates/language-generation.yml - parameters: - language: 'TypeScript' - version: 'beta' - repoName: 'msgraph-beta-typescript-typings' - branchName: $(betaBranch) - cleanMetadataFile: $(cleanMetadataFileBeta) - cleanMetadataFolder: $(cleanMetadataFolderBeta) - languageSpecificSteps: - - template: generation-templates/typescript.yml + branchName: $(v1Branch) + cleanMetadataFile: $(cleanMetadataFileV1) + cleanMetadataFolder: $(cleanMetadataFolderV1) + languageSpecificSteps: + - template: generation-templates/typescript.yml + parameters: + repoName: 'msgraph-typescript-typings' + + - stage: stage_typescript_beta + dependsOn: + - stage_build_and_publish_typewriter + - stage_beta_metadata + condition: | + and + ( + eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_beta + templateContext: + inputs: + - input: pipelineArtifact + buildType: 'current' + artifactName: 'typewriter' + targetPath: '$(Build.SourcesDirectory)' + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + steps: + - template: /.azure-pipelines/generation-templates/language-generation.yml@self parameters: + language: 'TypeScript' + version: 'beta' repoName: 'msgraph-beta-typescript-typings' - -- stage: stage_typescript_sdk_v1 - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_sdk_v1 - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'typescript' - version: '' - repoName: 'msgraph-sdk-typescript' - baseBranchName : 'main' - branchName: $(v1Branch) - commitMessagePrefix: "feat(generation): update request builders and models" - targetClassName: "GraphBaseServiceClient" - targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/" - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - languageSpecificSteps: - - template: generation-templates/typescript-sdk.yml + branchName: $(betaBranch) + cleanMetadataFile: $(cleanMetadataFileBeta) + cleanMetadataFolder: $(cleanMetadataFolderBeta) + languageSpecificSteps: + - template: generation-templates/typescript.yml + parameters: + repoName: 'msgraph-beta-typescript-typings' + + - stage: stage_typescript_sdk_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_sdk_v1 + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-sdk-typescript - packageName: '@microsoft/msgraph-sdk' - -- stage: stage_typescript_sdk_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_sdk_beta - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'typescript' - version: 'beta' - repoName: 'msgraph-beta-sdk-typescript' - baseBranchName : 'main' - branchName: $(betaBranch) - commitMessagePrefix: "feat(generation): update request builders and models" - targetClassName: "GraphBetaBaseServiceClient" - targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/" - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - languageSpecificSteps: - - template: generation-templates/typescript-sdk.yml + language: 'typescript' + version: '' + repoName: 'msgraph-sdk-typescript' + baseBranchName: 'main' + branchName: $(v1Branch) + commitMessagePrefix: "feat(generation): update request builders and models" + targetClassName: "GraphBaseServiceClient" + targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/" + customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + languageSpecificSteps: + - template: generation-templates/typescript-sdk.yml + parameters: + repoName: msgraph-sdk-typescript + packageName: '@microsoft/msgraph-sdk' + + - stage: stage_typescript_sdk_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_sdk_beta + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-typescript - packageName: '@microsoft/msgraph-beta-sdk' - -- stage: stage_python_v1 - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: python_v1 - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'python' - version: '' - repoName: 'msgraph-sdk-python' - branchName: $(v1Branch) - targetClassName: "BaseGraphServiceClient" - targetNamespace: "msgraph.generated" - customArguments: "-b -e '/me' -e '/me/**'" # Enable backing store, Exclude me - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - commitMessagePrefix: "feat(generation): update request builders and models" - languageSpecificSteps: - - template: generation-templates/python.yml + language: 'typescript' + version: 'beta' + repoName: 'msgraph-beta-sdk-typescript' + baseBranchName: 'main' + branchName: $(betaBranch) + commitMessagePrefix: "feat(generation): update request builders and models" + targetClassName: "GraphBetaBaseServiceClient" + targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/" + customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + languageSpecificSteps: + - template: generation-templates/typescript-sdk.yml + parameters: + repoName: msgraph-beta-sdk-typescript + packageName: '@microsoft/msgraph-beta-sdk' + + - stage: stage_python_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: python_v1 + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-sdk-python - baseDirectory: msgraph - -- stage: stage_python_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: python_beta - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'python' - version: 'beta' - repoName: 'msgraph-beta-sdk-python' - branchName: $(betaBranch) - targetClassName: "BaseGraphServiceClient" - targetNamespace: "msgraph_beta.generated" - customArguments: "-b -e '/me' -e '/me/**'" # Enable backing store, Exclude me - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - commitMessagePrefix: "feat(generation): update request builders and models" - languageSpecificSteps: - - template: generation-templates/python.yml + language: 'python' + version: '' + repoName: 'msgraph-sdk-python' + branchName: $(v1Branch) + targetClassName: "BaseGraphServiceClient" + targetNamespace: "msgraph.generated" + customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + commitMessagePrefix: "feat(generation): update request builders and models" + languageSpecificSteps: + - template: generation-templates/python.yml + parameters: + repoName: msgraph-sdk-python + baseDirectory: msgraph + - stage: stage_python_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: python_beta + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-python - baseDirectory: msgraph_beta - -- stage: stage_ccs_csharp_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: csharp_beta_ccs - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'csharp' - version: 'beta' - orgName: 'microsoft' - repoName: 'Agents-M365Copilot' - baseBranchName : 'main' - branchName: 'ccs-dotnet/$(betaBranch)' - targetClassName: "BaseAgentsM365CopilotBetaServiceClient" - targetNamespace: "Microsoft.Agents.M365Copilot.Beta" - commitMessagePrefix: "feat(generation): update request builders and models for dotnet beta" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - pathExclusionArguments: '' - languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + language: 'python' + version: 'beta' + repoName: 'msgraph-beta-sdk-python' + branchName: $(betaBranch) + targetClassName: "BaseGraphServiceClient" + targetNamespace: "msgraph_beta.generated" + customArguments: "-b -e '/me' -e '/me/**'" + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + commitMessagePrefix: "feat(generation): update request builders and models" + languageSpecificSteps: + - template: generation-templates/python.yml + parameters: + repoName: msgraph-beta-sdk-python + baseDirectory: msgraph_beta + - stage: stage_ccs_csharp_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_beta_ccs + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: 'Agents-M365Copilot/dotnet' - packageName: Microsoft.Agents.M365Copilot.Beta - -- stage: stage_ccs_python_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: python_beta_ccs - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'python' - version: 'beta' - orgName: 'microsoft' - repoName: 'Agents-M365Copilot' - baseBranchName : 'main' - branchName: 'ccs-python/$(betaBranch)' - targetClassName: "BaseAgentsM365CopilotBetaServiceClient" - targetNamespace: "microsoft_agents_m365copilot_beta.generated" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - commitMessagePrefix: "feat(generation): update request builders and models for python beta" - pathExclusionArguments: '' - languageSpecificSteps: - - template: generation-templates/python.yml + language: 'csharp' + version: 'beta' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-dotnet/$(betaBranch)' + targetClassName: "BaseAgentsM365CopilotBetaServiceClient" + targetNamespace: "Microsoft.Agents.M365Copilot.Beta" + commitMessagePrefix: "feat(generation): update request builders and models for dotnet beta" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + pathExclusionArguments: '' + languageSpecificSteps: + - template: generation-templates/dotnet-kiota.yml + parameters: + repoName: 'Agents-M365Copilot/dotnet' + packageName: Microsoft.Agents.M365Copilot.Beta + - stage: stage_ccs_python_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: python_beta_ccs + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: 'Agents-M365Copilot/python/packages' - baseDirectory: microsoft_agents_m365copilot_beta - -- stage: stage_ccs_typescript_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_beta_ccs - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'typescript' - version: 'beta' - orgName: 'microsoft' - repoName: 'Agents-M365Copilot' - baseBranchName : 'main' - branchName: 'ccs-typescript/$(betaBranch)' - commitMessagePrefix: "feat(generation): update request builders and models for typescript beta" - targetClassName: "BaseAgentsM365CopilotBetaServiceClient" - targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - pathExclusionArguments: '' - languageSpecificSteps: - - template: generation-templates/ccs-typescript-sdk.yml + language: 'python' + version: 'beta' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-python/$(betaBranch)' + targetClassName: "BaseAgentsM365CopilotBetaServiceClient" + targetNamespace: "microsoft_agents_m365copilot_beta.generated" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + commitMessagePrefix: "feat(generation): update request builders and models for python beta" + pathExclusionArguments: '' + languageSpecificSteps: + - template: generation-templates/python.yml + parameters: + repoName: 'Agents-M365Copilot/python/packages' + baseDirectory: microsoft_agents_m365copilot_beta + - stage: stage_ccs_typescript_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_beta_ccs + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: ${{ parameters.cleanMetadataFolder }} + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(Build.SourcesDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: 'Agents-M365Copilot/typescript' - packageName: '@microsoft/agents-m365copilot-beta' + language: 'typescript' + version: 'beta' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-typescript/$(betaBranch)' + commitMessagePrefix: "feat(generation): update request builders and models for typescript beta" + targetClassName: "BaseAgentsM365CopilotBetaServiceClient" + targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" + customArguments: "-b -i '**/copilot/**'" + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + pathExclusionArguments: '' + languageSpecificSteps: + - template: generation-templates/ccs-typescript-sdk.yml + parameters: + repoName: 'Agents-M365Copilot/typescript' + packageName: '@microsoft/agents-m365copilot-beta' \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 3cbf74aad..ae4886e92 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,5 +1,5 @@ steps: -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: "9.x" #kiota uses a net9 target @@ -15,9 +15,4 @@ steps: sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net9.0' contents: '**/*' targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy Kiota executable - -- task: PublishBuildArtifacts@1 - inputs: - pathToPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: kiota + displayName: Copy Kiota executable \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/build-and-publish-typewriter.yml b/.azure-pipelines/generation-templates/build-and-publish-typewriter.yml index f18ddb91d..c97daff63 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-typewriter.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-typewriter.yml @@ -1,6 +1,5 @@ steps: -- template: use-dotnet-sdk.yml - +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self - checkout: self displayName: checkout generator fetchDepth: 1 @@ -15,9 +14,4 @@ steps: sourceFolder: '$(Build.SourcesDirectory)/src/Typewriter/bin/$(BuildConfiguration)/net8.0' contents: '**/*' targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy Typewriter executable - -- task: PublishBuildArtifacts@1 - inputs: - pathToPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: typewriter + displayName: Copy Typewriter executable \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/capture-metadata.yml b/.azure-pipelines/generation-templates/capture-metadata.yml index 546761ae4..96637da28 100644 --- a/.azure-pipelines/generation-templates/capture-metadata.yml +++ b/.azure-pipelines/generation-templates/capture-metadata.yml @@ -45,8 +45,8 @@ steps: fetchDepth: 1 persistCredentials: true -- template: checkout-metadata.yml -- template: set-user-config.yml +- template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self +- template: /.azure-pipelines/generation-templates/set-user-config.yml@self # required for TypeSpec - task: UseNode@1 @@ -76,14 +76,10 @@ steps: inputMetadataFile: ${{ parameters.inputMetadata }} enabled: true -- template: download-typewriter.yml - # required for typewriter -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '8.x' - -## Only run if the previous step was successful - pwsh: '$(scriptsDirectory)/run-typewriter-clean-metadata.ps1' env: OutputPath: ${{ parameters.outputPath }} @@ -153,20 +149,11 @@ steps: contents: '**/*' targetFolder: '$(Build.ArtifactStagingDirectory)' displayName: Copy generated metadata - -- task: PublishBuildArtifacts@1 - inputs: - pathToPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: ${{ parameters.cleanMetadataFolder }} - -# Use the clean metadata from the last step to generate DotNet files. - -# required for the hidi installation validation -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '9.x' -- pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 +- pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 displayName: 'Install hidi tool' # verify that generated metadata is parsable as an Edm model diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 2a08868ca..f768ca314 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -1,9 +1,3 @@ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# contains an end to end validation pipeline using C# compilation tests for staging beta metadata - -# capture-metadata.yml will result in the capture and cleaning of the metadata -# with the artifacts posted to GitHub. - parameters: - name: 'endpoint' type: string @@ -13,7 +7,6 @@ parameters: default: $(System.ArtifactsDirectory) - name: 'cleanMetadataFolder' type: string - jobs: - job: get_conversion_settings displayName: "Get conversion settings" @@ -23,8 +16,7 @@ jobs: fetchDepth: 1 persistCredentials: true - - template: checkout-metadata.yml - + - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self - pwsh: | $dirPath = "./conversion-settings" $endpoint = "${{ parameters.endpoint }}" @@ -41,10 +33,8 @@ jobs: Write-Host "##vso[task.setvariable variable=targets;isOutput=true]$json" name: setTargets workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata - - script: echo $(setTargets.targets) displayName: "Print settings" - - job: convert_openapi dependsOn: get_conversion_settings displayName: Convert @@ -52,27 +42,30 @@ jobs: matrix: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] variables: targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] - + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: ${{ parameters.cleanMetadataFolder }} steps: - # We only need the scripts - checkout: self displayName: checkout generator fetchDepth: 1 persistCredentials: true - - template: checkout-metadata.yml + - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self # required for the hidi to run - - template: use-dotnet-sdk.yml + - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '8.x' - # required for the hidi installation validation - - template: use-dotnet-sdk.yml +# required for the hidi installation validation + - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '9.x' - - pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 + - pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 displayName: install hidi - pwsh: | @@ -92,12 +85,6 @@ jobs: contents: '**/$(Name).yaml' targetFolder: '$(Build.ArtifactStagingDirectory)' displayName: Copy generated metadata - - - task: PublishBuildArtifacts@1 - inputs: - pathToPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: ${{ parameters.cleanMetadataFolder }} - - pwsh: | ./scripts/run-openapi-validation.ps1 -repoDirectory (Get-Location).Path -version "${{ parameters.endpoint }}" -platformName "$(Name)" displayName: ensure that OpenAPI docs can be parsed @@ -107,21 +94,19 @@ jobs: - job: publish_openapi dependsOn: convert_openapi displayName: Publish + templateContext: + inputs: + - input: pipelineArtifact + targetPath: $(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }} + artifactName: ${{ parameters.cleanMetadataFolder }} steps: # We only need the scripts - checkout: self displayName: checkout generator fetchDepth: 1 persistCredentials: true - - - template: checkout-metadata.yml - - template: set-user-config.yml - - task: DownloadPipelineArtifact@2 - inputs: - path: $(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }} - artifact: ${{ parameters.cleanMetadataFolder }} - - # Checkin clean metadata into metadata repo or make it an artifact. + - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self + - template: /.azure-pipelines/generation-templates/set-user-config.yml@self - pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1' displayName: push clean ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo diff --git a/.azure-pipelines/generation-templates/download-kiota.yml b/.azure-pipelines/generation-templates/download-kiota.yml index 3e34b4e87..3ec33e096 100644 --- a/.azure-pipelines/generation-templates/download-kiota.yml +++ b/.azure-pipelines/generation-templates/download-kiota.yml @@ -1,9 +1,5 @@ +# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. +# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. +# The 'DownloadBuildArtifacts@0' tasks have been converted to inputs within the `templateContext` section of each job. steps: -- task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'kiota' - downloadPath: '$(Build.SourcesDirectory)' - -- bash: chmod +x $(Build.SourcesDirectory)/kiota/kiota +- bash: chmod +x $(Build.SourcesDirectory)/kiota/kiota \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/download-typewriter.yml b/.azure-pipelines/generation-templates/download-typewriter.yml index 3e7960ab3..05e32557c 100644 --- a/.azure-pipelines/generation-templates/download-typewriter.yml +++ b/.azure-pipelines/generation-templates/download-typewriter.yml @@ -1,7 +1,4 @@ -steps: -- task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'typewriter' - downloadPath: '$(Build.SourcesDirectory)' +# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. +# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. +# The 'DownloadBuildArtifacts@0' tasks have been converted to inputs within the `templateContext` section of each job. +steps: [] \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index 2e1ec30ad..105bc6a85 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -57,11 +57,9 @@ parameters: default: "-e '/copilot' -e '/copilot/**'" steps: -- template: set-up-for-generation-kiota.yml +- template: /.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml@self parameters: cleanMetadataFolder: ${{ parameters.cleanMetadataFolder }} - downloadSteps: - - template: download-kiota.yml - checkout: ${{ parameters.repoName }} displayName: 'checkout ${{ parameters.repoName }}' diff --git a/.azure-pipelines/generation-templates/language-generation.yml b/.azure-pipelines/generation-templates/language-generation.yml index 0d7aa4757..f172dd678 100644 --- a/.azure-pipelines/generation-templates/language-generation.yml +++ b/.azure-pipelines/generation-templates/language-generation.yml @@ -34,12 +34,9 @@ parameters: displayName: Generate PR after publish changes? steps: -- template: set-up-for-generation.yml +- template: /.azure-pipelines/generation-templates/set-up-for-generation.yml@self parameters: cleanMetadataFolder: ${{ parameters.cleanMetadataFolder }} - downloadSteps: - - template: download-typewriter.yml - - checkout: ${{ parameters.repoName }} displayName: 'checkout ${{ parameters.repoName }}' fetchDepth: 1 @@ -67,7 +64,7 @@ steps: TypewriterExecutable: $(typewriterExecutable) TypewriterDirectory: $(typewriterDirectory) Language: ${{ parameters.language }} - Endpoint: ${{ parameters.version }} + Endpoint: ${{ parameters.version }} displayName: 'Run Typewriter for ${{ parameters.language }} ${{ parameters.version }}' - ${{ parameters.languageSpecificSteps }} diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml index 62b8eb9e5..5b2050d06 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml @@ -1,20 +1,13 @@ parameters: - - name: cleanMetadataFolder - type: string - - name: downloadSteps - type: stepList - default: - - pwsh: | - Write-Error "No download step is provided" +- name: cleanMetadataFolder + type: string steps: -- template: set-user-config.yml -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/set-user-config.yml@self +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: "9.x" #kiota uses a net9 target -- ${{ parameters.downloadSteps }} - # checkout metadata repo if capture and clean step is skipped - checkout: msgraph-metadata displayName: checkout metadata @@ -30,16 +23,3 @@ steps: Move-Item -Path $(Build.SourcesDirectory)/msgraph-metadata/openapi/beta/openapi.yaml -Destination $(Build.SourcesDirectory)/msgraph-metadata/clean_beta_openapi/ displayName: Move metadata to expected location condition: or(eq(variables.skipMetadataCaptureAndClean, true), eq(variables.skipOpenApiCaptureAndClean, true)) - -# if capture and clean step is not skipped -# then download the artifact from capture and clean steps -# follow the same folder structure as msgraph-metadata repo -# so that metadata reference path is always the same -- task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: ${{ parameters.cleanMetadataFolder }} - downloadPath: '$(Build.SourcesDirectory)/msgraph-metadata' - condition: and(eq(variables.skipMetadataCaptureAndClean, false), eq(variables.skipOpenApiCaptureAndClean, false)) - displayName: Downloading metadata from artifacts diff --git a/.azure-pipelines/generation-templates/set-up-for-generation.yml b/.azure-pipelines/generation-templates/set-up-for-generation.yml index 0cfc4daec..819b6373c 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation.yml @@ -1,15 +1,10 @@ parameters: - name: cleanMetadataFolder type: string - - name: downloadSteps - type: stepList - default: - - pwsh: | - Write-Error "No download step is provided" steps: -- template: set-user-config.yml -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/set-user-config.yml@self +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self - ${{ parameters.downloadSteps }} # checkout metadata repo if capture and clean step is skipped @@ -19,16 +14,3 @@ steps: persistCredentials: true submodules: recursive condition: or(eq(variables.skipMetadataCaptureAndClean, true), eq(variables.skipOpenApiCaptureAndClean, true)) - -# if capture and clean step is not skipped -# then download the artifact from capture and clean steps -# follow the same folder structure as msgraph-metadata repo -# so that metadata reference path is always the same -- task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: ${{ parameters.cleanMetadataFolder }} - downloadPath: '$(Build.SourcesDirectory)/msgraph-metadata' - condition: and(eq(variables.skipMetadataCaptureAndClean, false), eq(variables.skipOpenApiCaptureAndClean, false)) - displayName: Downloading metadata from artifacts From 6a38ff3cab92b7ec6a12e2c4be4518a8dc87dae1 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 11:36:49 -0600 Subject: [PATCH 02/75] fixing param issue --- .azure-pipelines/generation-pipeline.yml | 38 ++++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 07a128b3d..f3ff21978 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -200,7 +200,7 @@ extends: outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanMetadataFolderV1) inputs: - input: pipelineArtifact buildType: 'current' @@ -229,7 +229,7 @@ extends: outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanMetadataFolderBeta) inputs: - input: pipelineArtifact buildType: 'current' @@ -283,7 +283,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderV1) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -324,7 +324,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -365,7 +365,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderV1) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -404,7 +404,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -443,7 +443,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderV1) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -484,7 +484,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -525,7 +525,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -566,7 +566,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderV1) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -611,7 +611,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanMetadataFolderV1) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' steps: - template: /.azure-pipelines/generation-templates/language-generation.yml@self @@ -648,7 +648,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanMetadataFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' steps: - template: /.azure-pipelines/generation-templates/language-generation.yml@self @@ -681,7 +681,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderV1) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -723,7 +723,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -765,7 +765,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderV1) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -805,7 +805,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -845,7 +845,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -888,7 +888,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' @@ -931,7 +931,7 @@ extends: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: ${{ parameters.cleanMetadataFolder }} + artifactName: $(cleanOpenAPIFolderBeta) targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' - input: pipelineArtifact buildType: 'current' From 76eb499e27786660d834c5898de1b3aafdcbf89e Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 11:38:39 -0600 Subject: [PATCH 03/75] adding missing repo --- .azure-pipelines/generation-pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index f3ff21978..8e3033cf8 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -100,6 +100,10 @@ resources: type: github endpoint: microsoftkiota name: microsoft/Agents-M365Copilot + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release parameters: - name: v1BranchPrefix default: v1.0/pipelinebuild From a840a035b425b2de164a005431a533fc017419bb Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 12:03:34 -0600 Subject: [PATCH 04/75] Fix template issues --- .azure-pipelines/generation-pipeline.yml | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 8e3033cf8..e3d25d505 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -307,7 +307,7 @@ extends: customArguments: "-b" # Enable the backing store cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + - template: /.azure-pipelines/generation-templates/generation-templates/dotnet-kiota.yml@self parameters: repoName: msgraph-sdk-dotnet @@ -348,7 +348,7 @@ extends: customArguments: "-b" # Enable the backing store cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self parameters: repoName: msgraph-beta-sdk-dotnet @@ -388,7 +388,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - - template: generation-templates/go.yml + - template: /.azure-pipelines/generation-templates/go.yml@self parameters: repoName: msgraph-sdk-go - stage: stage_go_beta @@ -427,7 +427,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - - template: generation-templates/go.yml + - template: /.azure-pipelines/generation-templates/go.yml@self parameters: repoName: msgraph-beta-sdk-go - stage: stage_java_v1_kiota @@ -467,7 +467,7 @@ extends: customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store commitMessagePrefix: "feat(generation): update request builders and models" languageSpecificSteps: - - template: generation-templates/java-kiota.yml + - template: /.azure-pipelines/generation-templates/java-kiota.yml@self parameters: repoName: msgraph-sdk-java namespacePath: com/microsoft/graph @@ -508,7 +508,7 @@ extends: customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store commitMessagePrefix: "feat(generation): update request builders and models" languageSpecificSteps: - - template: generation-templates/java-kiota.yml + - template: /.azure-pipelines/generation-templates/java-kiota.yml@self parameters: repoName: msgraph-beta-sdk-java namespacePath: com/microsoft/graph/beta @@ -548,7 +548,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - - template: generation-templates/php-kiota.yml + - template: /.azure-pipelines/generation-templates/php-kiota.yml@self parameters: repoName: msgraph-beta-sdk-php customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store @@ -589,7 +589,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - - template: generation-templates/php-kiota.yml + - template: /.azure-pipelines/generation-templates/php-kiota.yml@self parameters: repoName: msgraph-sdk-php customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store @@ -627,7 +627,7 @@ extends: cleanMetadataFile: $(cleanMetadataFileV1) cleanMetadataFolder: $(cleanMetadataFolderV1) languageSpecificSteps: - - template: generation-templates/typescript.yml + - template: /.azure-pipelines/generation-templates/typescript.yml@self parameters: repoName: 'msgraph-typescript-typings' @@ -664,7 +664,7 @@ extends: cleanMetadataFile: $(cleanMetadataFileBeta) cleanMetadataFolder: $(cleanMetadataFolderBeta) languageSpecificSteps: - - template: generation-templates/typescript.yml + - template: /.azure-pipelines/generation-templates/typescript.yml@self parameters: repoName: 'msgraph-beta-typescript-typings' @@ -705,7 +705,7 @@ extends: customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - - template: generation-templates/typescript-sdk.yml + - template: /.azure-pipelines/generation-templates/typescript-sdk.yml@self parameters: repoName: msgraph-sdk-typescript packageName: '@microsoft/msgraph-sdk' @@ -747,7 +747,7 @@ extends: customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - - template: generation-templates/typescript-sdk.yml + - template: /.azure-pipelines/generation-templates/typescript-sdk.yml@self parameters: repoName: msgraph-beta-sdk-typescript packageName: '@microsoft/msgraph-beta-sdk' @@ -788,7 +788,7 @@ extends: cleanMetadataFolder: $(cleanOpenAPIFolderV1) commitMessagePrefix: "feat(generation): update request builders and models" languageSpecificSteps: - - template: generation-templates/python.yml + - template: /.azure-pipelines/generation-templates/python.yml@self parameters: repoName: msgraph-sdk-python baseDirectory: msgraph @@ -828,7 +828,7 @@ extends: cleanMetadataFolder: $(cleanOpenAPIFolderBeta) commitMessagePrefix: "feat(generation): update request builders and models" languageSpecificSteps: - - template: generation-templates/python.yml + - template: /.azure-pipelines/generation-templates/python.yml@self parameters: repoName: msgraph-beta-sdk-python baseDirectory: msgraph_beta @@ -871,7 +871,7 @@ extends: cleanMetadataFolder: $(cleanOpenAPIFolderBeta) pathExclusionArguments: '' languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self parameters: repoName: 'Agents-M365Copilot/dotnet' packageName: Microsoft.Agents.M365Copilot.Beta @@ -914,7 +914,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models for python beta" pathExclusionArguments: '' languageSpecificSteps: - - template: generation-templates/python.yml + - template: /.azure-pipelines/generation-templates/python.yml@self parameters: repoName: 'Agents-M365Copilot/python/packages' baseDirectory: microsoft_agents_m365copilot_beta @@ -957,7 +957,7 @@ extends: cleanMetadataFolder: $(cleanOpenAPIFolderBeta) pathExclusionArguments: '' languageSpecificSteps: - - template: generation-templates/ccs-typescript-sdk.yml + - template: /.azure-pipelines/generation-templates/ccs-typescript-sdk.yml@self parameters: repoName: 'Agents-M365Copilot/typescript' packageName: '@microsoft/agents-m365copilot-beta' \ No newline at end of file From e8f6bc3b46e14af01d2c37130a92d953ebf047fe Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 12:59:31 -0600 Subject: [PATCH 05/75] duplication error --- .azure-pipelines/generation-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index e3d25d505..c0f0b5c7d 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -307,7 +307,7 @@ extends: customArguments: "-b" # Enable the backing store cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - - template: /.azure-pipelines/generation-templates/generation-templates/dotnet-kiota.yml@self + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self parameters: repoName: msgraph-sdk-dotnet From 48aa66c263711310da1f5a467d9ba64b82f05936 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 13:00:37 -0600 Subject: [PATCH 06/75] removing download steps --- .azure-pipelines/generation-templates/set-up-for-generation.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azure-pipelines/generation-templates/set-up-for-generation.yml b/.azure-pipelines/generation-templates/set-up-for-generation.yml index 819b6373c..4536f99c3 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation.yml @@ -5,7 +5,6 @@ parameters: steps: - template: /.azure-pipelines/generation-templates/set-user-config.yml@self - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self -- ${{ parameters.downloadSteps }} # checkout metadata repo if capture and clean step is skipped - checkout: msgraph-metadata From 4f2b968a57ea037484b67dd0a12c1ca30864cdf1 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 13:35:29 -0600 Subject: [PATCH 07/75] sdl analysis --- .azure-pipelines/generation-pipeline.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index c0f0b5c7d..3094f4e06 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -163,6 +163,29 @@ variables: extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: + sdl: + sourceRepositoriesToScan: + include: + - repository: msgraph-sdk-dotnet + - repository: msgraph-beta-sdk-dotnet + - repository: msgraph-sdk-php + - repository: msgraph-beta-sdk-php + - repository: msgraph-typescript-typings + - repository: msgraph-beta-typescript-typings + - repository: msgraph-sdk-java + - repository: msgraph-beta-sdk-java + - repository: msgraph-sdk-go + - repository: msgraph-beta-sdk-go + - repository: msgraph-sdk-typescript + - repository: msgraph-beta-sdk-typescript + - repository: msgraph-sdk-python + - repository: msgraph-beta-sdk-python + - repository: msgraph-metadata + - repository: microsoft-graph-docs + - repository: kiota + - repository: Agents-M365Copilot + exclude: + - repository: 1ESPipelineTemplates pool: name: Azure-Pipelines-1ESPT-ExDShared vmImage: ubuntu-latest From 4dec85443023b610a2d09a30b895ef668f50e0c0 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 13:50:36 -0600 Subject: [PATCH 08/75] excluding repos --- .azure-pipelines/generation-pipeline.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 3094f4e06..66caa033e 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -165,7 +165,7 @@ extends: parameters: sdl: sourceRepositoriesToScan: - include: + exclude: - repository: msgraph-sdk-dotnet - repository: msgraph-beta-sdk-dotnet - repository: msgraph-sdk-php @@ -183,8 +183,7 @@ extends: - repository: msgraph-metadata - repository: microsoft-graph-docs - repository: kiota - - repository: Agents-M365Copilot - exclude: + - repository: Agents-M365Copilot - repository: 1ESPipelineTemplates pool: name: Azure-Pipelines-1ESPT-ExDShared From 06344f797e77e3ce355bd9ce0fa9b6df35857ddc Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 14:11:55 -0600 Subject: [PATCH 09/75] changing typewriter targetPath --- .azure-pipelines/generation-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 66caa033e..1a9077c77 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -231,7 +231,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'typewriter' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(Build.ArtifactStagingDirectory)' steps: - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self parameters: @@ -260,7 +260,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'typewriter' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(Build.ArtifactStagingDirectory)' steps: - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self parameters: From 439329f7f0f49cbebda7d8911b52c97f670d11f8 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 14:37:14 -0600 Subject: [PATCH 10/75] changing download path --- .azure-pipelines/generation-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 1a9077c77..66caa033e 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -231,7 +231,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'typewriter' - targetPath: '$(Build.ArtifactStagingDirectory)' + targetPath: '$(Build.SourcesDirectory)' steps: - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self parameters: @@ -260,7 +260,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'typewriter' - targetPath: '$(Build.ArtifactStagingDirectory)' + targetPath: '$(Build.SourcesDirectory)' steps: - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self parameters: From 385f2027876a389cb82719269a477dc33f641d92 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 15:01:01 -0600 Subject: [PATCH 11/75] adding typewriter to the target path --- .azure-pipelines/generation-pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 66caa033e..7599cff59 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -231,7 +231,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'typewriter' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(Build.SourcesDirectory)/typewriter' steps: - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self parameters: @@ -260,7 +260,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'typewriter' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(Build.SourcesDirectory)/typewriter' steps: - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self parameters: @@ -633,7 +633,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'typewriter' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(Build.SourcesDirectory)/typewriter' - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' @@ -670,7 +670,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'typewriter' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(Build.SourcesDirectory)/typewriter' - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' From 19c7918613d4783d85ab00112e6caca441d41d78 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 16:31:22 -0600 Subject: [PATCH 12/75] Fixing openAPI outputPath --- .azure-pipelines/generation-templates/capture-openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index f768ca314..574d62443 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -45,7 +45,7 @@ jobs: templateContext: outputs: - output: pipelineArtifact - targetPath: '$(Build.ArtifactStagingDirectory)' + targetPath: '$(outputPath)' artifactName: ${{ parameters.cleanMetadataFolder }} steps: - checkout: self From 442179ec8ed85c251452f2721321e5d5a7256bbb Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 09:41:06 -0600 Subject: [PATCH 13/75] fixing output path --- .azure-pipelines/generation-templates/capture-openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 574d62443..d586d00e4 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -45,7 +45,7 @@ jobs: templateContext: outputs: - output: pipelineArtifact - targetPath: '$(outputPath)' + targetPath: '${{ parameters.outputPath }}' artifactName: ${{ parameters.cleanMetadataFolder }} steps: - checkout: self From ef19de1cf21701f56fcafa1586beb2dcb6953350 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 11:10:01 -0600 Subject: [PATCH 14/75] test run --- .../generation-templates/capture-openapi.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index d586d00e4..61874f754 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -42,11 +42,6 @@ jobs: matrix: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] variables: targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] - templateContext: - outputs: - - output: pipelineArtifact - targetPath: '${{ parameters.outputPath }}' - artifactName: ${{ parameters.cleanMetadataFolder }} steps: - checkout: self displayName: checkout generator @@ -95,9 +90,9 @@ jobs: dependsOn: convert_openapi displayName: Publish templateContext: - inputs: - - input: pipelineArtifact - targetPath: $(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }} + outputs: + - output: pipelineArtifact + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}' artifactName: ${{ parameters.cleanMetadataFolder }} steps: # We only need the scripts From d742363b6fa155d4de7bdfdf09203e5c40671025 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 11:16:57 -0600 Subject: [PATCH 15/75] changing target path --- .../generation-templates/capture-openapi.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 61874f754..f768ca314 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -42,6 +42,11 @@ jobs: matrix: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] variables: targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: ${{ parameters.cleanMetadataFolder }} steps: - checkout: self displayName: checkout generator @@ -90,9 +95,9 @@ jobs: dependsOn: convert_openapi displayName: Publish templateContext: - outputs: - - output: pipelineArtifact - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}' + inputs: + - input: pipelineArtifact + targetPath: $(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }} artifactName: ${{ parameters.cleanMetadataFolder }} steps: # We only need the scripts From 6a77e4b79535f735ca4016d47b412f552588f23d Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 12:11:23 -0600 Subject: [PATCH 16/75] testing change --- .../generation-templates/capture-openapi.yml | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index f768ca314..90abf3143 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -42,11 +42,6 @@ jobs: matrix: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] variables: targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] - templateContext: - outputs: - - output: pipelineArtifact - targetPath: '$(Build.ArtifactStagingDirectory)' - artifactName: ${{ parameters.cleanMetadataFolder }} steps: - checkout: self displayName: checkout generator @@ -78,13 +73,6 @@ jobs: displayName: 'update ${{ parameters.endpoint }} open API description' workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata - # publish metadata as an artifact - - task: CopyFiles@2 - inputs: - sourceFolder: ${{ parameters.outputPath }} - contents: '**/$(Name).yaml' - targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy generated metadata - pwsh: | ./scripts/run-openapi-validation.ps1 -repoDirectory (Get-Location).Path -version "${{ parameters.endpoint }}" -platformName "$(Name)" displayName: ensure that OpenAPI docs can be parsed @@ -95,11 +83,18 @@ jobs: dependsOn: convert_openapi displayName: Publish templateContext: - inputs: - - input: pipelineArtifact - targetPath: $(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }} + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' artifactName: ${{ parameters.cleanMetadataFolder }} steps: + # publish metadata as an artifact + - task: CopyFiles@2 + inputs: + sourceFolder: ${{ parameters.outputPath }} + contents: '**/*.yaml' + targetFolder: '$(Build.ArtifactStagingDirectory)' + displayName: Copy generated metadata # We only need the scripts - checkout: self displayName: checkout generator From 1d9f19709eda21649863f886c9a0a6a3c4e0ec08 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 13:45:25 -0600 Subject: [PATCH 17/75] multiple artifacts --- .../generation-templates/capture-openapi.yml | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 90abf3143..704f1fa2c 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -42,6 +42,11 @@ jobs: matrix: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] variables: targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: '${{ parameters.cleanMetadataFolder }}-$(Name)' steps: - checkout: self displayName: checkout generator @@ -73,6 +78,13 @@ jobs: displayName: 'update ${{ parameters.endpoint }} open API description' workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata + # publish metadata as an artifact + - task: CopyFiles@2 + inputs: + sourceFolder: ${{ parameters.outputPath }} + contents: '**/$(Name).yaml' + targetFolder: '$(Build.ArtifactStagingDirectory)' + displayName: Copy generated metadata - pwsh: | ./scripts/run-openapi-validation.ps1 -repoDirectory (Get-Location).Path -version "${{ parameters.endpoint }}" -platformName "$(Name)" displayName: ensure that OpenAPI docs can be parsed @@ -83,23 +95,28 @@ jobs: dependsOn: convert_openapi displayName: Publish templateContext: + inputs: + # Download all artifacts from matrix jobs + - input: pipelineArtifact + patterns: '${{ parameters.cleanMetadataFolder }}-*' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}' outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' artifactName: ${{ parameters.cleanMetadataFolder }} steps: - # publish metadata as an artifact - - task: CopyFiles@2 - inputs: - sourceFolder: ${{ parameters.outputPath }} - contents: '**/*.yaml' - targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy generated metadata # We only need the scripts - checkout: self displayName: checkout generator fetchDepth: 1 persistCredentials: true + # publish metadata as an artifact + - task: CopyFiles@2 + inputs: + sourceFolder: ${{ parameters.outputPath }} + contents: '**/*.yaml' + targetFolder: '$(Build.ArtifactStagingDirectory)' + displayName: Copy downloaded metadata - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self - template: /.azure-pipelines/generation-templates/set-user-config.yml@self - pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1' From e8619872177b4105908a00228aedb9d30e10c778 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 14:02:08 -0600 Subject: [PATCH 18/75] testing copy files --- .../generation-templates/capture-openapi.yml | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 704f1fa2c..26a78d254 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -45,7 +45,7 @@ jobs: templateContext: outputs: - output: pipelineArtifact - targetPath: '$(Build.ArtifactStagingDirectory)' + targetPath: '$(Build.ArtifactStagingDirectory)/$(Name)' artifactName: '${{ parameters.cleanMetadataFolder }}-$(Name)' steps: - checkout: self @@ -95,14 +95,9 @@ jobs: dependsOn: convert_openapi displayName: Publish templateContext: - inputs: - # Download all artifacts from matrix jobs - - input: pipelineArtifact - patterns: '${{ parameters.cleanMetadataFolder }}-*' - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}' outputs: - output: pipelineArtifact - targetPath: '$(Build.ArtifactStagingDirectory)' + targetPath: '$(Build.ArtifactStagingDirectory)/publish' artifactName: ${{ parameters.cleanMetadataFolder }} steps: # We only need the scripts @@ -110,6 +105,21 @@ jobs: displayName: checkout generator fetchDepth: 1 persistCredentials: true + # Copy files from the maxtrix artifacts to a single folder + - task: CopyFiles@2 + inputs: + sourceFolder: '$(Build.ArtifactStagingDirectory)' + contents: '**/*.yaml' + targetFolder: '$(Build.ArtifactStagingDirectory)/publish' + displayName: Copy artifact metadata + # Copy files from the target path where artifacts should be downloaded + - task: CopyFiles@2 + inputs: + sourceFolder: '$(Build.ArtifactStagingDirectory)/publish' + contents: '**/*.yaml' + targetFolder: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}' + displayName: Copy downloaded metadata + # publish metadata as an artifact - task: CopyFiles@2 inputs: From fb9fc16a06551a3cea36bd129aaee1866b71b1bf Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 14:19:43 -0600 Subject: [PATCH 19/75] hardcoding downloaded artifacts --- .../generation-templates/capture-openapi.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 26a78d254..aa1e2d083 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -95,6 +95,19 @@ jobs: dependsOn: convert_openapi displayName: Publish templateContext: + inputs: + - input: pipelineArtifact + artifactName: '${{ parameters.cleanMetadataFolder }}-default' + targetPath: '$(Build.SourcesDirectory)/artifacts' + - input: pipelineArtifact + artifactName: '${{ parameters.cleanMetadataFolder }}-graphexplorer' + targetPath: '$(Build.SourcesDirectory)/artifacts' + - input: pipelineArtifact + artifactName: '${{ parameters.cleanMetadataFolder }}-openapi' + targetPath: '$(Build.SourcesDirectory)/artifacts' + - input: pipelineArtifact + artifactName: '${{ parameters.cleanMetadataFolder }}-powershell_v2' + targetPath: '$(Build.SourcesDirectory)/artifacts' outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)/publish' @@ -108,7 +121,7 @@ jobs: # Copy files from the maxtrix artifacts to a single folder - task: CopyFiles@2 inputs: - sourceFolder: '$(Build.ArtifactStagingDirectory)' + sourceFolder: '$(Build.ArtifactStagingDirectory)/artifacts' contents: '**/*.yaml' targetFolder: '$(Build.ArtifactStagingDirectory)/publish' displayName: Copy artifact metadata From de66bbb8672def82d7a013dd55f57b34d607f30b Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 15:00:19 -0600 Subject: [PATCH 20/75] testing copy files --- .azure-pipelines/generation-templates/capture-openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index aa1e2d083..b5bf5a472 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -83,7 +83,7 @@ jobs: inputs: sourceFolder: ${{ parameters.outputPath }} contents: '**/$(Name).yaml' - targetFolder: '$(Build.ArtifactStagingDirectory)' + targetFolder: '$(Build.ArtifactStagingDirectory)/$(Name)' displayName: Copy generated metadata - pwsh: | ./scripts/run-openapi-validation.ps1 -repoDirectory (Get-Location).Path -version "${{ parameters.endpoint }}" -platformName "$(Name)" From c847a02bbef4a9a3e4b5e25010d6ab16483be9fd Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 8 Aug 2025 15:56:20 -0600 Subject: [PATCH 21/75] Fixing copy files --- .azure-pipelines/generation-templates/capture-openapi.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index b5bf5a472..0a7233ede 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -110,7 +110,7 @@ jobs: targetPath: '$(Build.SourcesDirectory)/artifacts' outputs: - output: pipelineArtifact - targetPath: '$(Build.ArtifactStagingDirectory)/publish' + targetPath: '$(Build.ArtifactStagingDirectory)' artifactName: ${{ parameters.cleanMetadataFolder }} steps: # We only need the scripts @@ -121,14 +121,14 @@ jobs: # Copy files from the maxtrix artifacts to a single folder - task: CopyFiles@2 inputs: - sourceFolder: '$(Build.ArtifactStagingDirectory)/artifacts' + sourceFolder: '$(Build.SourcesDirectory)/artifacts' contents: '**/*.yaml' - targetFolder: '$(Build.ArtifactStagingDirectory)/publish' + targetFolder: '$(Build.ArtifactStagingDirectory)' displayName: Copy artifact metadata # Copy files from the target path where artifacts should be downloaded - task: CopyFiles@2 inputs: - sourceFolder: '$(Build.ArtifactStagingDirectory)/publish' + sourceFolder: '$(Build.ArtifactStagingDirectory)' contents: '**/*.yaml' targetFolder: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}' displayName: Copy downloaded metadata From a08a2e1863d01dbd2ffb5af5938f0b73dd6b6dee Mon Sep 17 00:00:00 2001 From: Adrian Date: Mon, 11 Aug 2025 09:07:19 -0600 Subject: [PATCH 22/75] Attempting to fix kiota dir issue --- .azure-pipelines/generation-pipeline.yml | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 7599cff59..b8eafb5fa 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -314,7 +314,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -355,7 +355,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -396,7 +396,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -435,7 +435,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -474,7 +474,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -515,7 +515,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -556,7 +556,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -597,7 +597,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -712,7 +712,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -754,7 +754,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -796,7 +796,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -836,7 +836,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -876,7 +876,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -919,7 +919,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: @@ -962,7 +962,7 @@ extends: - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' - targetPath: '$(Build.SourcesDirectory)' + targetPath: '$(kiotaDirectory)' steps: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: From dd9b8e508c7d82863533dde47b1321a41dc3839f Mon Sep 17 00:00:00 2001 From: Adrian Date: Mon, 11 Aug 2025 10:27:06 -0600 Subject: [PATCH 23/75] Testing downloaded paths --- .azure-pipelines/generation-pipeline.yml | 2 +- .../language-generation-kiota.yml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index b8eafb5fa..63e1e8547 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -675,7 +675,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanMetadataFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanMetadataFolderBeta)' steps: - template: /.azure-pipelines/generation-templates/language-generation.yml@self parameters: diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index 105bc6a85..04a8a7631 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -87,8 +87,16 @@ steps: RepoDirectory: $(Build.SourcesDirectory)/${{ parameters.repoName }} BranchName: ${{ parameters.branchName }} workingDirectory: ${{ parameters.repoName }} - -- bash: '$(kiotaDirectory)/kiota generate --openapi $(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml --language ${{ parameters.language }} -o $(kiotaDirectory)/output -n ${{ parameters.targetNamespace }} -c ${{ parameters.targetClassName }} ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' +- pwsh: | + Write-Host "=== Files in Kiota Directory ===" + Write-Host "Kiota Directory: $(kiotaDirectory)" + if (Test-Path "$(kiotaDirectory)") { + Get-ChildItem "$(kiotaDirectory)" -Recurse | Format-Table Name, FullName, Length, LastWriteTime -AutoSize + } else { + Write-Warning "Kiota directory not found: $(kiotaDirectory)" + } + displayName: 'List files in Kiota directory' +- bash: '$(kiotaDirectory)/kiota.exe generate --openapi $(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml --language ${{ parameters.language }} -o $(kiotaDirectory)/output -n ${{ parameters.targetNamespace }} -c ${{ parameters.targetClassName }} ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}' env: KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }} From 564e226818d6514df38bef66c5f83004c224816d Mon Sep 17 00:00:00 2001 From: Adrian Date: Mon, 11 Aug 2025 13:06:33 -0600 Subject: [PATCH 24/75] moving from bash to powershell --- .azure-pipelines/generation-pipeline.yml | 2 +- .../generation-templates/language-generation-kiota.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 63e1e8547..8b7559f14 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -638,7 +638,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanMetadataFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanMetadataFolderBeta)' steps: - template: /.azure-pipelines/generation-templates/language-generation.yml@self parameters: diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index 04a8a7631..aedeb6c82 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -96,7 +96,7 @@ steps: Write-Warning "Kiota directory not found: $(kiotaDirectory)" } displayName: 'List files in Kiota directory' -- bash: '$(kiotaDirectory)/kiota.exe generate --openapi $(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml --language ${{ parameters.language }} -o $(kiotaDirectory)/output -n ${{ parameters.targetNamespace }} -c ${{ parameters.targetClassName }} ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' +- pwsh: '& "$(kiotaDirectory)/kiota.exe" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}' env: KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }} From 1af1d6bcdd45f744d829aaa2ddcd5a208db07248 Mon Sep 17 00:00:00 2001 From: Adrian Date: Mon, 11 Aug 2025 14:02:46 -0600 Subject: [PATCH 25/75] changing targetPath --- .azure-pipelines/generation-pipeline.yml | 32 ++++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 8b7559f14..8f9ca099a 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -310,7 +310,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -351,7 +351,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -392,7 +392,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -431,7 +431,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -470,7 +470,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -511,7 +511,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -552,7 +552,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -593,7 +593,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -638,7 +638,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanMetadataFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanMetadataFolderBeta)' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanMetadataFolderV1)' steps: - template: /.azure-pipelines/generation-templates/language-generation.yml@self parameters: @@ -708,7 +708,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -750,7 +750,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -792,7 +792,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -832,7 +832,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -872,7 +872,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -915,7 +915,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -958,7 +958,7 @@ extends: displayName: 'Downloading metadata from artifacts' buildType: 'current' artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata' + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' From 009c89311b5f1657486ad88f6cc0d7bd6447524a Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 12 Aug 2025 09:52:06 -0600 Subject: [PATCH 26/75] adding template context --- .azure-pipelines/generation-pipeline.yml | 42 +++++++++++++++++++ .../generation-templates/capture-openapi.yml | 4 ++ 2 files changed, 46 insertions(+) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 8f9ca099a..6053ce5f7 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -194,6 +194,8 @@ extends: jobs: - job: build_and_publish_typewriter templateContext: + type: releaseJob + isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' @@ -205,6 +207,8 @@ extends: jobs: - job: build_and_publish_kiota templateContext: + type: releaseJob + isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' @@ -223,6 +227,8 @@ extends: jobs: - job: v1_metadata templateContext: + type: releaseJob + isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' @@ -252,6 +258,8 @@ extends: jobs: - job: beta_metadata templateContext: + type: releaseJob + isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' @@ -305,6 +313,8 @@ extends: jobs: - job: csharp_v1_kiota templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -346,6 +356,8 @@ extends: jobs: - job: csharp_beta_kiota templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -387,6 +399,8 @@ extends: jobs: - job: go_v1 templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -426,6 +440,8 @@ extends: jobs: - job: go_beta templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -465,6 +481,8 @@ extends: jobs: - job: java_v1_kiota templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -506,6 +524,8 @@ extends: jobs: - job: java_beta_kiota templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -547,6 +567,8 @@ extends: jobs: - job: php_beta_kiota templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -588,6 +610,8 @@ extends: jobs: - job: php_v1_kiota templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -629,6 +653,8 @@ extends: jobs: - job: typescript_v1 templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact buildType: 'current' @@ -666,6 +692,8 @@ extends: jobs: - job: typescript_beta templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact buildType: 'current' @@ -703,6 +731,8 @@ extends: jobs: - job: typescript_sdk_v1 templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -745,6 +775,8 @@ extends: jobs: - job: typescript_sdk_beta templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -787,6 +819,8 @@ extends: jobs: - job: python_v1 templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -827,6 +861,8 @@ extends: jobs: - job: python_beta templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -867,6 +903,8 @@ extends: jobs: - job: csharp_beta_ccs templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -910,6 +948,8 @@ extends: jobs: - job: python_beta_ccs templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -953,6 +993,8 @@ extends: jobs: - job: typescript_beta_ccs templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 0a7233ede..e7a3d7fc9 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -43,6 +43,8 @@ jobs: variables: targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] templateContext: + type: releaseJob + isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)/$(Name)' @@ -95,6 +97,8 @@ jobs: dependsOn: convert_openapi displayName: Publish templateContext: + type: releaseJob + isProduction: true inputs: - input: pipelineArtifact artifactName: '${{ parameters.cleanMetadataFolder }}-default' From b64aff7883e8797c062634d40c99ab644d75686a Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 12 Aug 2025 09:55:38 -0600 Subject: [PATCH 27/75] adding kiota repo to scan --- .azure-pipelines/generation-pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 6053ce5f7..427342d29 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -165,6 +165,8 @@ extends: parameters: sdl: sourceRepositoriesToScan: + include: + - repository: kiota exclude: - repository: msgraph-sdk-dotnet - repository: msgraph-beta-sdk-dotnet @@ -182,7 +184,6 @@ extends: - repository: msgraph-beta-sdk-python - repository: msgraph-metadata - repository: microsoft-graph-docs - - repository: kiota - repository: Agents-M365Copilot - repository: 1ESPipelineTemplates pool: From e7c898cd8e20793958b0bdb18acea1cdcb0cdd12 Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 12 Aug 2025 10:42:33 -0600 Subject: [PATCH 28/75] reverting back change --- .azure-pipelines/generation-pipeline.yml | 42 ------------------- .../generation-templates/capture-openapi.yml | 4 -- 2 files changed, 46 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 427342d29..ca4b27c55 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -195,8 +195,6 @@ extends: jobs: - job: build_and_publish_typewriter templateContext: - type: releaseJob - isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' @@ -208,8 +206,6 @@ extends: jobs: - job: build_and_publish_kiota templateContext: - type: releaseJob - isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' @@ -228,8 +224,6 @@ extends: jobs: - job: v1_metadata templateContext: - type: releaseJob - isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' @@ -259,8 +253,6 @@ extends: jobs: - job: beta_metadata templateContext: - type: releaseJob - isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)' @@ -314,8 +306,6 @@ extends: jobs: - job: csharp_v1_kiota templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -357,8 +347,6 @@ extends: jobs: - job: csharp_beta_kiota templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -400,8 +388,6 @@ extends: jobs: - job: go_v1 templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -441,8 +427,6 @@ extends: jobs: - job: go_beta templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -482,8 +466,6 @@ extends: jobs: - job: java_v1_kiota templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -525,8 +507,6 @@ extends: jobs: - job: java_beta_kiota templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -568,8 +548,6 @@ extends: jobs: - job: php_beta_kiota templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -611,8 +589,6 @@ extends: jobs: - job: php_v1_kiota templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -654,8 +630,6 @@ extends: jobs: - job: typescript_v1 templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact buildType: 'current' @@ -693,8 +667,6 @@ extends: jobs: - job: typescript_beta templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact buildType: 'current' @@ -732,8 +704,6 @@ extends: jobs: - job: typescript_sdk_v1 templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -776,8 +746,6 @@ extends: jobs: - job: typescript_sdk_beta templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -820,8 +788,6 @@ extends: jobs: - job: python_v1 templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -862,8 +828,6 @@ extends: jobs: - job: python_beta templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -904,8 +868,6 @@ extends: jobs: - job: csharp_beta_ccs templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -949,8 +911,6 @@ extends: jobs: - job: python_beta_ccs templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' @@ -994,8 +954,6 @@ extends: jobs: - job: typescript_beta_ccs templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index e7a3d7fc9..0a7233ede 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -43,8 +43,6 @@ jobs: variables: targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] templateContext: - type: releaseJob - isProduction: true outputs: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)/$(Name)' @@ -97,8 +95,6 @@ jobs: dependsOn: convert_openapi displayName: Publish templateContext: - type: releaseJob - isProduction: true inputs: - input: pipelineArtifact artifactName: '${{ parameters.cleanMetadataFolder }}-default' From 616e469e1d928823f89a732ac63fde6483b97b7b Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 12 Aug 2025 15:00:41 -0600 Subject: [PATCH 29/75] reverting back copyright comments --- .azure-pipelines/generation-pipeline.yml | 6 ++---- .azure-pipelines/generation-templates/capture-openapi.yml | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index ca4b27c55..efcdccd45 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -1,7 +1,5 @@ -# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. -# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. -# This pipeline will be extended to the Custom template -# The pool section has been filled with placeholder values, check the following link for guidance: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/onboardingesteams/overview, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# contains an end to end validation pipeline using C# compilation tests for staging beta metadata trigger: none pr: none schedules: diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 0a7233ede..0ab4a8053 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -1,3 +1,5 @@ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. + parameters: - name: 'endpoint' type: string From d3c2e257d9fa2129e500cd5994dc69b881365648 Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 12 Aug 2025 15:08:39 -0600 Subject: [PATCH 30/75] adding comments --- .azure-pipelines/generation-templates/capture-openapi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 0ab4a8053..11e7c27c6 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -1,5 +1,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. - +# The following template creates multiple artifacts from a matrix, this is the intended behavior to follow the same workflow before the governance migration +# For more information please refer to: https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/pull/1377#discussion_r2271024012 parameters: - name: 'endpoint' type: string @@ -96,6 +97,7 @@ jobs: - job: publish_openapi dependsOn: convert_openapi displayName: Publish + ## If there's new settings added please add them here too templateContext: inputs: - input: pipelineArtifact From 6a58a1648316d98ec589271406e7619f4e25f496 Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 12 Aug 2025 15:13:19 -0600 Subject: [PATCH 31/75] adding comment space --- .azure-pipelines/generation-templates/capture-openapi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 11e7c27c6..617931c8d 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -1,5 +1,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # The following template creates multiple artifacts from a matrix, this is the intended behavior to follow the same workflow before the governance migration + # For more information please refer to: https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/pull/1377#discussion_r2271024012 parameters: - name: 'endpoint' From 86e678dcce6317c50bb9850d6b12c5c9eab2611e Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 3 Sep 2025 10:13:54 -0700 Subject: [PATCH 32/75] chore: update Python copilot agent library generation dir (#1379) --- .azure-pipelines/generation-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index efcdccd45..45ca878b2 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -937,7 +937,7 @@ extends: languageSpecificSteps: - template: /.azure-pipelines/generation-templates/python.yml@self parameters: - repoName: 'Agents-M365Copilot/python/packages' + repoName: 'Agents-M365Copilot/python/packages/microsoft_agents_m365copilot_beta' baseDirectory: microsoft_agents_m365copilot_beta - stage: stage_ccs_typescript_beta dependsOn: @@ -981,4 +981,4 @@ extends: - template: /.azure-pipelines/generation-templates/ccs-typescript-sdk.yml@self parameters: repoName: 'Agents-M365Copilot/typescript' - packageName: '@microsoft/agents-m365copilot-beta' \ No newline at end of file + packageName: '@microsoft/agents-m365copilot-beta' From 72b113b27439e144392775c42ee5703c9f092164 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Sep 2025 10:24:36 -0700 Subject: [PATCH 33/75] chore(deps): bump submodules/vipr from `c5c2204` to `39c1ee7` (#1378) Bumps [submodules/vipr](https://github.com/microsoft/vipr) from `c5c2204` to `39c1ee7`. - [Release notes](https://github.com/microsoft/vipr/releases) - [Commits](https://github.com/microsoft/vipr/compare/c5c2204400b27503a3b9fb75a36b5a3cf9ed90f0...39c1ee7affbd5567511890ddff5edb6c721ee1c7) --- updated-dependencies: - dependency-name: submodules/vipr dependency-version: 39c1ee7affbd5567511890ddff5edb6c721ee1c7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> --- submodules/vipr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/vipr b/submodules/vipr index c5c220440..39c1ee7af 160000 --- a/submodules/vipr +++ b/submodules/vipr @@ -1 +1 @@ -Subproject commit c5c2204400b27503a3b9fb75a36b5a3cf9ed90f0 +Subproject commit 39c1ee7affbd5567511890ddff5edb6c721ee1c7 From 834cf6dee0075967c6f7d40b3532de4b55cc6a0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Sep 2025 17:28:21 +0000 Subject: [PATCH 34/75] chore(deps): bump actions/checkout from 4 to 5 (#1376) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql.yml | 2 +- .github/workflows/dotnet.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 625d1eef1..7a6aac7e4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,7 +46,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: submodules: recursive diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 208edc3a8..e4e01a169 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: recursive - name: Setup .NET From 0c8ef9f47313c29b422bf3cd3471121ebe82d7d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 17:38:28 -0700 Subject: [PATCH 35/75] chore(deps): bump actions/setup-dotnet from 4.3.1 to 5.0.0 (#1381) Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.3.1 to 5.0.0. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v4.3.1...v5.0.0) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e4e01a169..b060ce79c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,7 +16,7 @@ jobs: with: submodules: recursive - name: Setup .NET - uses: actions/setup-dotnet@v4.3.1 + uses: actions/setup-dotnet@v5.0.0 with: dotnet-version: 8.0.x - name: Restore dependencies From 3a777457f55190f2a42ac488683d2450baf3028e Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:44:25 -0700 Subject: [PATCH 36/75] dep: update vipr dependency (#1383) Co-authored-by: Adrian --- submodules/vipr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/vipr b/submodules/vipr index 39c1ee7af..0921e5504 160000 --- a/submodules/vipr +++ b/submodules/vipr @@ -1 +1 @@ -Subproject commit 39c1ee7affbd5567511890ddff5edb6c721ee1c7 +Subproject commit 0921e550479b18d11ccccc4f21ce4c72c8170b9b From 50eae12ccb3390ca2d4a94164d43cc0417869281 Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:50:05 -0700 Subject: [PATCH 37/75] chore: fix path to beta python ccs (#1382) --- .azure-pipelines/generation-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 45ca878b2..0d396af41 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -937,8 +937,8 @@ extends: languageSpecificSteps: - template: /.azure-pipelines/generation-templates/python.yml@self parameters: - repoName: 'Agents-M365Copilot/python/packages/microsoft_agents_m365copilot_beta' - baseDirectory: microsoft_agents_m365copilot_beta + repoName: 'Agents-M365Copilot/python/packages' + baseDirectory: microsoft_agents_m365copilot_beta/microsoft_agents_m365copilot_beta - stage: stage_ccs_typescript_beta dependsOn: - stage_build_and_publish_kiota From f2e88924090f8daf5e4ef15dfedc65cb77bf528c Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Fri, 3 Oct 2025 11:57:56 -0700 Subject: [PATCH 38/75] ci: update script to special case for beta typing versioning (#1384) --- scripts/create-pull-request.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/create-pull-request.ps1 b/scripts/create-pull-request.ps1 index 3478a084a..6b4571f30 100644 --- a/scripts/create-pull-request.ps1 +++ b/scripts/create-pull-request.ps1 @@ -9,8 +9,16 @@ if (($env:GeneratePullRequest -eq $False)) { # Skip CI if manually running this return; } +# Special case for beta typings as it uses a non-conforming preview versioning. +if ($env:RepoName.Contains("msgraph-beta-typescript-typings")) +{ + $title = "feat: generated $version models and request builders" +} +else { + $title = "Generated $version models and request builders" +} + $version = $env:Version -$title = "Generated $version models and request builders" $body = ":bangbang:**_Important_**:bangbang:
Check for unexpected deletions or changes in this PR and ensure relevant CI checks are passing.

**Note:** This pull request was automatically created by Azure pipelines." $baseBranchParameter = "" From 9541134c0cdedb3c7c30e18153d765fe4924b1d4 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 3 Oct 2025 14:40:12 -0600 Subject: [PATCH 39/75] reverting change --- .azure-pipelines/generation-templates/capture-metadata.yml | 2 +- .azure-pipelines/generation-templates/capture-openapi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-metadata.yml b/.azure-pipelines/generation-templates/capture-metadata.yml index 4a832c83f..96637da28 100644 --- a/.azure-pipelines/generation-templates/capture-metadata.yml +++ b/.azure-pipelines/generation-templates/capture-metadata.yml @@ -153,7 +153,7 @@ steps: parameters: version: '9.x' -- pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 +- pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 displayName: 'Install hidi tool' # verify that generated metadata is parsable as an Edm model diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index e60200144..617931c8d 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -69,7 +69,7 @@ jobs: parameters: version: '9.x' - - pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 + - pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 displayName: install hidi - pwsh: | From 29a4ab4c515f22497624933c86d5db7c7a60cf4b Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:24:23 -0700 Subject: [PATCH 40/75] Merge dev into main (#1380) * Generation pipeline migration to 1ES * fixing param issue * adding missing repo * Fix template issues * duplication error * removing download steps * sdl analysis * excluding repos * changing typewriter targetPath * changing download path * adding typewriter to the target path * Fixing openAPI outputPath * fixing output path * test run * changing target path * testing change * multiple artifacts * testing copy files * hardcoding downloaded artifacts * testing copy files * Fixing copy files * Attempting to fix kiota dir issue * Testing downloaded paths * moving from bash to powershell * changing targetPath * adding template context * adding kiota repo to scan * reverting back change * reverting back copyright comments * adding comments * adding comment space * chore: update Python copilot agent library generation dir (#1379) * chore(deps): bump submodules/vipr from `c5c2204` to `39c1ee7` (#1378) Bumps [submodules/vipr](https://github.com/microsoft/vipr) from `c5c2204` to `39c1ee7`. - [Release notes](https://github.com/microsoft/vipr/releases) - [Commits](https://github.com/microsoft/vipr/compare/c5c2204400b27503a3b9fb75a36b5a3cf9ed90f0...39c1ee7affbd5567511890ddff5edb6c721ee1c7) --- updated-dependencies: - dependency-name: submodules/vipr dependency-version: 39c1ee7affbd5567511890ddff5edb6c721ee1c7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> * chore(deps): bump actions/checkout from 4 to 5 (#1376) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump actions/setup-dotnet from 4.3.1 to 5.0.0 (#1381) Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.3.1 to 5.0.0. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v4.3.1...v5.0.0) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * dep: update vipr dependency (#1383) Co-authored-by: Adrian * chore: fix path to beta python ccs (#1382) * ci: update script to special case for beta typing versioning (#1384) --------- Signed-off-by: dependabot[bot] Co-authored-by: Adrian Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .azure-pipelines/generation-pipeline.yml | 1560 ++++++++++------- .../build-and-publish-kiota.yml | 9 +- .../build-and-publish-typewriter.yml | 10 +- .../generation-templates/capture-metadata.yml | 23 +- .../generation-templates/capture-openapi.yml | 87 +- .../generation-templates/download-kiota.yml | 12 +- .../download-typewriter.yml | 11 +- .../language-generation-kiota.yml | 16 +- .../language-generation.yml | 7 +- .../set-up-for-generation-kiota.yml | 28 +- .../set-up-for-generation.yml | 23 +- .github/workflows/codeql.yml | 2 +- .github/workflows/dotnet.yml | 4 +- scripts/create-pull-request.ps1 | 10 +- submodules/vipr | 2 +- 15 files changed, 997 insertions(+), 807 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 13cdebb15..0d396af41 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -1,6 +1,5 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # contains an end to end validation pipeline using C# compilation tests for staging beta metadata - trigger: none pr: none schedules: @@ -12,126 +11,120 @@ schedules: always: true resources: - repositories: - - repository: msgraph-sdk-dotnet - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-dotnet - ref: main - - repository: msgraph-beta-sdk-dotnet - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-dotnet - ref: main - - repository: msgraph-sdk-php - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-php - ref: main - - repository: msgraph-beta-sdk-php - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-php - ref: main - - repository: msgraph-typescript-typings - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-typescript-typings - ref: main - - repository: msgraph-beta-typescript-typings - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-typescript-typings - ref: main - - repository: msgraph-sdk-java - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-java - ref: main - - repository: msgraph-beta-sdk-java - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-java - ref: main - - repository: msgraph-sdk-go - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-go - ref: main - - repository: msgraph-beta-sdk-go - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-go - ref: main - - repository: msgraph-sdk-typescript - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-typescript - ref: main - - repository: msgraph-beta-sdk-typescript - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-typescript - ref: main - - repository: msgraph-sdk-python - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-python - ref: main - - repository: msgraph-beta-sdk-python - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-beta-sdk-python - ref: main - - repository: msgraph-metadata - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-metadata - - repository: microsoft-graph-docs - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/microsoft-graph-docs - - repository: kiota - type: github - endpoint: microsoftkiota - name: microsoft/kiota - - repository: Agents-M365Copilot - type: github - endpoint: microsoftkiota - name: microsoft/Agents-M365Copilot - - -pool: 1es-ubuntu-latest-m - + repositories: + - repository: msgraph-sdk-dotnet + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-dotnet + ref: main + - repository: msgraph-beta-sdk-dotnet + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-dotnet + ref: main + - repository: msgraph-sdk-php + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-php + ref: main + - repository: msgraph-beta-sdk-php + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-php + ref: main + - repository: msgraph-typescript-typings + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-typescript-typings + ref: main + - repository: msgraph-beta-typescript-typings + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-typescript-typings + ref: main + - repository: msgraph-sdk-java + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-java + ref: main + - repository: msgraph-beta-sdk-java + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-java + ref: main + - repository: msgraph-sdk-go + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-go + ref: main + - repository: msgraph-beta-sdk-go + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-go + ref: main + - repository: msgraph-sdk-typescript + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-typescript + ref: main + - repository: msgraph-beta-sdk-typescript + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-typescript + ref: main + - repository: msgraph-sdk-python + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-sdk-python + ref: main + - repository: msgraph-beta-sdk-python + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-beta-sdk-python + ref: main + - repository: msgraph-metadata + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/msgraph-metadata + - repository: microsoft-graph-docs + type: github + endpoint: microsoftgraph (22) + name: microsoftgraph/microsoft-graph-docs + - repository: kiota + type: github + endpoint: microsoftkiota + name: microsoft/kiota + - repository: Agents-M365Copilot + type: github + endpoint: microsoftkiota + name: microsoft/Agents-M365Copilot + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release parameters: - - name: v1BranchPrefix - default: v1.0/pipelinebuild - displayName: V1 Branch Prefix - - - name: betaBranchPrefix - default: beta/pipelinebuild - displayName: Beta Branch Prefix (should be different than V1) - - - name: skipMetadataCaptureAndClean - default: false - displayName: Skip metadata capture and clean - type: boolean - - - name: skipOpenApiCaptureAndClean - default: false - displayName: Skip OpenAPI capture and clean - type: boolean - - - name: publishChanges - default: true - type: boolean - displayName: Publish changes? - - - name: overrideSkipCI - default: false - type: boolean - displayName: Override [skip ci]? Checking this box will generate the SDK PRs - +- name: v1BranchPrefix + default: v1.0/pipelinebuild + displayName: V1 Branch Prefix +- name: betaBranchPrefix + default: beta/pipelinebuild + displayName: Beta Branch Prefix (should be different than V1) +- name: skipMetadataCaptureAndClean + default: false + displayName: Skip metadata capture and clean + type: boolean +- name: skipOpenApiCaptureAndClean + default: false + displayName: Skip OpenAPI capture and clean + type: boolean +- name: publishChanges + default: true + type: boolean + displayName: Publish changes? +- name: overrideSkipCI + default: false + type: boolean + displayName: Override [skip ci]? Checking this box will generate the SDK PRs variables: buildConfiguration: 'Release' cleanMetadataFileBeta: '$(Build.SourcesDirectory)/msgraph-metadata/clean_beta_metadata/cleanMetadataWithDescriptionsbeta.xml' @@ -158,288 +151,413 @@ variables: conversionSettingsDirectory: '$(Build.SourcesDirectory)/msgraph-metadata/conversion-settings' transformScript: '$(Build.SourcesDirectory)/msgraph-metadata/transforms/csdl/preprocess_csdl.xsl' docsDirectory: '$(Build.SourcesDirectory)/microsoft-graph-docs' - v1Branch: ${{ parameters.v1BranchPrefix }}/$(Build.BuildId) betaBranch: ${{ parameters.betaBranchPrefix }}/$(Build.BuildId) - publishChanges: ${{ parameters.publishChanges }} overrideSkipCI: ${{ parameters.overrideSkipCI }} skipMetadataCaptureAndClean: ${{ parameters.skipMetadataCaptureAndClean }} skipOpenApiCaptureAndClean: ${{ parameters.skipOpenApiCaptureAndClean }} phpVersion: 7.2 - -# This stage is the core dependency for all other stages. -stages: -- stage: stage_build_and_publish_typewriter - dependsOn: [] # remove the implicit dependency to any previous stage - jobs: - - job: build_and_publish_typewriter - steps: - - template: generation-templates/build-and-publish-typewriter.yml - -- stage: stage_build_and_publish_kiota - dependsOn: [] # remove the implicit dependency to any previous stage - jobs: - - job: build_and_publish_kiota - steps: - - template: generation-templates/build-and-publish-kiota.yml - +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + sdl: + sourceRepositoriesToScan: + include: + - repository: kiota + exclude: + - repository: msgraph-sdk-dotnet + - repository: msgraph-beta-sdk-dotnet + - repository: msgraph-sdk-php + - repository: msgraph-beta-sdk-php + - repository: msgraph-typescript-typings + - repository: msgraph-beta-typescript-typings + - repository: msgraph-sdk-java + - repository: msgraph-beta-sdk-java + - repository: msgraph-sdk-go + - repository: msgraph-beta-sdk-go + - repository: msgraph-sdk-typescript + - repository: msgraph-beta-sdk-typescript + - repository: msgraph-sdk-python + - repository: msgraph-beta-sdk-python + - repository: msgraph-metadata + - repository: microsoft-graph-docs + - repository: Agents-M365Copilot + - repository: 1ESPipelineTemplates + pool: + name: Azure-Pipelines-1ESPT-ExDShared + vmImage: ubuntu-latest + stages: + - stage: stage_build_and_publish_typewriter + dependsOn: [] # remove the implicit dependency to any previous stage + jobs: + - job: build_and_publish_typewriter + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: typewriter + steps: + - template: /.azure-pipelines/generation-templates/build-and-publish-typewriter.yml@self + - stage: stage_build_and_publish_kiota + dependsOn: [] # remove the implicit dependency to any previous stage + jobs: + - job: build_and_publish_kiota + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: kiota + steps: + - template: /.azure-pipelines/generation-templates/build-and-publish-kiota.yml@self # Downloads the latest public beta metadata. If there are changes, we checkin # the public metadata into microsoftgraph/msgraph-metadata, and then run the # metadata through the cleaning and documentation processes before validating # the results with generated and built .NET code files as a smoke test. -- stage: stage_v1_metadata - dependsOn: stage_build_and_publish_typewriter - condition: | - and(succeeded('stage_build_and_publish_typewriter'), - eq( ${{ parameters.skipMetadataCaptureAndClean }}, false)) - jobs: - - job: v1_metadata - steps: - - template: generation-templates/capture-metadata.yml - parameters: - endpoint: 'v1.0' - inputMetadata: $(rawMetadataFileV1) - outputPath: $(cleanMetadataFileV1OutputPath) - cleanMetadataFile: $(cleanMetadataFileV1) - cleanMetadataFolder: $(cleanMetadataFolderV1) - cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsV1) - metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource) + - stage: stage_v1_metadata + dependsOn: stage_build_and_publish_typewriter + condition: | + and(succeeded('stage_build_and_publish_typewriter'), + eq( ${{ parameters.skipMetadataCaptureAndClean }}, false)) + jobs: + - job: v1_metadata + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: $(cleanMetadataFolderV1) + inputs: + - input: pipelineArtifact + buildType: 'current' + artifactName: 'typewriter' + targetPath: '$(Build.SourcesDirectory)/typewriter' + steps: + - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self + parameters: + endpoint: 'v1.0' + inputMetadata: $(rawMetadataFileV1) + outputPath: $(cleanMetadataFileV1OutputPath) + cleanMetadataFile: $(cleanMetadataFileV1) + cleanMetadataFolder: $(cleanMetadataFolderV1) + cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsV1) + metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource) # Same description as stage_v1_metadata -- stage: stage_beta_metadata - dependsOn: stage_build_and_publish_typewriter - condition: | - and(succeeded('stage_build_and_publish_typewriter'), - eq( ${{ parameters.skipMetadataCaptureAndClean }}, false)) - jobs: - - job: beta_metadata - steps: - - template: generation-templates/capture-metadata.yml - parameters: - endpoint: 'beta' - inputMetadata: $(rawMetadataFileBeta) - outputPath: $(cleanMetadataFileBetaOutputPath) - cleanMetadataFile: $(cleanMetadataFileBeta) - cleanMetadataFolder: $(cleanMetadataFolderBeta) - cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsBeta) - metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource) - -- stage: stage_v1_openapi - dependsOn: stage_v1_metadata - condition: and(in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped'), eq( ${{ parameters.skipOpenApiCaptureAndClean }}, false)) - jobs: - - template: generation-templates/capture-openapi.yml - parameters: - endpoint: 'v1.0' - outputPath: $(cleanOpenAPIFileV1OutputPath) - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - -- stage: stage_beta_openapi - dependsOn: stage_beta_metadata - condition: and(in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped'), eq( ${{ parameters.skipOpenApiCaptureAndClean }}, false)) - jobs: - - template: generation-templates/capture-openapi.yml - parameters: - endpoint: 'beta' - outputPath: $(cleanOpenAPIFileBetaOutputPath) - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - -- stage: stage_csharp_v1_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: csharp_v1_kiota - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'csharp' - version: '' - repoName: 'msgraph-sdk-dotnet' - baseBranchName : 'main' - branchName: 'kiota/$(v1Branch)' - targetClassName: "BaseGraphServiceClient" - targetNamespace: "Microsoft.Graph" - commitMessagePrefix: "feat(generation): update request builders and models" - customArguments: "-b" # Enable the backing store - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + - stage: stage_beta_metadata + dependsOn: stage_build_and_publish_typewriter + condition: | + and(succeeded('stage_build_and_publish_typewriter'), + eq( ${{ parameters.skipMetadataCaptureAndClean }}, false)) + jobs: + - job: beta_metadata + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: $(cleanMetadataFolderBeta) + inputs: + - input: pipelineArtifact + buildType: 'current' + artifactName: 'typewriter' + targetPath: '$(Build.SourcesDirectory)/typewriter' + steps: + - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self parameters: - repoName: msgraph-sdk-dotnet - -- stage: stage_csharp_beta_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: csharp_beta_kiota - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'csharp' - version: 'beta' - repoName: 'msgraph-beta-sdk-dotnet' - baseBranchName : 'main' - branchName: 'kiota/$(betaBranch)' - targetClassName: "BaseGraphServiceClient" - targetNamespace: "Microsoft.Graph.Beta" - commitMessagePrefix: "feat(generation): update request builders and models" - customArguments: "-b" # Enable the backing store - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + endpoint: 'beta' + inputMetadata: $(rawMetadataFileBeta) + outputPath: $(cleanMetadataFileBetaOutputPath) + cleanMetadataFile: $(cleanMetadataFileBeta) + cleanMetadataFolder: $(cleanMetadataFolderBeta) + cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsBeta) + metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource) + + - stage: stage_v1_openapi + dependsOn: stage_v1_metadata + condition: and(in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped'), eq( ${{ parameters.skipOpenApiCaptureAndClean }}, false)) + jobs: + - template: /.azure-pipelines/generation-templates/capture-openapi.yml@self + parameters: + endpoint: 'v1.0' + outputPath: $(cleanOpenAPIFileV1OutputPath) + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + + - stage: stage_beta_openapi + dependsOn: stage_beta_metadata + condition: and(in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped'), eq( ${{ parameters.skipOpenApiCaptureAndClean }}, false)) + jobs: + - template: /.azure-pipelines/generation-templates/capture-openapi.yml@self + parameters: + endpoint: 'beta' + outputPath: $(cleanOpenAPIFileBetaOutputPath) + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + + - stage: stage_csharp_v1_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_v1_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-dotnet - -- stage: stage_go_v1 - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: go_v1 - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'go' - version: '' - repoName: 'msgraph-sdk-go' - branchName: $(v1Branch) - targetClassName: "GraphBaseServiceClient" - targetNamespace: "github.com/microsoftgraph/msgraph-sdk-go/" - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store - commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - languageSpecificSteps: - - template: generation-templates/go.yml + language: 'csharp' + version: '' + repoName: 'msgraph-sdk-dotnet' + baseBranchName: 'main' + branchName: 'kiota/$(v1Branch)' + targetClassName: "BaseGraphServiceClient" + targetNamespace: "Microsoft.Graph" + commitMessagePrefix: "feat(generation): update request builders and models" + customArguments: "-b" # Enable the backing store + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self + parameters: + repoName: msgraph-sdk-dotnet + + - stage: stage_csharp_beta_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_beta_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-sdk-go - -- stage: stage_go_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: go_beta - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'go' - version: 'beta' - repoName: 'msgraph-beta-sdk-go' - branchName: $(betaBranch) - targetClassName: "GraphBaseServiceClient" - targetNamespace: "github.com/microsoftgraph/msgraph-beta-sdk-go/" - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store - commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - languageSpecificSteps: - - template: generation-templates/go.yml + language: 'csharp' + version: 'beta' + repoName: 'msgraph-beta-sdk-dotnet' + baseBranchName: 'main' + branchName: 'kiota/$(betaBranch)' + targetClassName: "BaseGraphServiceClient" + targetNamespace: "Microsoft.Graph.Beta" + commitMessagePrefix: "feat(generation): update request builders and models" + customArguments: "-b" # Enable the backing store + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self + parameters: + repoName: msgraph-beta-sdk-dotnet + + - stage: stage_go_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: go_v1 + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-go - -- stage: stage_java_v1_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: java_v1_kiota - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'java' - version: '' - repoName: 'msgraph-sdk-java' - baseBranchName: 'main' - branchName: '$(v1Branch)' - targetClassName: "BaseGraphServiceClient" - targetNamespace: "com.Microsoft.Graph" - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - commitMessagePrefix: "feat(generation): update request builders and models" - languageSpecificSteps: - - template: generation-templates/java-kiota.yml + language: 'go' + version: '' + repoName: 'msgraph-sdk-go' + branchName: $(v1Branch) + targetClassName: "GraphBaseServiceClient" + targetNamespace: "github.com/microsoftgraph/msgraph-sdk-go/" + customArguments: "-b -e '/me' -e '/me/**'" + commitMessagePrefix: "feat(generation): update request builders and models" + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/go.yml@self + parameters: + repoName: msgraph-sdk-go + - stage: stage_go_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: go_beta + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-sdk-java - namespacePath: com/microsoft/graph - -- stage: stage_java_beta_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: java_beta_kiota - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'java' - version: 'beta' - repoName: 'msgraph-beta-sdk-java' - baseBranchName: 'main' - branchName: '$(betaBranch)' - targetClassName: "BaseGraphServiceClient" - targetNamespace: "com.Microsoft.Graph.Beta" - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - commitMessagePrefix: "feat(generation): update request builders and models" - languageSpecificSteps: - - template: generation-templates/java-kiota.yml + language: 'go' + version: 'beta' + repoName: 'msgraph-beta-sdk-go' + branchName: $(betaBranch) + targetClassName: "GraphBaseServiceClient" + targetNamespace: "github.com/microsoftgraph/msgraph-beta-sdk-go/" + customArguments: "-b -e '/me' -e '/me/**'" + commitMessagePrefix: "feat(generation): update request builders and models" + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/go.yml@self + parameters: + repoName: msgraph-beta-sdk-go + - stage: stage_java_v1_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: java_v1_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-java - namespacePath: com/microsoft/graph/beta - - -- stage: stage_php_beta_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: php_beta_kiota - steps: - - template: generation-templates/language-generation-kiota.yml + language: 'java' + version: '' + repoName: 'msgraph-sdk-java' + baseBranchName: 'main' + branchName: '$(v1Branch)' + targetClassName: "BaseGraphServiceClient" + targetNamespace: "com.Microsoft.Graph" + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store + commitMessagePrefix: "feat(generation): update request builders and models" + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/java-kiota.yml@self + parameters: + repoName: msgraph-sdk-java + namespacePath: com/microsoft/graph + - stage: stage_java_beta_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: java_beta_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'java' + version: 'beta' + repoName: 'msgraph-beta-sdk-java' + baseBranchName: 'main' + branchName: '$(betaBranch)' + targetClassName: "BaseGraphServiceClient" + targetNamespace: "com.Microsoft.Graph.Beta" + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store + commitMessagePrefix: "feat(generation): update request builders and models" + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/java-kiota.yml@self + parameters: + repoName: msgraph-beta-sdk-java + namespacePath: com/microsoft/graph/beta + - stage: stage_php_beta_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: php_beta_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' version: 'beta' @@ -451,25 +569,36 @@ stages: commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - - template: generation-templates/php-kiota.yml - parameters: - repoName: msgraph-beta-sdk-php - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store - -- stage: stage_php_v1_kiota - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: php_v1_kiota - steps: - - template: generation-templates/language-generation-kiota.yml + - template: /.azure-pipelines/generation-templates/php-kiota.yml@self + parameters: + repoName: msgraph-beta-sdk-php + customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store + + - stage: stage_php_v1_kiota + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: php_v1_kiota + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' version: '' @@ -481,280 +610,375 @@ stages: commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - - template: generation-templates/php-kiota.yml - parameters: - repoName: msgraph-sdk-php - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store - -- stage: stage_typescript_v1 - dependsOn: - - stage_build_and_publish_typewriter - - stage_v1_metadata - condition: | - and - ( - eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), - in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_v1 - steps: - - template: generation-templates/language-generation.yml - parameters: - language: 'TypeScript' - version: '' - repoName: 'msgraph-typescript-typings' - branchName: $(v1Branch) - cleanMetadataFile: $(cleanMetadataFileV1) - cleanMetadataFolder: $(cleanMetadataFolderV1) - languageSpecificSteps: - - template: generation-templates/typescript.yml + - template: /.azure-pipelines/generation-templates/php-kiota.yml@self + parameters: + repoName: msgraph-sdk-php + customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store + + - stage: stage_typescript_v1 + dependsOn: + - stage_build_and_publish_typewriter + - stage_v1_metadata + condition: | + and + ( + eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_v1 + templateContext: + inputs: + - input: pipelineArtifact + buildType: 'current' + artifactName: 'typewriter' + targetPath: '$(Build.SourcesDirectory)/typewriter' + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanMetadataFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanMetadataFolderV1)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation.yml@self parameters: + language: 'TypeScript' + version: '' repoName: 'msgraph-typescript-typings' - -- stage: stage_typescript_beta - dependsOn: - - stage_build_and_publish_typewriter - - stage_beta_metadata - condition: | - and - ( - eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), - in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_beta - steps: - - template: generation-templates/language-generation.yml - parameters: - language: 'TypeScript' - version: 'beta' - repoName: 'msgraph-beta-typescript-typings' - branchName: $(betaBranch) - cleanMetadataFile: $(cleanMetadataFileBeta) - cleanMetadataFolder: $(cleanMetadataFolderBeta) - languageSpecificSteps: - - template: generation-templates/typescript.yml + branchName: $(v1Branch) + cleanMetadataFile: $(cleanMetadataFileV1) + cleanMetadataFolder: $(cleanMetadataFolderV1) + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/typescript.yml@self + parameters: + repoName: 'msgraph-typescript-typings' + + - stage: stage_typescript_beta + dependsOn: + - stage_build_and_publish_typewriter + - stage_beta_metadata + condition: | + and + ( + eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_beta + templateContext: + inputs: + - input: pipelineArtifact + buildType: 'current' + artifactName: 'typewriter' + targetPath: '$(Build.SourcesDirectory)/typewriter' + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanMetadataFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanMetadataFolderBeta)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation.yml@self parameters: + language: 'TypeScript' + version: 'beta' repoName: 'msgraph-beta-typescript-typings' - -- stage: stage_typescript_sdk_v1 - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_sdk_v1 - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'typescript' - version: '' - repoName: 'msgraph-sdk-typescript' - baseBranchName : 'main' - branchName: $(v1Branch) - commitMessagePrefix: "feat(generation): update request builders and models" - targetClassName: "GraphBaseServiceClient" - targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/" - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - languageSpecificSteps: - - template: generation-templates/typescript-sdk.yml + branchName: $(betaBranch) + cleanMetadataFile: $(cleanMetadataFileBeta) + cleanMetadataFolder: $(cleanMetadataFolderBeta) + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/typescript.yml@self + parameters: + repoName: 'msgraph-beta-typescript-typings' + + - stage: stage_typescript_sdk_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_sdk_v1 + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-sdk-typescript - packageName: '@microsoft/msgraph-sdk' - -- stage: stage_typescript_sdk_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_sdk_beta - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'typescript' - version: 'beta' - repoName: 'msgraph-beta-sdk-typescript' - baseBranchName : 'main' - branchName: $(betaBranch) - commitMessagePrefix: "feat(generation): update request builders and models" - targetClassName: "GraphBetaBaseServiceClient" - targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/" - customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - languageSpecificSteps: - - template: generation-templates/typescript-sdk.yml + language: 'typescript' + version: '' + repoName: 'msgraph-sdk-typescript' + baseBranchName: 'main' + branchName: $(v1Branch) + commitMessagePrefix: "feat(generation): update request builders and models" + targetClassName: "GraphBaseServiceClient" + targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/" + customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/typescript-sdk.yml@self + parameters: + repoName: msgraph-sdk-typescript + packageName: '@microsoft/msgraph-sdk' + + - stage: stage_typescript_sdk_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_sdk_beta + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-typescript - packageName: '@microsoft/msgraph-beta-sdk' - -- stage: stage_python_v1 - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: python_v1 - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'python' - version: '' - repoName: 'msgraph-sdk-python' - branchName: $(v1Branch) - targetClassName: "BaseGraphServiceClient" - targetNamespace: "msgraph.generated" - customArguments: "-b -e '/me' -e '/me/**'" # Enable backing store, Exclude me - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - commitMessagePrefix: "feat(generation): update request builders and models" - languageSpecificSteps: - - template: generation-templates/python.yml + language: 'typescript' + version: 'beta' + repoName: 'msgraph-beta-sdk-typescript' + baseBranchName: 'main' + branchName: $(betaBranch) + commitMessagePrefix: "feat(generation): update request builders and models" + targetClassName: "GraphBetaBaseServiceClient" + targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/" + customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/typescript-sdk.yml@self + parameters: + repoName: msgraph-beta-sdk-typescript + packageName: '@microsoft/msgraph-beta-sdk' + + - stage: stage_python_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: python_v1 + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-sdk-python - baseDirectory: msgraph - -- stage: stage_python_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: python_beta - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'python' - version: 'beta' - repoName: 'msgraph-beta-sdk-python' - branchName: $(betaBranch) - targetClassName: "BaseGraphServiceClient" - targetNamespace: "msgraph_beta.generated" - customArguments: "-b -e '/me' -e '/me/**'" # Enable backing store, Exclude me - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - commitMessagePrefix: "feat(generation): update request builders and models" - languageSpecificSteps: - - template: generation-templates/python.yml + language: 'python' + version: '' + repoName: 'msgraph-sdk-python' + branchName: $(v1Branch) + targetClassName: "BaseGraphServiceClient" + targetNamespace: "msgraph.generated" + customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + commitMessagePrefix: "feat(generation): update request builders and models" + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/python.yml@self + parameters: + repoName: msgraph-sdk-python + baseDirectory: msgraph + - stage: stage_python_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: python_beta + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-python - baseDirectory: msgraph_beta - -- stage: stage_ccs_csharp_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: csharp_beta_ccs - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'csharp' - version: 'beta' - orgName: 'microsoft' - repoName: 'Agents-M365Copilot' - baseBranchName : 'main' - branchName: 'ccs-dotnet/$(betaBranch)' - targetClassName: "BaseAgentsM365CopilotBetaServiceClient" - targetNamespace: "Microsoft.Agents.M365Copilot.Beta" - commitMessagePrefix: "feat(generation): update request builders and models for dotnet beta" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - pathExclusionArguments: '' - languageSpecificSteps: - - template: generation-templates/dotnet-kiota.yml + language: 'python' + version: 'beta' + repoName: 'msgraph-beta-sdk-python' + branchName: $(betaBranch) + targetClassName: "BaseGraphServiceClient" + targetNamespace: "msgraph_beta.generated" + customArguments: "-b -e '/me' -e '/me/**'" + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + commitMessagePrefix: "feat(generation): update request builders and models" + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/python.yml@self + parameters: + repoName: msgraph-beta-sdk-python + baseDirectory: msgraph_beta + - stage: stage_ccs_csharp_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_beta_ccs + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: 'Agents-M365Copilot/dotnet' - packageName: Microsoft.Agents.M365Copilot.Beta - -- stage: stage_ccs_python_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: python_beta_ccs - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'python' - version: 'beta' - orgName: 'microsoft' - repoName: 'Agents-M365Copilot' - baseBranchName : 'main' - branchName: 'ccs-python/$(betaBranch)' - targetClassName: "BaseAgentsM365CopilotBetaServiceClient" - targetNamespace: "microsoft_agents_m365copilot_beta.generated" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - commitMessagePrefix: "feat(generation): update request builders and models for python beta" - pathExclusionArguments: '' - languageSpecificSteps: - - template: generation-templates/python.yml + language: 'csharp' + version: 'beta' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-dotnet/$(betaBranch)' + targetClassName: "BaseAgentsM365CopilotBetaServiceClient" + targetNamespace: "Microsoft.Agents.M365Copilot.Beta" + commitMessagePrefix: "feat(generation): update request builders and models for dotnet beta" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self + parameters: + repoName: 'Agents-M365Copilot/dotnet' + packageName: Microsoft.Agents.M365Copilot.Beta + - stage: stage_ccs_python_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: python_beta_ccs + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: 'Agents-M365Copilot/python/packages' - baseDirectory: microsoft_agents_m365copilot_beta - -- stage: stage_ccs_typescript_beta - dependsOn: - - stage_build_and_publish_kiota - - stage_beta_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: typescript_beta_ccs - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'typescript' - version: 'beta' - orgName: 'microsoft' - repoName: 'Agents-M365Copilot' - baseBranchName : 'main' - branchName: 'ccs-typescript/$(betaBranch)' - commitMessagePrefix: "feat(generation): update request builders and models for typescript beta" - targetClassName: "BaseAgentsM365CopilotBetaServiceClient" - targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - pathExclusionArguments: '' - languageSpecificSteps: - - template: generation-templates/ccs-typescript-sdk.yml + language: 'python' + version: 'beta' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-python/$(betaBranch)' + targetClassName: "BaseAgentsM365CopilotBetaServiceClient" + targetNamespace: "microsoft_agents_m365copilot_beta.generated" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + commitMessagePrefix: "feat(generation): update request builders and models for python beta" + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/python.yml@self + parameters: + repoName: 'Agents-M365Copilot/python/packages' + baseDirectory: microsoft_agents_m365copilot_beta/microsoft_agents_m365copilot_beta + - stage: stage_ccs_typescript_beta + dependsOn: + - stage_build_and_publish_kiota + - stage_beta_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_beta_ccs + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: - repoName: 'Agents-M365Copilot/typescript' - packageName: '@microsoft/agents-m365copilot-beta' + language: 'typescript' + version: 'beta' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-typescript/$(betaBranch)' + commitMessagePrefix: "feat(generation): update request builders and models for typescript beta" + targetClassName: "BaseAgentsM365CopilotBetaServiceClient" + targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" + customArguments: "-b -i '**/copilot/**'" + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/ccs-typescript-sdk.yml@self + parameters: + repoName: 'Agents-M365Copilot/typescript' + packageName: '@microsoft/agents-m365copilot-beta' diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 3cbf74aad..ae4886e92 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,5 +1,5 @@ steps: -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: "9.x" #kiota uses a net9 target @@ -15,9 +15,4 @@ steps: sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net9.0' contents: '**/*' targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy Kiota executable - -- task: PublishBuildArtifacts@1 - inputs: - pathToPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: kiota + displayName: Copy Kiota executable \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/build-and-publish-typewriter.yml b/.azure-pipelines/generation-templates/build-and-publish-typewriter.yml index f18ddb91d..c97daff63 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-typewriter.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-typewriter.yml @@ -1,6 +1,5 @@ steps: -- template: use-dotnet-sdk.yml - +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self - checkout: self displayName: checkout generator fetchDepth: 1 @@ -15,9 +14,4 @@ steps: sourceFolder: '$(Build.SourcesDirectory)/src/Typewriter/bin/$(BuildConfiguration)/net8.0' contents: '**/*' targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy Typewriter executable - -- task: PublishBuildArtifacts@1 - inputs: - pathToPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: typewriter + displayName: Copy Typewriter executable \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/capture-metadata.yml b/.azure-pipelines/generation-templates/capture-metadata.yml index 546761ae4..96637da28 100644 --- a/.azure-pipelines/generation-templates/capture-metadata.yml +++ b/.azure-pipelines/generation-templates/capture-metadata.yml @@ -45,8 +45,8 @@ steps: fetchDepth: 1 persistCredentials: true -- template: checkout-metadata.yml -- template: set-user-config.yml +- template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self +- template: /.azure-pipelines/generation-templates/set-user-config.yml@self # required for TypeSpec - task: UseNode@1 @@ -76,14 +76,10 @@ steps: inputMetadataFile: ${{ parameters.inputMetadata }} enabled: true -- template: download-typewriter.yml - # required for typewriter -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '8.x' - -## Only run if the previous step was successful - pwsh: '$(scriptsDirectory)/run-typewriter-clean-metadata.ps1' env: OutputPath: ${{ parameters.outputPath }} @@ -153,20 +149,11 @@ steps: contents: '**/*' targetFolder: '$(Build.ArtifactStagingDirectory)' displayName: Copy generated metadata - -- task: PublishBuildArtifacts@1 - inputs: - pathToPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: ${{ parameters.cleanMetadataFolder }} - -# Use the clean metadata from the last step to generate DotNet files. - -# required for the hidi installation validation -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '9.x' -- pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 +- pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 displayName: 'Install hidi tool' # verify that generated metadata is parsable as an Edm model diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 2a08868ca..617931c8d 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -1,9 +1,7 @@ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# contains an end to end validation pipeline using C# compilation tests for staging beta metadata - -# capture-metadata.yml will result in the capture and cleaning of the metadata -# with the artifacts posted to GitHub. +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# The following template creates multiple artifacts from a matrix, this is the intended behavior to follow the same workflow before the governance migration +# For more information please refer to: https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/pull/1377#discussion_r2271024012 parameters: - name: 'endpoint' type: string @@ -13,7 +11,6 @@ parameters: default: $(System.ArtifactsDirectory) - name: 'cleanMetadataFolder' type: string - jobs: - job: get_conversion_settings displayName: "Get conversion settings" @@ -23,8 +20,7 @@ jobs: fetchDepth: 1 persistCredentials: true - - template: checkout-metadata.yml - + - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self - pwsh: | $dirPath = "./conversion-settings" $endpoint = "${{ parameters.endpoint }}" @@ -41,10 +37,8 @@ jobs: Write-Host "##vso[task.setvariable variable=targets;isOutput=true]$json" name: setTargets workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata - - script: echo $(setTargets.targets) displayName: "Print settings" - - job: convert_openapi dependsOn: get_conversion_settings displayName: Convert @@ -52,27 +46,30 @@ jobs: matrix: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] variables: targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ] - + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)/$(Name)' + artifactName: '${{ parameters.cleanMetadataFolder }}-$(Name)' steps: - # We only need the scripts - checkout: self displayName: checkout generator fetchDepth: 1 persistCredentials: true - - template: checkout-metadata.yml + - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self # required for the hidi to run - - template: use-dotnet-sdk.yml + - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '8.x' - # required for the hidi installation validation - - template: use-dotnet-sdk.yml +# required for the hidi installation validation + - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '9.x' - - pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 + - pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 displayName: install hidi - pwsh: | @@ -90,14 +87,8 @@ jobs: inputs: sourceFolder: ${{ parameters.outputPath }} contents: '**/$(Name).yaml' - targetFolder: '$(Build.ArtifactStagingDirectory)' + targetFolder: '$(Build.ArtifactStagingDirectory)/$(Name)' displayName: Copy generated metadata - - - task: PublishBuildArtifacts@1 - inputs: - pathToPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: ${{ parameters.cleanMetadataFolder }} - - pwsh: | ./scripts/run-openapi-validation.ps1 -repoDirectory (Get-Location).Path -version "${{ parameters.endpoint }}" -platformName "$(Name)" displayName: ensure that OpenAPI docs can be parsed @@ -107,21 +98,55 @@ jobs: - job: publish_openapi dependsOn: convert_openapi displayName: Publish + ## If there's new settings added please add them here too + templateContext: + inputs: + - input: pipelineArtifact + artifactName: '${{ parameters.cleanMetadataFolder }}-default' + targetPath: '$(Build.SourcesDirectory)/artifacts' + - input: pipelineArtifact + artifactName: '${{ parameters.cleanMetadataFolder }}-graphexplorer' + targetPath: '$(Build.SourcesDirectory)/artifacts' + - input: pipelineArtifact + artifactName: '${{ parameters.cleanMetadataFolder }}-openapi' + targetPath: '$(Build.SourcesDirectory)/artifacts' + - input: pipelineArtifact + artifactName: '${{ parameters.cleanMetadataFolder }}-powershell_v2' + targetPath: '$(Build.SourcesDirectory)/artifacts' + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: ${{ parameters.cleanMetadataFolder }} steps: # We only need the scripts - checkout: self displayName: checkout generator fetchDepth: 1 persistCredentials: true - - - template: checkout-metadata.yml - - template: set-user-config.yml - - task: DownloadPipelineArtifact@2 + # Copy files from the maxtrix artifacts to a single folder + - task: CopyFiles@2 inputs: - path: $(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }} - artifact: ${{ parameters.cleanMetadataFolder }} + sourceFolder: '$(Build.SourcesDirectory)/artifacts' + contents: '**/*.yaml' + targetFolder: '$(Build.ArtifactStagingDirectory)' + displayName: Copy artifact metadata + # Copy files from the target path where artifacts should be downloaded + - task: CopyFiles@2 + inputs: + sourceFolder: '$(Build.ArtifactStagingDirectory)' + contents: '**/*.yaml' + targetFolder: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}' + displayName: Copy downloaded metadata - # Checkin clean metadata into metadata repo or make it an artifact. + # publish metadata as an artifact + - task: CopyFiles@2 + inputs: + sourceFolder: ${{ parameters.outputPath }} + contents: '**/*.yaml' + targetFolder: '$(Build.ArtifactStagingDirectory)' + displayName: Copy downloaded metadata + - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self + - template: /.azure-pipelines/generation-templates/set-user-config.yml@self - pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1' displayName: push clean ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo diff --git a/.azure-pipelines/generation-templates/download-kiota.yml b/.azure-pipelines/generation-templates/download-kiota.yml index 3e34b4e87..3ec33e096 100644 --- a/.azure-pipelines/generation-templates/download-kiota.yml +++ b/.azure-pipelines/generation-templates/download-kiota.yml @@ -1,9 +1,5 @@ +# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. +# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. +# The 'DownloadBuildArtifacts@0' tasks have been converted to inputs within the `templateContext` section of each job. steps: -- task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'kiota' - downloadPath: '$(Build.SourcesDirectory)' - -- bash: chmod +x $(Build.SourcesDirectory)/kiota/kiota +- bash: chmod +x $(Build.SourcesDirectory)/kiota/kiota \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/download-typewriter.yml b/.azure-pipelines/generation-templates/download-typewriter.yml index 3e7960ab3..05e32557c 100644 --- a/.azure-pipelines/generation-templates/download-typewriter.yml +++ b/.azure-pipelines/generation-templates/download-typewriter.yml @@ -1,7 +1,4 @@ -steps: -- task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'typewriter' - downloadPath: '$(Build.SourcesDirectory)' +# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. +# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. +# The 'DownloadBuildArtifacts@0' tasks have been converted to inputs within the `templateContext` section of each job. +steps: [] \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index 2e1ec30ad..aedeb6c82 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -57,11 +57,9 @@ parameters: default: "-e '/copilot' -e '/copilot/**'" steps: -- template: set-up-for-generation-kiota.yml +- template: /.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml@self parameters: cleanMetadataFolder: ${{ parameters.cleanMetadataFolder }} - downloadSteps: - - template: download-kiota.yml - checkout: ${{ parameters.repoName }} displayName: 'checkout ${{ parameters.repoName }}' @@ -89,8 +87,16 @@ steps: RepoDirectory: $(Build.SourcesDirectory)/${{ parameters.repoName }} BranchName: ${{ parameters.branchName }} workingDirectory: ${{ parameters.repoName }} - -- bash: '$(kiotaDirectory)/kiota generate --openapi $(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml --language ${{ parameters.language }} -o $(kiotaDirectory)/output -n ${{ parameters.targetNamespace }} -c ${{ parameters.targetClassName }} ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' +- pwsh: | + Write-Host "=== Files in Kiota Directory ===" + Write-Host "Kiota Directory: $(kiotaDirectory)" + if (Test-Path "$(kiotaDirectory)") { + Get-ChildItem "$(kiotaDirectory)" -Recurse | Format-Table Name, FullName, Length, LastWriteTime -AutoSize + } else { + Write-Warning "Kiota directory not found: $(kiotaDirectory)" + } + displayName: 'List files in Kiota directory' +- pwsh: '& "$(kiotaDirectory)/kiota.exe" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}' env: KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }} diff --git a/.azure-pipelines/generation-templates/language-generation.yml b/.azure-pipelines/generation-templates/language-generation.yml index 0d7aa4757..f172dd678 100644 --- a/.azure-pipelines/generation-templates/language-generation.yml +++ b/.azure-pipelines/generation-templates/language-generation.yml @@ -34,12 +34,9 @@ parameters: displayName: Generate PR after publish changes? steps: -- template: set-up-for-generation.yml +- template: /.azure-pipelines/generation-templates/set-up-for-generation.yml@self parameters: cleanMetadataFolder: ${{ parameters.cleanMetadataFolder }} - downloadSteps: - - template: download-typewriter.yml - - checkout: ${{ parameters.repoName }} displayName: 'checkout ${{ parameters.repoName }}' fetchDepth: 1 @@ -67,7 +64,7 @@ steps: TypewriterExecutable: $(typewriterExecutable) TypewriterDirectory: $(typewriterDirectory) Language: ${{ parameters.language }} - Endpoint: ${{ parameters.version }} + Endpoint: ${{ parameters.version }} displayName: 'Run Typewriter for ${{ parameters.language }} ${{ parameters.version }}' - ${{ parameters.languageSpecificSteps }} diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml index 62b8eb9e5..5b2050d06 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml @@ -1,20 +1,13 @@ parameters: - - name: cleanMetadataFolder - type: string - - name: downloadSteps - type: stepList - default: - - pwsh: | - Write-Error "No download step is provided" +- name: cleanMetadataFolder + type: string steps: -- template: set-user-config.yml -- template: use-dotnet-sdk.yml +- template: /.azure-pipelines/generation-templates/set-user-config.yml@self +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: "9.x" #kiota uses a net9 target -- ${{ parameters.downloadSteps }} - # checkout metadata repo if capture and clean step is skipped - checkout: msgraph-metadata displayName: checkout metadata @@ -30,16 +23,3 @@ steps: Move-Item -Path $(Build.SourcesDirectory)/msgraph-metadata/openapi/beta/openapi.yaml -Destination $(Build.SourcesDirectory)/msgraph-metadata/clean_beta_openapi/ displayName: Move metadata to expected location condition: or(eq(variables.skipMetadataCaptureAndClean, true), eq(variables.skipOpenApiCaptureAndClean, true)) - -# if capture and clean step is not skipped -# then download the artifact from capture and clean steps -# follow the same folder structure as msgraph-metadata repo -# so that metadata reference path is always the same -- task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: ${{ parameters.cleanMetadataFolder }} - downloadPath: '$(Build.SourcesDirectory)/msgraph-metadata' - condition: and(eq(variables.skipMetadataCaptureAndClean, false), eq(variables.skipOpenApiCaptureAndClean, false)) - displayName: Downloading metadata from artifacts diff --git a/.azure-pipelines/generation-templates/set-up-for-generation.yml b/.azure-pipelines/generation-templates/set-up-for-generation.yml index 0cfc4daec..4536f99c3 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation.yml @@ -1,16 +1,10 @@ parameters: - name: cleanMetadataFolder type: string - - name: downloadSteps - type: stepList - default: - - pwsh: | - Write-Error "No download step is provided" steps: -- template: set-user-config.yml -- template: use-dotnet-sdk.yml -- ${{ parameters.downloadSteps }} +- template: /.azure-pipelines/generation-templates/set-user-config.yml@self +- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self # checkout metadata repo if capture and clean step is skipped - checkout: msgraph-metadata @@ -19,16 +13,3 @@ steps: persistCredentials: true submodules: recursive condition: or(eq(variables.skipMetadataCaptureAndClean, true), eq(variables.skipOpenApiCaptureAndClean, true)) - -# if capture and clean step is not skipped -# then download the artifact from capture and clean steps -# follow the same folder structure as msgraph-metadata repo -# so that metadata reference path is always the same -- task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: ${{ parameters.cleanMetadataFolder }} - downloadPath: '$(Build.SourcesDirectory)/msgraph-metadata' - condition: and(eq(variables.skipMetadataCaptureAndClean, false), eq(variables.skipOpenApiCaptureAndClean, false)) - displayName: Downloading metadata from artifacts diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 625d1eef1..7a6aac7e4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,7 +46,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: submodules: recursive diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 208edc3a8..b060ce79c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,11 +12,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: recursive - name: Setup .NET - uses: actions/setup-dotnet@v4.3.1 + uses: actions/setup-dotnet@v5.0.0 with: dotnet-version: 8.0.x - name: Restore dependencies diff --git a/scripts/create-pull-request.ps1 b/scripts/create-pull-request.ps1 index 3478a084a..6b4571f30 100644 --- a/scripts/create-pull-request.ps1 +++ b/scripts/create-pull-request.ps1 @@ -9,8 +9,16 @@ if (($env:GeneratePullRequest -eq $False)) { # Skip CI if manually running this return; } +# Special case for beta typings as it uses a non-conforming preview versioning. +if ($env:RepoName.Contains("msgraph-beta-typescript-typings")) +{ + $title = "feat: generated $version models and request builders" +} +else { + $title = "Generated $version models and request builders" +} + $version = $env:Version -$title = "Generated $version models and request builders" $body = ":bangbang:**_Important_**:bangbang:
Check for unexpected deletions or changes in this PR and ensure relevant CI checks are passing.

**Note:** This pull request was automatically created by Azure pipelines." $baseBranchParameter = "" diff --git a/submodules/vipr b/submodules/vipr index c5c220440..0921e5504 160000 --- a/submodules/vipr +++ b/submodules/vipr @@ -1 +1 @@ -Subproject commit c5c2204400b27503a3b9fb75a36b5a3cf9ed90f0 +Subproject commit 0921e550479b18d11ccccc4f21ce4c72c8170b9b From cf29a38057e14413bd2ec66c809d2adb5e849f79 Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Mon, 6 Oct 2025 14:05:28 -0700 Subject: [PATCH 41/75] =?UTF-8?q?ci:=20change=20gen=20cron=20to=20run=20ev?= =?UTF-8?q?ery=20two=20weeks=20on=20the=20first=20and=20third=20Tue?= =?UTF-8?q?=E2=80=A6=20(#1390)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: change gen cron to run every two weeks on the first and third Tuesday of each month --- .azure-pipelines/generation-pipeline.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 0d396af41..c377407b3 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -3,8 +3,15 @@ trigger: none pr: none schedules: -- cron: '0 10 * * TUE' - displayName: Tuesday generation (PST 2am, EST 5am, EAT 3pm) + +# Minute: 0 → At the start of the hour. +# Hour: 10 → 10:00 AM UTC. +# Day of Month: 1-7,15-21 → On the 1st–7th and 15th–21st. +# Month: * → Every month. +# Weekday: TUE → Only on Tuesdays. +# This cron will run bi-weekly unless the month has 5 Tuesdays, in which case it will skip the 5th Tuesday (won't be bi-weekly that month). +- cron: '0 10 1-7,15-21 * TUE' + displayName: Bi-weekly Tuesday generation (1st and 3rd Tuesday, PST 2am, EST 5am, EAT 3pm) branches: include: - main From db8582d399ab1749b8abc7d21185e6eb901961d1 Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:02:08 -0700 Subject: [PATCH 42/75] ci: fix broken OpenAPI generation (#1392) * ci: fix broken OpenAPI generation * ci: add PR for OpenAPI files * docs: clarify comments * Update scripts/git-push-cleanmetadata.ps1 * ci: clarify use of version when creating PR * ci: remove display name from template use * ci update logging * ci: correct the copyfile overwrite parameter * ci: add approval step for OpenAPI before running Kiota generation * ci: update env var name * ci: typings gen does not use open_api * ci: name branch using endpointversion, add clarity for host output * ci: update for supporting builds * ci: add PR title for OpenAPI PRs * ci: add beta openapi approval step --- .azure-pipelines/generation-pipeline.yml | 46 +++++++++++ .../generation-templates/capture-metadata.yml | 4 +- .../generation-templates/capture-openapi.yml | 80 +++++++++++++------ .../generation-templates/use-dotnet-sdk.yml | 2 +- scripts/create-pull-request.ps1 | 19 +++-- scripts/generate-open-api.ps1 | 19 +++-- scripts/git-push-cleanmetadata.ps1 | 80 ++++++++++++++++--- 7 files changed, 196 insertions(+), 54 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index c377407b3..46e179ea7 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -298,10 +298,45 @@ extends: outputPath: $(cleanOpenAPIFileBetaOutputPath) cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + # Approval stage for v1 OpenAPI generation. All subsequent stages depending on OpenAPI generation + # will be blocked until approval is granted. Any new stages depending on OpenAPI generation + # should also depend on this approval stage. + - stage: open_api_v1_approval + dependsOn: + - stage_v1_openapi + condition: eq(dependencies.stage_v1_openapi.result, 'Succeeded') + jobs: + - deployment: OpenApiApproval + displayName: 'OpenAPI v1.0 Generation Review' + environment: 'openapi-generation-review' + strategy: + runOnce: + deploy: + steps: + - script: echo "OpenAPI generation approved." + + # Approval stage for beta OpenAPI generation. All subsequent stages depending on OpenAPI generation + # will be blocked until approval is granted. Any new stages depending on OpenAPI generation + # should also depend on this approval stage. + - stage: open_api_beta_approval + dependsOn: + - stage_beta_openapi + condition: eq(dependencies.stage_beta_openapi.result, 'Succeeded') + jobs: + - deployment: OpenApiApproval + displayName: 'OpenAPI Beta Generation Review' + environment: 'openapi-generation-review' + strategy: + runOnce: + deploy: + steps: + - script: echo "OpenAPI generation approved." + - stage: stage_csharp_v1_kiota dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( @@ -343,6 +378,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( @@ -384,6 +420,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( @@ -423,6 +460,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( @@ -462,6 +500,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( @@ -503,6 +542,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( @@ -544,6 +584,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( @@ -585,6 +626,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( @@ -700,6 +742,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( @@ -742,6 +785,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( @@ -784,6 +828,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( @@ -824,6 +869,7 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( diff --git a/.azure-pipelines/generation-templates/capture-metadata.yml b/.azure-pipelines/generation-templates/capture-metadata.yml index 96637da28..4a6fb2377 100644 --- a/.azure-pipelines/generation-templates/capture-metadata.yml +++ b/.azure-pipelines/generation-templates/capture-metadata.yml @@ -166,9 +166,9 @@ steps: # Checkin clean metadata into metadata repo or make it an artifact. - pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1' - - displayName: push clean ${{ parameters.endpoint }} metadata to msgraph-metadata repo + displayName: push clean ${{ parameters.endpoint }} CSDL metadata to msgraph-metadata repo env: + CreateOpenAPIPR: False EndpointVersion: ${{ parameters.endpoint }} PublishChanges: $(publishChanges) workingDirectory: '$(Build.SourcesDirectory)/msgraph-metadata' diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 617931c8d..499723f06 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -1,3 +1,4 @@ +# capture-openapi.yml # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # The following template creates multiple artifacts from a matrix, this is the intended behavior to follow the same workflow before the governance migration @@ -21,6 +22,7 @@ jobs: persistCredentials: true - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self + - pwsh: | $dirPath = "./conversion-settings" $endpoint = "${{ parameters.endpoint }}" @@ -37,8 +39,10 @@ jobs: Write-Host "##vso[task.setvariable variable=targets;isOutput=true]$json" name: setTargets workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata + - script: echo $(setTargets.targets) displayName: "Print settings" + - job: convert_openapi dependsOn: get_conversion_settings displayName: Convert @@ -58,13 +62,12 @@ jobs: persistCredentials: true - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self - # required for the hidi to run - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '8.x' -# required for the hidi installation validation + # required for the hidi installation validation - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: version: '9.x' @@ -78,8 +81,13 @@ jobs: displayName: ensure the generation happens from master latest workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata - - pwsh: '$(scriptsDirectory)/generate-open-api.ps1 -endpointVersion ${{ parameters.endpoint }} -settings "$(conversionSettingsDirectory)/$(File)" -platformName "$(Name)"' - displayName: 'update ${{ parameters.endpoint }} open API description' + - pwsh: | + Write-Host "`ngit status before generation:" + git status + $(scriptsDirectory)/generate-open-api.ps1 -endpointVersion ${{ parameters.endpoint }} -settings "$(conversionSettingsDirectory)/$(File)" -platformName "$(Name)" + Write-Host "`ngit status after generation:" + git status + displayName: 'generate ${{ parameters.endpoint }} open API description' workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata # publish metadata as an artifact @@ -88,16 +96,16 @@ jobs: sourceFolder: ${{ parameters.outputPath }} contents: '**/$(Name).yaml' targetFolder: '$(Build.ArtifactStagingDirectory)/$(Name)' - displayName: Copy generated metadata + displayName: Copy generated OpenAPI yaml file to ArtifactStagingDirectory + - pwsh: | ./scripts/run-openapi-validation.ps1 -repoDirectory (Get-Location).Path -version "${{ parameters.endpoint }}" -platformName "$(Name)" - displayName: ensure that OpenAPI docs can be parsed + displayName: Validate that OpenAPI docs can be parsed workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata - - job: publish_openapi dependsOn: convert_openapi - displayName: Publish + displayName: Publish OpenAPI files ## If there's new settings added please add them here too templateContext: inputs: @@ -123,35 +131,61 @@ jobs: displayName: checkout generator fetchDepth: 1 persistCredentials: true - # Copy files from the maxtrix artifacts to a single folder + + # Note that msgraph-metadata repo has detached HEAD + - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self + + - template: /.azure-pipelines/generation-templates/set-user-config.yml@self + + # Copy OpenAPI files from the matrix artifacts to the ArtifactStagingDirectory + # This is used for library generation later - task: CopyFiles@2 inputs: sourceFolder: '$(Build.SourcesDirectory)/artifacts' contents: '**/*.yaml' targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy artifact metadata - # Copy files from the target path where artifacts should be downloaded + displayName: Copy OpenAPI input artifacts to artifact staging directory + + # Copy OpenAPI files from ArtifactStagingDirectory to local msgraph-metadata repo - task: CopyFiles@2 inputs: sourceFolder: '$(Build.ArtifactStagingDirectory)' contents: '**/*.yaml' targetFolder: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}' - displayName: Copy downloaded metadata + overwrite: true + displayName: Copy OpenAPI files to local msgraph-metadata repo - # publish metadata as an artifact - - task: CopyFiles@2 - inputs: - sourceFolder: ${{ parameters.outputPath }} - contents: '**/*.yaml' - targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy downloaded metadata - - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self - - template: /.azure-pipelines/generation-templates/set-user-config.yml@self + # Push changes to msgraph-metadata repo - pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1' - - displayName: push clean ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo + displayName: Publish ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo env: + CreateOpenAPIPR: True EndpointVersion: ${{ parameters.endpoint }} PublishChanges: $(publishChanges) workingDirectory: '$(Build.SourcesDirectory)/msgraph-metadata' enabled: true + + + # Create PR - note that this PR is not used for gating. It's just for discovery purposes. + # Library generation PRs will still be created based on the OpenAPI files. + + - task: AzureKeyVault@2 + displayName: "Azure Key Vault: Get Secrets" + inputs: + azureSubscription: "Federated AKV Managed Identity Connection" + KeyVaultName: akv-prod-eastus + SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" + + - pwsh: '$(scriptsDirectory)/create-pull-request.ps1' + displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' + env: + BaseBranch: master + GeneratePullRequest: true + GhAppId: $(microsoft-graph-devx-bot-appid) + GhAppKey: $(microsoft-graph-devx-bot-privatekey) + OverrideSkipCI: false + RepoName: 'microsoftgraph/msgraph-metadata' + ScriptsDirectory: $(scriptsDirectory) + # Version is intentionally left empty for OpenAPI PRs as versioning is not applicable in this context. + Version: '' + workingDirectory: '$(Build.SourcesDirectory)/msgraph-metadata' \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/use-dotnet-sdk.yml b/.azure-pipelines/generation-templates/use-dotnet-sdk.yml index 24246b344..700958ae7 100644 --- a/.azure-pipelines/generation-templates/use-dotnet-sdk.yml +++ b/.azure-pipelines/generation-templates/use-dotnet-sdk.yml @@ -5,7 +5,7 @@ parameters: steps: - task: UseDotNet@2 - displayName: 'Use .NET SDK' + displayName: 'Use .NET SDK ${{ parameters.version }}' inputs: packageType: sdk version: ${{ parameters.version }} diff --git a/scripts/create-pull-request.ps1 b/scripts/create-pull-request.ps1 index 6b4571f30..d8932c341 100644 --- a/scripts/create-pull-request.ps1 +++ b/scripts/create-pull-request.ps1 @@ -1,24 +1,27 @@ if (($env:OverrideSkipCI -eq $False) -and ($env:BUILD_REASON -eq 'Manual')) # Skip CI if manually running this pipeline. { - Write-Host "Skipping pull request creation due Skip CI." -ForegroundColor Green + Write-Host "Skipping pull request creation due Skip CI." return; } if (($env:GeneratePullRequest -eq $False)) { # Skip CI if manually running this pipeline. - Write-Host "Skipping pull request creation due this repository being disabled" -ForegroundColor Green + Write-Host "Skipping pull request creation due this repository being disabled" return; } -# Special case for beta typings as it uses a non-conforming preview versioning. +# Special case for beta typings as it uses a non-conforming preview versioning. Helps with triggering Release Please. if ($env:RepoName.Contains("msgraph-beta-typescript-typings")) { - $title = "feat: generated $version models and request builders" + $title = "feat: generated $env:Version models and request builders" +} +elseif ($env:RepoName.Contains("msgraph-metadata")) # we are only generating OpenAPI PRs for the metadata repo +{ + $title = "Generated $env:Version OpenAPI descriptions" } else { - $title = "Generated $version models and request builders" + $title = "Generated $env:Version models and request builders" } -$version = $env:Version $body = ":bangbang:**_Important_**:bangbang:
Check for unexpected deletions or changes in this PR and ensure relevant CI checks are passing.

**Note:** This pull request was automatically created by Azure pipelines." $baseBranchParameter = "" @@ -30,10 +33,10 @@ if (![string]::IsNullOrEmpty($env:BaseBranch)) # The installed application is required to have the following permissions: read/write on pull requests/ $tokenGenerationScript = "$env:ScriptsDirectory\Generate-Github-Token.ps1" $env:GITHUB_TOKEN = & $tokenGenerationScript -AppClientId $env:GhAppId -AppPrivateKeyContents $env:GhAppKey -Repository $env:RepoName -Write-Host "Fetched Github Token for PR generation and set as environment variable." -ForegroundColor Green +Write-Host "Fetched Github Token for PR generation and set as environment variable." # No need to specify reviewers as code owners should be added automatically. Invoke-Expression "gh auth login" # login to GitHub Invoke-Expression "gh pr create -t ""$title"" -b ""$body"" $baseBranchParameter | Write-Host" -Write-Host "Pull Request Created successfully." -ForegroundColor Green \ No newline at end of file +Write-Host "Pull Request Created successfully." \ No newline at end of file diff --git a/scripts/generate-open-api.ps1 b/scripts/generate-open-api.ps1 index a3634f115..1788e484b 100644 --- a/scripts/generate-open-api.ps1 +++ b/scripts/generate-open-api.ps1 @@ -21,6 +21,8 @@ param( [parameter(Mandatory = $true)][String]$platformName ) +Write-Host "Starting $endpointVersion OpenAPI generation for $platformName using generate-open-api.ps1" + $outputFile = Join-Path "./" "openapi" $endpointVersion "$platformName.yaml" $oldOutputFile = "$outputFile.old" $cleanVersion = $endpointVersion.Replace(".", "") @@ -34,16 +36,16 @@ if($platformName -eq "openapi") $fileName = "$baseFileName$endpointVersion.xml"; $inputFile = Join-Path "./" "clean_$($cleanVersion)_metadata" "$fileName" -Write-Host "Settings: $settings" -Write-Verbose "Generating OpenAPI description from $inputFile" -Write-Verbose "Output file: $outputFile" +Write-Host "`nSettings: $settings" +Write-Host "Generating OpenAPI description from $inputFile" +Write-Host "Output file: $outputFile" if(Test-Path $outputFile) { - Write-Verbose "Removing existing output file" + Write-Host "`nRemoving existing output file" if(Test-Path $oldOutputFile) { - Write-Verbose "Removing existing old output file" + Write-Host "Removing existing old output file: $oldOutputFile" Remove-Item $oldOutputFile -Force } $oldFileName = Split-Path $outputFile -leaf @@ -51,6 +53,7 @@ if(Test-Path $outputFile) Rename-Item $outputFile $oldFileName } +Write-Host "`nGenerating OpenAPI description using hidi..." $command = "hidi transform --csdl ""$inputFile"" --output ""$outputFile"" --settings-path ""$settings"" --version ""3.0"" --metadata-version ""$endpointVersion"" --log-level Information --format yaml" Write-Host $command @@ -62,16 +65,18 @@ try { Set-Content $outputFile $updatedContent -NoNewline if(Test-Path $oldOutputFile) { - Write-Verbose "Removing existing old output file" + Write-Host "`nRemoving existing old output file: $oldOutputFile" Remove-Item $oldOutputFile -Force } + Write-Host "Completed generating OpenAPI description using hidi" } catch { if(Test-Path $oldOutputFile) { - Write-Warning "Restoring old output file" + Write-Host "`nRestoring old output file: $oldOutputFile" $originalFileName = Split-Path $outputFile -leaf Rename-Item $oldOutputFile $originalFileName } Write-Error "Error generating OpenAPI description: $_" throw $_ } + diff --git a/scripts/git-push-cleanmetadata.ps1 b/scripts/git-push-cleanmetadata.ps1 index cd33e51b1..a580d8a89 100644 --- a/scripts/git-push-cleanmetadata.ps1 +++ b/scripts/git-push-cleanmetadata.ps1 @@ -1,31 +1,85 @@ +# git-push-cleanmetadata.ps1 +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the +# project root for license information. + +# Referenced by: +# capture-metadata.yml +# capture-openapi.yml + +# This script stashes any changes, checks out the latest master branch, applies the stashed changes, commits, and +# pushes the changes back to the remote repository. + if ($env:PublishChanges -eq $False) { - Write-Host "Not publishing changes per the run parameter!" -ForegroundColor Green + Write-Host "Not publishing changes per the run parameter!" return; } -Write-Host "About to add clean $env:EndpointVersion metadata file....." +Write-Host "`n1. git status:" +git status | Write-Host -git fetch origin master +Write-Host "`n2. Stash the update metadata files.....`n3. Running: git stash" +git stash | Write-Host + +Write-Host "`n4. Fetching latest master branch to ensure we are up to date..." +git fetch origin master | Write-Host # checkout master to move from detached HEAD mode -git switch master +git switch master | Write-Host + + + +Write-Host "`n5. git status:" +git status | Write-Host + +Write-Host "`n6. Apply stashed metadata files...`n7. Running: git stash pop" +git stash pop | Write-Host + +Write-Host "`n8. git status:" +git status | Write-Host + +$branch = "publish-open-api-files/$env:BUILD_BUILDID/$env:EndpointVersion" +if ($env:CreateOpenAPIPR -eq $True) +{ + Write-Host "`n9. Create branch: $branch" + git checkout -B $branch | Write-Host +} + +Write-Host "`n10. Staging clean $env:EndpointVersion metadata files.....`n11. Running: git add ." git add . | Write-Host + +Write-Host "`n12. git status:" +git status | Write-Host + +Write-Host "`n13. Attempting to commit clean $env:EndpointVersion metadata files....." + if ($env:BUILD_REASON -eq 'Manual') # Skip CI if manually running this pipeline. { - git commit -m "Update clean metadata file with $env:BUILD_BUILDID [skip ci]" | Write-Host + git commit -m "Update clean $env:EndpointVersion metadata file with $env:BUILD_BUILDID [skip ci]" | Write-Host } else { - git commit -m "Update clean metadata file with $env:BUILD_BUILDID" | Write-Host + git commit -m "Update clean $env:EndpointVersion metadata file with $env:BUILD_BUILDID" | Write-Host } -Write-Host "Added and commited cleaned $env:EndpointVersion metadata." -ForegroundColor Green +Write-Host "`n14. git status:" +git status | Write-Host + +if ($env:CreateOpenAPIPR -eq $True) +{ + Write-Host "`n15a. Pushing branch for PR creation" -# sync branch before pushing -# this is especially important while running v1 and beta in parallel -# and one process goes out of sync because of the other's check-in -git pull origin master --rebase + Write-Host "`n15b. Running: git push --set-upstream origin $branch" + git push --set-upstream origin $branch | Write-Host +} +else # original behavior: push to master +{ + Write-Host "`n15c. Running: git pull origin master --rebase..." + # sync branch before pushing + # this is especially important while running v1 and beta in parallel + # and one process goes out of sync because of the other's check-in + git pull origin master --rebase | Write-Host -git push --set-upstream origin master | Write-Host -Write-Host "Pushed the results of the build $env:BUILD_BUILDID to the master branch." -ForegroundColor Green \ No newline at end of file + Write-Host "`n15d. Running: git push --set-upstream origin master ..." + git push --set-upstream origin master | Write-Host +} \ No newline at end of file From f807a1be84cfe173641ac42a7009d3ffbc152c27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 22:31:03 +0000 Subject: [PATCH 43/75] chore(deps): bump github/codeql-action from 3 to 4 (#1391) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v3...v4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> --- .github/workflows/codeql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7a6aac7e4..f1882995e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -52,7 +52,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -66,7 +66,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v4 with: working-directory: ${{ github.workspace }}/src/Typewriter @@ -81,6 +81,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 with: category: "/language:${{matrix.language}}" From 7ec88032e79c12e831d2394376ef39e8aab3f94f Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Fri, 24 Oct 2025 12:14:33 -0700 Subject: [PATCH 44/75] Merge dev into main (#1380) (#1394) * Generation pipeline migration to 1ES * fixing param issue * adding missing repo * Fix template issues * duplication error * removing download steps * sdl analysis * excluding repos * changing typewriter targetPath * changing download path * adding typewriter to the target path * Fixing openAPI outputPath * fixing output path * test run * changing target path * testing change * multiple artifacts * testing copy files * hardcoding downloaded artifacts * testing copy files * Fixing copy files * Attempting to fix kiota dir issue * Testing downloaded paths * moving from bash to powershell * changing targetPath * adding template context * adding kiota repo to scan * reverting back change * reverting back copyright comments * adding comments * adding comment space * chore: update Python copilot agent library generation dir (#1379) * chore(deps): bump submodules/vipr from `c5c2204` to `39c1ee7` (#1378) Bumps [submodules/vipr](https://github.com/microsoft/vipr) from `c5c2204` to `39c1ee7`. - [Release notes](https://github.com/microsoft/vipr/releases) - [Commits](https://github.com/microsoft/vipr/compare/c5c2204400b27503a3b9fb75a36b5a3cf9ed90f0...39c1ee7affbd5567511890ddff5edb6c721ee1c7) --- updated-dependencies: - dependency-name: submodules/vipr dependency-version: 39c1ee7affbd5567511890ddff5edb6c721ee1c7 dependency-type: direct:production ... * chore(deps): bump actions/checkout from 4 to 5 (#1376) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... * chore(deps): bump actions/setup-dotnet from 4.3.1 to 5.0.0 (#1381) Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.3.1 to 5.0.0. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v4.3.1...v5.0.0) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... * dep: update vipr dependency (#1383) * chore: fix path to beta python ccs (#1382) * ci: update script to special case for beta typing versioning (#1384) --------- Signed-off-by: dependabot[bot] Co-authored-by: Adrian Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .azure-pipelines/generation-templates/capture-openapi.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 499723f06..79218a552 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -22,7 +22,6 @@ jobs: persistCredentials: true - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self - - pwsh: | $dirPath = "./conversion-settings" $endpoint = "${{ parameters.endpoint }}" @@ -39,10 +38,8 @@ jobs: Write-Host "##vso[task.setvariable variable=targets;isOutput=true]$json" name: setTargets workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata - - script: echo $(setTargets.targets) displayName: "Print settings" - - job: convert_openapi dependsOn: get_conversion_settings displayName: Convert From 81a92e2e97556d88f19e66d4f70eb45afc68452e Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Fri, 24 Oct 2025 13:22:55 -0700 Subject: [PATCH 45/75] ci: added conditions for stages --- .azure-pipelines/generation-pipeline.yml | 26 ++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 46e179ea7..787ef9776 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -341,6 +341,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -383,6 +384,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -425,6 +427,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -465,6 +468,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -505,6 +509,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -547,6 +552,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -589,6 +595,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -631,6 +638,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -672,6 +680,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped') ) jobs: @@ -709,6 +718,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped') ) jobs: @@ -747,6 +757,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -790,6 +801,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -833,6 +845,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -874,6 +887,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -906,7 +920,7 @@ extends: parameters: repoName: msgraph-beta-sdk-python baseDirectory: msgraph_beta - - stage: stage_ccs_csharp_beta + - stage: stage_agents_m365copilot_csharp_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -917,7 +931,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: csharp_beta_ccs + - job: csharp_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact @@ -949,7 +963,7 @@ extends: parameters: repoName: 'Agents-M365Copilot/dotnet' packageName: Microsoft.Agents.M365Copilot.Beta - - stage: stage_ccs_python_beta + - stage: stage_agents_m365copilot_python_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -960,7 +974,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: python_beta_ccs + - job: python_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact @@ -992,7 +1006,7 @@ extends: parameters: repoName: 'Agents-M365Copilot/python/packages' baseDirectory: microsoft_agents_m365copilot_beta/microsoft_agents_m365copilot_beta - - stage: stage_ccs_typescript_beta + - stage: stage_agents_m365copilot_typescript_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -1003,7 +1017,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: typescript_beta_ccs + - job: typescript_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact From a20dc9ee10000b588794090a0db4a4159b9801f3 Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Tue, 28 Oct 2025 16:46:42 -0700 Subject: [PATCH 46/75] ci: setup stage for v1 copilot sdk (#1396) * ci: move php beta after v1 * ci: add generation stage for v1 copilot * ci: add version name for better PR info --- .azure-pipelines/generation-pipeline.yml | 104 +++++++++++++++++------ 1 file changed, 76 insertions(+), 28 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 787ef9776..6000b3f6a 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -586,27 +586,28 @@ extends: parameters: repoName: msgraph-beta-sdk-java namespacePath: com/microsoft/graph/beta - - stage: stage_php_beta_kiota + + - stage: stage_php_v1_kiota dependsOn: - stage_build_and_publish_kiota - - stage_beta_openapi - - open_api_beta_approval + - stage_v1_openapi + - open_api_v1_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - eq(dependencies.open_api_beta_approval.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: php_beta_kiota + - job: php_v1_kiota templateContext: inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -615,41 +616,41 @@ extends: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' - version: 'beta' - repoName: 'msgraph-beta-sdk-php' - branchName: 'kiota/$(betaBranch)' + version: '' + repoName: 'msgraph-sdk-php' + branchName: 'kiota/$(v1Branch)' targetClassName: "BaseGraphClient" - targetNamespace: 'Microsoft\\Graph\\Beta\\Generated' + targetNamespace: 'Microsoft\\Graph\\Generated' baseBranchName: 'main' commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - template: /.azure-pipelines/generation-templates/php-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-php + repoName: msgraph-sdk-php customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - - stage: stage_php_v1_kiota + - stage: stage_php_beta_kiota dependsOn: - stage_build_and_publish_kiota - - stage_v1_openapi - - open_api_v1_approval + - stage_beta_openapi + - open_api_beta_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - eq(dependencies.open_api_v1_approval.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: php_v1_kiota + - job: php_beta_kiota templateContext: inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -658,18 +659,18 @@ extends: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' - version: '' - repoName: 'msgraph-sdk-php' - branchName: 'kiota/$(v1Branch)' + version: 'beta' + repoName: 'msgraph-beta-sdk-php' + branchName: 'kiota/$(betaBranch)' targetClassName: "BaseGraphClient" - targetNamespace: 'Microsoft\\Graph\\Generated' + targetNamespace: 'Microsoft\\Graph\\Beta\\Generated' baseBranchName: 'main' commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderV1) + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - template: /.azure-pipelines/generation-templates/php-kiota.yml@self parameters: - repoName: msgraph-sdk-php + repoName: msgraph-beta-sdk-php customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - stage: stage_typescript_v1 @@ -878,6 +879,7 @@ extends: parameters: repoName: msgraph-sdk-python baseDirectory: msgraph + - stage: stage_python_beta dependsOn: - stage_build_and_publish_kiota @@ -920,6 +922,51 @@ extends: parameters: repoName: msgraph-beta-sdk-python baseDirectory: msgraph_beta + + - stage: stage_agents_m365copilot_csharp_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_v1_agents_m365copilot + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'csharp' + version: 'v1' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-dotnet/$(v1Branch)' + targetClassName: "BaseAgentsM365CopilotServiceClient" + targetNamespace: "Microsoft.Agents.M365Copilot" + commitMessagePrefix: "feat(generation): update request builders and models for dotnet v1" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self + parameters: + repoName: 'Agents-M365Copilot/dotnet' + packageName: Microsoft.Agents.M365Copilot + - stage: stage_agents_m365copilot_csharp_beta dependsOn: - stage_build_and_publish_kiota @@ -963,6 +1010,7 @@ extends: parameters: repoName: 'Agents-M365Copilot/dotnet' packageName: Microsoft.Agents.M365Copilot.Beta + - stage: stage_agents_m365copilot_python_beta dependsOn: - stage_build_and_publish_kiota From 071ef40ad726cea894344406c5ccb406e34fafb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 23:49:27 +0000 Subject: [PATCH 47/75] chore(deps): bump actions/upload-artifact from 4 to 5 (#1397) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b060ce79c..1f0e31332 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,13 +26,13 @@ jobs: - name: Test run: dotnet test ./Typewriter.sln --no-build --verbosity normal - name: Upload languages test output on failure - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: ${{ failure() }} with: name: languages-test-output path: 'test/Typewriter.Test/bin/Debug/net8.0/OutputDirectory*/**' - name: Upload unit test output on failure - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: ${{ failure() }} with: name: unit-test-output From 725f160a1078301acca30b90f7e63ad22b197dab Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Tue, 28 Oct 2025 16:53:35 -0700 Subject: [PATCH 48/75] ci: add workflow for generating copilot sdk v1 (#1398) * ci: added conditions for stages * ci: setup stage for v1 copilot sdk (#1396) * ci: move php beta after v1 * ci: add generation stage for v1 copilot * ci: add version name for better PR info * chore(deps): bump actions/upload-artifact from 4 to 5 (#1397) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .azure-pipelines/generation-pipeline.yml | 126 +++++++++++++++++------ .github/workflows/dotnet.yml | 4 +- 2 files changed, 96 insertions(+), 34 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 46e179ea7..6000b3f6a 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -341,6 +341,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -383,6 +384,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -425,6 +427,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -465,6 +468,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -505,6 +509,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -547,6 +552,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -580,26 +586,28 @@ extends: parameters: repoName: msgraph-beta-sdk-java namespacePath: com/microsoft/graph/beta - - stage: stage_php_beta_kiota + + - stage: stage_php_v1_kiota dependsOn: - stage_build_and_publish_kiota - - stage_beta_openapi - - open_api_beta_approval + - stage_v1_openapi + - open_api_v1_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: php_beta_kiota + - job: php_v1_kiota templateContext: inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -608,40 +616,41 @@ extends: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' - version: 'beta' - repoName: 'msgraph-beta-sdk-php' - branchName: 'kiota/$(betaBranch)' + version: '' + repoName: 'msgraph-sdk-php' + branchName: 'kiota/$(v1Branch)' targetClassName: "BaseGraphClient" - targetNamespace: 'Microsoft\\Graph\\Beta\\Generated' + targetNamespace: 'Microsoft\\Graph\\Generated' baseBranchName: 'main' commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - template: /.azure-pipelines/generation-templates/php-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-php + repoName: msgraph-sdk-php customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - - stage: stage_php_v1_kiota + - stage: stage_php_beta_kiota dependsOn: - stage_build_and_publish_kiota - - stage_v1_openapi - - open_api_v1_approval + - stage_beta_openapi + - open_api_beta_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: php_v1_kiota + - job: php_beta_kiota templateContext: inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -650,18 +659,18 @@ extends: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' - version: '' - repoName: 'msgraph-sdk-php' - branchName: 'kiota/$(v1Branch)' + version: 'beta' + repoName: 'msgraph-beta-sdk-php' + branchName: 'kiota/$(betaBranch)' targetClassName: "BaseGraphClient" - targetNamespace: 'Microsoft\\Graph\\Generated' + targetNamespace: 'Microsoft\\Graph\\Beta\\Generated' baseBranchName: 'main' commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderV1) + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - template: /.azure-pipelines/generation-templates/php-kiota.yml@self parameters: - repoName: msgraph-sdk-php + repoName: msgraph-beta-sdk-php customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - stage: stage_typescript_v1 @@ -672,6 +681,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped') ) jobs: @@ -709,6 +719,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped') ) jobs: @@ -747,6 +758,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -790,6 +802,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -833,6 +846,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -865,6 +879,7 @@ extends: parameters: repoName: msgraph-sdk-python baseDirectory: msgraph + - stage: stage_python_beta dependsOn: - stage_build_and_publish_kiota @@ -874,6 +889,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -906,7 +922,52 @@ extends: parameters: repoName: msgraph-beta-sdk-python baseDirectory: msgraph_beta - - stage: stage_ccs_csharp_beta + + - stage: stage_agents_m365copilot_csharp_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_v1_agents_m365copilot + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'csharp' + version: 'v1' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-dotnet/$(v1Branch)' + targetClassName: "BaseAgentsM365CopilotServiceClient" + targetNamespace: "Microsoft.Agents.M365Copilot" + commitMessagePrefix: "feat(generation): update request builders and models for dotnet v1" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self + parameters: + repoName: 'Agents-M365Copilot/dotnet' + packageName: Microsoft.Agents.M365Copilot + + - stage: stage_agents_m365copilot_csharp_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -917,7 +978,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: csharp_beta_ccs + - job: csharp_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact @@ -949,7 +1010,8 @@ extends: parameters: repoName: 'Agents-M365Copilot/dotnet' packageName: Microsoft.Agents.M365Copilot.Beta - - stage: stage_ccs_python_beta + + - stage: stage_agents_m365copilot_python_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -960,7 +1022,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: python_beta_ccs + - job: python_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact @@ -992,7 +1054,7 @@ extends: parameters: repoName: 'Agents-M365Copilot/python/packages' baseDirectory: microsoft_agents_m365copilot_beta/microsoft_agents_m365copilot_beta - - stage: stage_ccs_typescript_beta + - stage: stage_agents_m365copilot_typescript_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -1003,7 +1065,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: typescript_beta_ccs + - job: typescript_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b060ce79c..1f0e31332 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,13 +26,13 @@ jobs: - name: Test run: dotnet test ./Typewriter.sln --no-build --verbosity normal - name: Upload languages test output on failure - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: ${{ failure() }} with: name: languages-test-output path: 'test/Typewriter.Test/bin/Debug/net8.0/OutputDirectory*/**' - name: Upload unit test output on failure - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: ${{ failure() }} with: name: unit-test-output From a13eb38de95d17abc98a5d0f4b57d48ccf8f501e Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 29 Oct 2025 13:32:20 -0700 Subject: [PATCH 49/75] ci: add workflow for generating typescript and python v1 copilot libs --- .azure-pipelines/generation-pipeline.yml | 89 ++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 6000b3f6a..95ad2a5e6 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -1011,6 +1011,50 @@ extends: repoName: 'Agents-M365Copilot/dotnet' packageName: Microsoft.Agents.M365Copilot.Beta + - stage: stage_agents_m365copilot_python_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: python_v1_agents_m365copilot + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'python' + version: 'v1' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-python/$(v1Branch)' + targetClassName: "BaseAgentsM365CopilotServiceClient" + targetNamespace: "microsoft_agents_m365copilot.generated" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + commitMessagePrefix: "feat(generation): update request builders and models for python v1" + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/python.yml@self + parameters: + repoName: 'Agents-M365Copilot/python/packages' + baseDirectory: microsoft_agents_m365copilot/microsoft_agents_m365copilot + - stage: stage_agents_m365copilot_python_beta dependsOn: - stage_build_and_publish_kiota @@ -1054,6 +1098,51 @@ extends: parameters: repoName: 'Agents-M365Copilot/python/packages' baseDirectory: microsoft_agents_m365copilot_beta/microsoft_agents_m365copilot_beta + + - stage: stage_agents_m365copilot_typescript_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_beta_agents_m365copilot + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'typescript' + version: 'beta' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-typescript/$(v1Branch)' + commitMessagePrefix: "feat(generation): update request builders and models for typescript v1" + targetClassName: "BaseAgentsM365CopilotServiceClient" + targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" + customArguments: "-b -i '**/copilot/**'" + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/ccs-typescript-sdk.yml@self + parameters: + repoName: 'Agents-M365Copilot/typescript' + packageName: '@microsoft/agents-m365copilot' + - stage: stage_agents_m365copilot_typescript_beta dependsOn: - stage_build_and_publish_kiota From ff0785d33ffb224767d5856f873bd034d1759e77 Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Mon, 3 Nov 2025 16:43:40 -0800 Subject: [PATCH 50/75] ci: remove backing store from agents --- .azure-pipelines/generation-pipeline.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 95ad2a5e6..c9c86140e 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -958,7 +958,7 @@ extends: targetClassName: "BaseAgentsM365CopilotServiceClient" targetNamespace: "Microsoft.Agents.M365Copilot" commitMessagePrefix: "feat(generation): update request builders and models for dotnet v1" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + customArguments: "-i '**/copilot/**'" # include only copilot paths cleanMetadataFolder: $(cleanOpenAPIFolderV1) pathExclusionArguments: '' languageSpecificSteps: @@ -1002,7 +1002,7 @@ extends: targetClassName: "BaseAgentsM365CopilotBetaServiceClient" targetNamespace: "Microsoft.Agents.M365Copilot.Beta" commitMessagePrefix: "feat(generation): update request builders and models for dotnet beta" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + customArguments: "-i '**/copilot/**'" # include only copilot paths cleanMetadataFolder: $(cleanOpenAPIFolderBeta) pathExclusionArguments: '' languageSpecificSteps: @@ -1045,7 +1045,7 @@ extends: branchName: 'ccs-python/$(v1Branch)' targetClassName: "BaseAgentsM365CopilotServiceClient" targetNamespace: "microsoft_agents_m365copilot.generated" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + customArguments: "-i '**/copilot/**'" # include only copilot paths cleanMetadataFolder: $(cleanOpenAPIFolderV1) commitMessagePrefix: "feat(generation): update request builders and models for python v1" pathExclusionArguments: '' @@ -1089,7 +1089,7 @@ extends: branchName: 'ccs-python/$(betaBranch)' targetClassName: "BaseAgentsM365CopilotBetaServiceClient" targetNamespace: "microsoft_agents_m365copilot_beta.generated" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + customArguments: "-i '**/copilot/**'" # include only copilot paths cleanMetadataFolder: $(cleanOpenAPIFolderBeta) commitMessagePrefix: "feat(generation): update request builders and models for python beta" pathExclusionArguments: '' @@ -1134,7 +1134,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models for typescript v1" targetClassName: "BaseAgentsM365CopilotServiceClient" targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" - customArguments: "-b -i '**/copilot/**'" + customArguments: "-i '**/copilot/**'" cleanMetadataFolder: $(cleanOpenAPIFolderV1) pathExclusionArguments: '' languageSpecificSteps: @@ -1178,7 +1178,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models for typescript beta" targetClassName: "BaseAgentsM365CopilotBetaServiceClient" targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" - customArguments: "-b -i '**/copilot/**'" + customArguments: "-i '**/copilot/**'" cleanMetadataFolder: $(cleanOpenAPIFolderBeta) pathExclusionArguments: '' languageSpecificSteps: From 0bc345a1609089f652126d61799e72b7c86eae0b Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:31:33 -0800 Subject: [PATCH 51/75] ci: fix target endpoint, fix non escaped sequence for php --- .azure-pipelines/generation-pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index c9c86140e..749de5c4e 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -620,7 +620,7 @@ extends: repoName: 'msgraph-sdk-php' branchName: 'kiota/$(v1Branch)' targetClassName: "BaseGraphClient" - targetNamespace: 'Microsoft\\Graph\\Generated' + targetNamespace: 'Microsoft\Graph\Generated' baseBranchName: 'main' commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderV1) @@ -663,7 +663,7 @@ extends: repoName: 'msgraph-beta-sdk-php' branchName: 'kiota/$(betaBranch)' targetClassName: "BaseGraphClient" - targetNamespace: 'Microsoft\\Graph\\Beta\\Generated' + targetNamespace: 'Microsoft\Graph\Beta\Generated' baseBranchName: 'main' commitMessagePrefix: "feat(generation): update request builders and models" cleanMetadataFolder: $(cleanOpenAPIFolderBeta) @@ -1110,7 +1110,7 @@ extends: in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: typescript_beta_agents_m365copilot + - job: typescript_v1_agents_m365copilot templateContext: inputs: - input: pipelineArtifact @@ -1126,7 +1126,7 @@ extends: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'typescript' - version: 'beta' + version: 'v1' orgName: 'microsoft' repoName: 'Agents-M365Copilot' baseBranchName: 'main' From 25fd012cd6ce8a0091a892a3946eb237a0637697 Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:31:46 -0800 Subject: [PATCH 52/75] ci: make parameter mandatory --- scripts/clean-typescript-ccs-files.ps1 | 5 ++++- scripts/copy-ccs-typescript-sdk-models.ps1 | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/clean-typescript-ccs-files.ps1 b/scripts/clean-typescript-ccs-files.ps1 index 7698c9e47..7b7bf37fc 100644 --- a/scripts/clean-typescript-ccs-files.ps1 +++ b/scripts/clean-typescript-ccs-files.ps1 @@ -2,11 +2,14 @@ param ( [Parameter(Mandatory = $true)] [string] $targetDirectory, + [Parameter(Mandatory = $true)] [string] - $packageName = "@microsoft/agents-m365copilot" + $packageName ) Push-Location $targetDirectory +Write-Host "Starting cleaning operation in target directory: $targetDirectory" + $kiotaLockFileName = "kiota-lock.json" # Extract folder name from package name (the part after the slash) $folderToClean = $packageName.Split("/")[1] diff --git a/scripts/copy-ccs-typescript-sdk-models.ps1 b/scripts/copy-ccs-typescript-sdk-models.ps1 index 8fae6b6b3..f6a0edbf3 100644 --- a/scripts/copy-ccs-typescript-sdk-models.ps1 +++ b/scripts/copy-ccs-typescript-sdk-models.ps1 @@ -5,8 +5,9 @@ param ( [Parameter(Mandatory = $true)] [string] $sourceDirectory, + [Parameter(Mandatory = $true)] [string] - $packageName = "@microsoft/copilot-beta-sdk" + $packageName ) Write-Host "Path to repo models directory: $targetDirectory" From 66122a3ef4f421169fe7e82db0225e73a5691e1d Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 18 Nov 2025 19:43:47 -0600 Subject: [PATCH 53/75] skip openAPI PR --- .azure-pipelines/generation-pipeline.yml | 6 ++++++ .azure-pipelines/generation-templates/capture-openapi.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 749de5c4e..a826e054a 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -132,6 +132,10 @@ parameters: default: false type: boolean displayName: Override [skip ci]? Checking this box will generate the SDK PRs +- name: skipOpenAPIPRGeneration + default: false + type: boolean + displayName: Skip Open API PR Generation. variables: buildConfiguration: 'Release' cleanMetadataFileBeta: '$(Build.SourcesDirectory)/msgraph-metadata/clean_beta_metadata/cleanMetadataWithDescriptionsbeta.xml' @@ -287,6 +291,7 @@ extends: endpoint: 'v1.0' outputPath: $(cleanOpenAPIFileV1OutputPath) cleanMetadataFolder: $(cleanOpenAPIFolderV1) + skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration }} - stage: stage_beta_openapi dependsOn: stage_beta_metadata @@ -297,6 +302,7 @@ extends: endpoint: 'beta' outputPath: $(cleanOpenAPIFileBetaOutputPath) cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration }} # Approval stage for v1 OpenAPI generation. All subsequent stages depending on OpenAPI generation # will be blocked until approval is granted. Any new stages depending on OpenAPI generation diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 79218a552..f8d534a22 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -103,6 +103,7 @@ jobs: - job: publish_openapi dependsOn: convert_openapi displayName: Publish OpenAPI files + condition: eq('${{ parameters.skipOpenAPIPRGeneration }}', false) ## If there's new settings added please add them here too templateContext: inputs: From 243e5579cd31317be66a28bb91b3f85047fd0907 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 19 Nov 2025 09:42:13 -0600 Subject: [PATCH 54/75] following varibles setting --- .azure-pipelines/generation-pipeline.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index a826e054a..976da487b 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -168,6 +168,7 @@ variables: overrideSkipCI: ${{ parameters.overrideSkipCI }} skipMetadataCaptureAndClean: ${{ parameters.skipMetadataCaptureAndClean }} skipOpenApiCaptureAndClean: ${{ parameters.skipOpenApiCaptureAndClean }} + skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration }} phpVersion: 7.2 extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates @@ -291,7 +292,7 @@ extends: endpoint: 'v1.0' outputPath: $(cleanOpenAPIFileV1OutputPath) cleanMetadataFolder: $(cleanOpenAPIFolderV1) - skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration }} + skipOpenAPIPRGeneration: $(skipOpenAPIPRGeneration) - stage: stage_beta_openapi dependsOn: stage_beta_metadata @@ -302,7 +303,7 @@ extends: endpoint: 'beta' outputPath: $(cleanOpenAPIFileBetaOutputPath) cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration }} + skipOpenAPIPRGeneration: $(skipOpenAPIPRGeneration) # Approval stage for v1 OpenAPI generation. All subsequent stages depending on OpenAPI generation # will be blocked until approval is granted. Any new stages depending on OpenAPI generation From 6851da475ae689ea87ce5b41c4f1998cf902b429 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 19 Nov 2025 12:15:13 -0600 Subject: [PATCH 55/75] updating capture open --- .azure-pipelines/generation-templates/capture-openapi.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index f8d534a22..7adc6b2bb 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -12,6 +12,8 @@ parameters: default: $(System.ArtifactsDirectory) - name: 'cleanMetadataFolder' type: string +- name: 'skipOpenAPIPRGeneration' + type: boolean jobs: - job: get_conversion_settings displayName: "Get conversion settings" From aae39a935c8ae25239a41221bf017bdbccc580d6 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 19 Nov 2025 12:19:47 -0600 Subject: [PATCH 56/75] changing back to parameters --- .azure-pipelines/generation-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 976da487b..39280ede9 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -292,7 +292,7 @@ extends: endpoint: 'v1.0' outputPath: $(cleanOpenAPIFileV1OutputPath) cleanMetadataFolder: $(cleanOpenAPIFolderV1) - skipOpenAPIPRGeneration: $(skipOpenAPIPRGeneration) + skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration}} - stage: stage_beta_openapi dependsOn: stage_beta_metadata @@ -303,7 +303,7 @@ extends: endpoint: 'beta' outputPath: $(cleanOpenAPIFileBetaOutputPath) cleanMetadataFolder: $(cleanOpenAPIFolderBeta) - skipOpenAPIPRGeneration: $(skipOpenAPIPRGeneration) + skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration}} # Approval stage for v1 OpenAPI generation. All subsequent stages depending on OpenAPI generation # will be blocked until approval is granted. Any new stages depending on OpenAPI generation From a7582c2d9fa8004f4b940a4b80a86f634ae9ccd8 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 19 Nov 2025 13:51:51 -0600 Subject: [PATCH 57/75] changing condition positioning --- .azure-pipelines/generation-templates/capture-openapi.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 7adc6b2bb..3d5fc6c04 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -105,7 +105,6 @@ jobs: - job: publish_openapi dependsOn: convert_openapi displayName: Publish OpenAPI files - condition: eq('${{ parameters.skipOpenAPIPRGeneration }}', false) ## If there's new settings added please add them here too templateContext: inputs: @@ -180,7 +179,7 @@ jobs: displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' env: BaseBranch: master - GeneratePullRequest: true + GeneratePullRequest: not('${{ parameters.skipOpenAPIPRGeneration }}') GhAppId: $(microsoft-graph-devx-bot-appid) GhAppKey: $(microsoft-graph-devx-bot-privatekey) OverrideSkipCI: false From d5f3a5772d86dec7cf73f0233015e2c3ec4d12ae Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 19 Nov 2025 15:54:40 -0600 Subject: [PATCH 58/75] updating conditions --- .azure-pipelines/generation-templates/capture-openapi.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 3d5fc6c04..b4681161a 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -156,9 +156,10 @@ jobs: # Push changes to msgraph-metadata repo - pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1' + condition: not('${{ parameters.skipOpenAPIPRGeneration }}') displayName: Publish ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo env: - CreateOpenAPIPR: True + CreateOpenAPIPR: true EndpointVersion: ${{ parameters.endpoint }} PublishChanges: $(publishChanges) workingDirectory: '$(Build.SourcesDirectory)/msgraph-metadata' @@ -176,10 +177,11 @@ jobs: SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" - pwsh: '$(scriptsDirectory)/create-pull-request.ps1' + condition: not('${{ parameters.skipOpenAPIPRGeneration }}') displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' env: BaseBranch: master - GeneratePullRequest: not('${{ parameters.skipOpenAPIPRGeneration }}') + GeneratePullRequest: true GhAppId: $(microsoft-graph-devx-bot-appid) GhAppKey: $(microsoft-graph-devx-bot-privatekey) OverrideSkipCI: false From f1f0287836de10f0f2dfa9d5d65fd9b7eb633fab Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 21 Nov 2025 09:38:52 -0600 Subject: [PATCH 59/75] reverting back --- .azure-pipelines/generation-templates/capture-openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index b4681161a..1f6401ce0 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -159,7 +159,7 @@ jobs: condition: not('${{ parameters.skipOpenAPIPRGeneration }}') displayName: Publish ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo env: - CreateOpenAPIPR: true + CreateOpenAPIPR: True EndpointVersion: ${{ parameters.endpoint }} PublishChanges: $(publishChanges) workingDirectory: '$(Build.SourcesDirectory)/msgraph-metadata' From bcfbdd5eb0dfc6c6c16685f76260fd5c4c86da9a Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 21 Nov 2025 17:19:33 -0600 Subject: [PATCH 60/75] changing condition --- .azure-pipelines/generation-templates/capture-openapi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 1f6401ce0..99709756e 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -156,7 +156,7 @@ jobs: # Push changes to msgraph-metadata repo - pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1' - condition: not('${{ parameters.skipOpenAPIPRGeneration }}') + condition: eq('${{ parameters.skipOpenAPIPRGeneration }}', false) displayName: Publish ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo env: CreateOpenAPIPR: True @@ -177,7 +177,7 @@ jobs: SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" - pwsh: '$(scriptsDirectory)/create-pull-request.ps1' - condition: not('${{ parameters.skipOpenAPIPRGeneration }}') + condition: eq('${{ parameters.skipOpenAPIPRGeneration }}', false) displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata' env: BaseBranch: master From 21158b5752f3eece2435be8457c9031ad081af35 Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 6 Jan 2026 10:36:05 -0600 Subject: [PATCH 61/75] updating to .net10 --- .../generation-templates/build-and-publish-kiota.yml | 4 ++-- .../generation-templates/set-up-for-generation-kiota.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index ae4886e92..1a5a996a1 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,7 +1,7 @@ steps: - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: - version: "9.x" #kiota uses a net9 target + version: "10.x" #kiota uses a net10 target - checkout: kiota displayName: checkout kiota @@ -12,7 +12,7 @@ steps: - task: CopyFiles@2 inputs: - sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net9.0' + sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net10.0' contents: '**/*' targetFolder: '$(Build.ArtifactStagingDirectory)' displayName: Copy Kiota executable \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml index 5b2050d06..980cad008 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml @@ -6,7 +6,7 @@ steps: - template: /.azure-pipelines/generation-templates/set-user-config.yml@self - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: - version: "9.x" #kiota uses a net9 target + version: "10.x" #kiota uses a net10 target # checkout metadata repo if capture and clean step is skipped - checkout: msgraph-metadata From 1c28afd2df73799caf07e7aefc97d72e805de824 Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:38:19 -0800 Subject: [PATCH 62/75] chore: kiota is now downloaded from nuget rather than built locally during pipeline --- .azure-pipelines/generation-pipeline.yml | 6 ------ .../build-and-publish-kiota.yml | 17 +++-------------- .../generation-templates/download-kiota.yml | 5 ----- .../language-generation-kiota.yml | 2 +- .../set-up-for-generation-kiota.yml | 5 ++++- 5 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 .azure-pipelines/generation-templates/download-kiota.yml diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 39280ede9..cf9d1baa6 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -97,10 +97,6 @@ resources: type: github endpoint: microsoftgraph (22) name: microsoftgraph/microsoft-graph-docs - - repository: kiota - type: github - endpoint: microsoftkiota - name: microsoft/kiota - repository: Agents-M365Copilot type: github endpoint: microsoftkiota @@ -175,8 +171,6 @@ extends: parameters: sdl: sourceRepositoriesToScan: - include: - - repository: kiota exclude: - repository: msgraph-sdk-dotnet - repository: msgraph-beta-sdk-dotnet diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 1a5a996a1..90a52a2b5 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,18 +1,7 @@ steps: - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: - version: "10.x" #kiota uses a net10 target + version: "10.x" -- checkout: kiota - displayName: checkout kiota - fetchDepth: 1 - -- pwsh: dotnet build $(Build.SourcesDirectory)/src/kiota/kiota.csproj --configuration $(buildConfiguration) - displayName: 'Build Kiota' - -- task: CopyFiles@2 - inputs: - sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net10.0' - contents: '**/*' - targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy Kiota executable \ No newline at end of file +- bash: dotnet tool install Microsoft.OpenApi.Kiota --tool-path $(Build.ArtifactStagingDirectory) + displayName: 'Install latest Kiota from NuGet' diff --git a/.azure-pipelines/generation-templates/download-kiota.yml b/.azure-pipelines/generation-templates/download-kiota.yml deleted file mode 100644 index 3ec33e096..000000000 --- a/.azure-pipelines/generation-templates/download-kiota.yml +++ /dev/null @@ -1,5 +0,0 @@ -# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. -# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. -# The 'DownloadBuildArtifacts@0' tasks have been converted to inputs within the `templateContext` section of each job. -steps: -- bash: chmod +x $(Build.SourcesDirectory)/kiota/kiota \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index aedeb6c82..847fda7b0 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -96,7 +96,7 @@ steps: Write-Warning "Kiota directory not found: $(kiotaDirectory)" } displayName: 'List files in Kiota directory' -- pwsh: '& "$(kiotaDirectory)/kiota.exe" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' +- pwsh: '& "$(kiotaDirectory)/kiota" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}' env: KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }} diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml index 980cad008..91682461c 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml @@ -6,7 +6,10 @@ steps: - template: /.azure-pipelines/generation-templates/set-user-config.yml@self - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: - version: "10.x" #kiota uses a net10 target + version: "10.x" + +- bash: chmod +x $(kiotaDirectory)/kiota + displayName: 'Make Kiota executable' # checkout metadata repo if capture and clean step is skipped - checkout: msgraph-metadata From 3eef546c9ebbb3862f8e4360447cc7feb65bf13b Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Fri, 20 Feb 2026 00:29:27 -0800 Subject: [PATCH 63/75] download binaries from github releases --- .../generation-templates/build-and-publish-kiota.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 90a52a2b5..3a34ede19 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,7 +1,7 @@ steps: -- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self - parameters: - version: "10.x" - -- bash: dotnet tool install Microsoft.OpenApi.Kiota --tool-path $(Build.ArtifactStagingDirectory) - displayName: 'Install latest Kiota from NuGet' +- bash: | + LATEST_TAG=$(curl -sL -o /dev/null -w "%{url_effective}" "https://github.com/microsoft/kiota/releases/latest" | rev | cut -d'/' -f1 | rev) + echo "Downloading Kiota $LATEST_TAG" + curl -L "https://github.com/microsoft/kiota/releases/download/${LATEST_TAG}/linux-x64.zip" -o kiota.zip + unzip kiota.zip -d $(Build.ArtifactStagingDirectory) + displayName: 'Download latest Kiota from GitHub' From 009eca402008aaad8caa1b29e3b28a688888bbec Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Fri, 20 Feb 2026 12:22:46 -0800 Subject: [PATCH 64/75] get kiota binary download link --- .../build-and-publish-kiota.yml | 13 ++++++++++--- submodules/vipr | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 3a34ede19..6b3dfde7d 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,7 +1,14 @@ steps: - bash: | - LATEST_TAG=$(curl -sL -o /dev/null -w "%{url_effective}" "https://github.com/microsoft/kiota/releases/latest" | rev | cut -d'/' -f1 | rev) + RELEASE_JSON=$(curl -s "https://api.github.com/repos/microsoft/kiota/releases/latest") + LATEST_TAG=$(echo "$RELEASE_JSON" | jq -r '.tag_name') + ASSET_URL=$(echo "$RELEASE_JSON" | jq -r '.assets[] | select(.name | test("linux-x64")) | .browser_download_url') echo "Downloading Kiota $LATEST_TAG" - curl -L "https://github.com/microsoft/kiota/releases/download/${LATEST_TAG}/linux-x64.zip" -o kiota.zip - unzip kiota.zip -d $(Build.ArtifactStagingDirectory) + echo "Asset URL: $ASSET_URL" + curl -L "$ASSET_URL" -o kiota_download + if [[ "$ASSET_URL" == *.zip ]]; then + unzip kiota_download -d $(Build.ArtifactStagingDirectory) + else + tar -xzf kiota_download -C $(Build.ArtifactStagingDirectory) + fi displayName: 'Download latest Kiota from GitHub' diff --git a/submodules/vipr b/submodules/vipr index 0921e5504..c5c220440 160000 --- a/submodules/vipr +++ b/submodules/vipr @@ -1 +1 @@ -Subproject commit 0921e550479b18d11ccccc4f21ce4c72c8170b9b +Subproject commit c5c2204400b27503a3b9fb75a36b5a3cf9ed90f0 From 3fa9fcedb4d81ec601ec4785b45e4626f533d8b0 Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:43:49 -0800 Subject: [PATCH 65/75] extract kiota to correct directory --- .../generation-templates/build-and-publish-kiota.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 6b3dfde7d..562744cb1 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -6,9 +6,15 @@ steps: echo "Downloading Kiota $LATEST_TAG" echo "Asset URL: $ASSET_URL" curl -L "$ASSET_URL" -o kiota_download + mkdir -p /tmp/kiota_extract if [[ "$ASSET_URL" == *.zip ]]; then - unzip kiota_download -d $(Build.ArtifactStagingDirectory) + unzip kiota_download -d /tmp/kiota_extract else - tar -xzf kiota_download -C $(Build.ArtifactStagingDirectory) + tar -xzf kiota_download -C /tmp/kiota_extract fi + echo "=== Extracted contents ===" + find /tmp/kiota_extract -type f + KIOTA_BIN=$(find /tmp/kiota_extract -name kiota -type f | head -1) + echo "Found Kiota binary at: $KIOTA_BIN" + cp "$KIOTA_BIN" $(Build.ArtifactStagingDirectory)/kiota displayName: 'Download latest Kiota from GitHub' From 77326825b9c1d862076473105c712042a902d57a Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:20:10 -0800 Subject: [PATCH 66/75] swith to pwsh --- .../build-and-publish-kiota.yml | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 562744cb1..50e447b75 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,20 +1,24 @@ steps: -- bash: | - RELEASE_JSON=$(curl -s "https://api.github.com/repos/microsoft/kiota/releases/latest") - LATEST_TAG=$(echo "$RELEASE_JSON" | jq -r '.tag_name') - ASSET_URL=$(echo "$RELEASE_JSON" | jq -r '.assets[] | select(.name | test("linux-x64")) | .browser_download_url') - echo "Downloading Kiota $LATEST_TAG" - echo "Asset URL: $ASSET_URL" - curl -L "$ASSET_URL" -o kiota_download - mkdir -p /tmp/kiota_extract - if [[ "$ASSET_URL" == *.zip ]]; then - unzip kiota_download -d /tmp/kiota_extract - else - tar -xzf kiota_download -C /tmp/kiota_extract - fi - echo "=== Extracted contents ===" - find /tmp/kiota_extract -type f - KIOTA_BIN=$(find /tmp/kiota_extract -name kiota -type f | head -1) - echo "Found Kiota binary at: $KIOTA_BIN" - cp "$KIOTA_BIN" $(Build.ArtifactStagingDirectory)/kiota +- pwsh: | + $releaseJson = Invoke-RestMethod "https://api.github.com/repos/microsoft/kiota/releases/latest" + $latestTag = $releaseJson.tag_name + $platform = if ($IsLinux) { "linux-x64" } elseif ($IsMacOS) { "osx-x64" } else { "win-x64" } + $asset = $releaseJson.assets | Where-Object { $_.name -match $platform } | Select-Object -First 1 + Write-Host "Downloading Kiota $latestTag" + Write-Host "Asset URL: $($asset.browser_download_url)" + $tmpDir = [System.IO.Path]::GetTempPath() + $downloadPath = Join-Path $tmpDir "kiota_download" + $extractPath = Join-Path $tmpDir "kiota_extract" + New-Item -ItemType Directory -Force -Path $extractPath | Out-Null + Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $downloadPath + if ($asset.name -match "\.zip$") { + Expand-Archive -Path $downloadPath -DestinationPath $extractPath -Force + } else { + tar -xzf $downloadPath -C $extractPath + } + $kiotaBin = Get-ChildItem -Path $extractPath -Filter "kiota" -Recurse -File | Select-Object -First 1 + Write-Host "Found Kiota binary at: $($kiotaBin.FullName)" + $stagingDir = "$(Build.ArtifactStagingDirectory)" + New-Item -ItemType Directory -Force -Path $stagingDir | Out-Null + Copy-Item -Path $kiotaBin.FullName -Destination (Join-Path $stagingDir "kiota") displayName: 'Download latest Kiota from GitHub' From 8b3417c4323721811c80a5aba680a503c1a276e3 Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:55:18 -0800 Subject: [PATCH 67/75] revert to bash, ensure correct extraction path --- .../generation-templates/build-and-publish-kiota.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 50e447b75..fa510b580 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -16,9 +16,11 @@ steps: } else { tar -xzf $downloadPath -C $extractPath } - $kiotaBin = Get-ChildItem -Path $extractPath -Filter "kiota" -Recurse -File | Select-Object -First 1 + # Match 'kiota' or 'kiota.exe' via BaseName + $kiotaBin = Get-ChildItem -Path $extractPath -Recurse -File | Where-Object { $_.BaseName -eq "kiota" } | Select-Object -First 1 Write-Host "Found Kiota binary at: $($kiotaBin.FullName)" $stagingDir = "$(Build.ArtifactStagingDirectory)" New-Item -ItemType Directory -Force -Path $stagingDir | Out-Null + # Always copy as 'kiota' (no extension) so downstream steps are platform-agnostic Copy-Item -Path $kiotaBin.FullName -Destination (Join-Path $stagingDir "kiota") displayName: 'Download latest Kiota from GitHub' From 49c19f689056f5af6267c2acc109bf800f1c641f Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:55:37 -0800 Subject: [PATCH 68/75] revert to bash --- .../build-and-publish-kiota.yml | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index fa510b580..8790df160 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,26 +1,19 @@ steps: -- pwsh: | - $releaseJson = Invoke-RestMethod "https://api.github.com/repos/microsoft/kiota/releases/latest" - $latestTag = $releaseJson.tag_name - $platform = if ($IsLinux) { "linux-x64" } elseif ($IsMacOS) { "osx-x64" } else { "win-x64" } - $asset = $releaseJson.assets | Where-Object { $_.name -match $platform } | Select-Object -First 1 - Write-Host "Downloading Kiota $latestTag" - Write-Host "Asset URL: $($asset.browser_download_url)" - $tmpDir = [System.IO.Path]::GetTempPath() - $downloadPath = Join-Path $tmpDir "kiota_download" - $extractPath = Join-Path $tmpDir "kiota_extract" - New-Item -ItemType Directory -Force -Path $extractPath | Out-Null - Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $downloadPath - if ($asset.name -match "\.zip$") { - Expand-Archive -Path $downloadPath -DestinationPath $extractPath -Force - } else { - tar -xzf $downloadPath -C $extractPath - } - # Match 'kiota' or 'kiota.exe' via BaseName - $kiotaBin = Get-ChildItem -Path $extractPath -Recurse -File | Where-Object { $_.BaseName -eq "kiota" } | Select-Object -First 1 - Write-Host "Found Kiota binary at: $($kiotaBin.FullName)" - $stagingDir = "$(Build.ArtifactStagingDirectory)" - New-Item -ItemType Directory -Force -Path $stagingDir | Out-Null - # Always copy as 'kiota' (no extension) so downstream steps are platform-agnostic - Copy-Item -Path $kiotaBin.FullName -Destination (Join-Path $stagingDir "kiota") +- bash: | + RELEASE_JSON=$(curl -s "https://api.github.com/repos/microsoft/kiota/releases/latest") + LATEST_TAG=$(echo "$RELEASE_JSON" | jq -r '.tag_name') + ASSET_URL=$(echo "$RELEASE_JSON" | jq -r '.assets[] | select(.name | test("linux-x64")) | .browser_download_url') + echo "Downloading Kiota $LATEST_TAG" + echo "Asset URL: $ASSET_URL" + curl -L "$ASSET_URL" -o kiota_download + mkdir -p /tmp/kiota_extract + if [[ "$ASSET_URL" == *.zip ]]; then + unzip kiota_download -d /tmp/kiota_extract + else + tar -xzf kiota_download -C /tmp/kiota_extract + fi + KIOTA_BIN=$(find /tmp/kiota_extract -name kiota -type f | head -1) + echo "Found Kiota binary at: $KIOTA_BIN" + mkdir -p "$(Build.ArtifactStagingDirectory)" + cp "$KIOTA_BIN" "$(Build.ArtifactStagingDirectory)/kiota" displayName: 'Download latest Kiota from GitHub' From 7e8aaa5547644bf4fe4c7a6c4cd900b3bc1ea42b Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:38:51 -0800 Subject: [PATCH 69/75] make kiota exe path resillient --- .../language-generation-kiota.yml | 2 +- .../set-up-for-generation-kiota.yml | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index 847fda7b0..3c122c707 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -96,7 +96,7 @@ steps: Write-Warning "Kiota directory not found: $(kiotaDirectory)" } displayName: 'List files in Kiota directory' -- pwsh: '& "$(kiotaDirectory)/kiota" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' +- pwsh: '& "$(kiotaExecutable)" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}' env: KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }} diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml index 91682461c..525ed1edd 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml @@ -8,7 +8,17 @@ steps: parameters: version: "10.x" -- bash: chmod +x $(kiotaDirectory)/kiota +- bash: | + KIOTA_BIN=$(find "$(kiotaDirectory)" -name "kiota" -type f | head -1) + if [ -z "$KIOTA_BIN" ]; then + echo "ERROR: kiota binary not found under $(kiotaDirectory)" + echo "Directory contents:" + ls -laR "$(kiotaDirectory)" || echo "Directory does not exist" + exit 1 + fi + chmod +x "$KIOTA_BIN" + echo "Kiota binary ready at: $KIOTA_BIN" + echo "##vso[task.setvariable variable=kiotaExecutable]$KIOTA_BIN" displayName: 'Make Kiota executable' # checkout metadata repo if capture and clean step is skipped From b3c9ccc83d09e650e876f67caa74bc47e179a645 Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:37:13 -0800 Subject: [PATCH 70/75] consitantly use pwsh --- .../build-and-publish-kiota.yml | 39 +++++++++++-------- .../set-up-for-generation-kiota.yml | 19 +++++---- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 8790df160..21fe50ae5 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,19 +1,24 @@ steps: -- bash: | - RELEASE_JSON=$(curl -s "https://api.github.com/repos/microsoft/kiota/releases/latest") - LATEST_TAG=$(echo "$RELEASE_JSON" | jq -r '.tag_name') - ASSET_URL=$(echo "$RELEASE_JSON" | jq -r '.assets[] | select(.name | test("linux-x64")) | .browser_download_url') - echo "Downloading Kiota $LATEST_TAG" - echo "Asset URL: $ASSET_URL" - curl -L "$ASSET_URL" -o kiota_download - mkdir -p /tmp/kiota_extract - if [[ "$ASSET_URL" == *.zip ]]; then - unzip kiota_download -d /tmp/kiota_extract - else - tar -xzf kiota_download -C /tmp/kiota_extract - fi - KIOTA_BIN=$(find /tmp/kiota_extract -name kiota -type f | head -1) - echo "Found Kiota binary at: $KIOTA_BIN" - mkdir -p "$(Build.ArtifactStagingDirectory)" - cp "$KIOTA_BIN" "$(Build.ArtifactStagingDirectory)/kiota" +- pwsh: | + $releaseJson = Invoke-RestMethod "https://api.github.com/repos/microsoft/kiota/releases/latest" + $latestTag = $releaseJson.tag_name + $asset = $releaseJson.assets | Where-Object { $_.name -match "linux-x64" } | Select-Object -First 1 + Write-Host "Downloading Kiota $latestTag" + Write-Host "Asset URL: $($asset.browser_download_url)" + + $extractDir = Join-Path ([System.IO.Path]::GetTempPath()) "kiota_extract_$([System.IO.Path]::GetRandomFileName())" + New-Item -ItemType Directory -Force -Path $extractDir | Out-Null + $downloadPath = Join-Path $extractDir "kiota_download.zip" + + Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $downloadPath + Expand-Archive -Path $downloadPath -DestinationPath $extractDir -Force + + Write-Host "=== Extracted contents ===" + Get-ChildItem $extractDir -Recurse | Select-Object FullName + + $kiotaBin = Get-ChildItem -Path $extractDir -Recurse -File | Where-Object { $_.BaseName -eq "kiota" } | Select-Object -First 1 + Write-Host "Found Kiota binary at: $($kiotaBin.FullName)" + + New-Item -ItemType Directory -Force -Path "$(Build.ArtifactStagingDirectory)" | Out-Null + Copy-Item -Path $kiotaBin.FullName -Destination (Join-Path "$(Build.ArtifactStagingDirectory)" "kiota") displayName: 'Download latest Kiota from GitHub' diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml index 525ed1edd..17986ae24 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml @@ -8,17 +8,16 @@ steps: parameters: version: "10.x" -- bash: | - KIOTA_BIN=$(find "$(kiotaDirectory)" -name "kiota" -type f | head -1) - if [ -z "$KIOTA_BIN" ]; then - echo "ERROR: kiota binary not found under $(kiotaDirectory)" - echo "Directory contents:" - ls -laR "$(kiotaDirectory)" || echo "Directory does not exist" +- pwsh: | + $kiotaBin = Get-ChildItem -Path "$(kiotaDirectory)" -Recurse -File | Where-Object { $_.BaseName -eq "kiota" } | Select-Object -First 1 + if (-not $kiotaBin) { + Write-Error "Kiota binary not found under $(kiotaDirectory)" + Get-ChildItem "$(kiotaDirectory)" -Recurse -ErrorAction SilentlyContinue | Select-Object FullName exit 1 - fi - chmod +x "$KIOTA_BIN" - echo "Kiota binary ready at: $KIOTA_BIN" - echo "##vso[task.setvariable variable=kiotaExecutable]$KIOTA_BIN" + } + chmod +x $kiotaBin.FullName + Write-Host "Kiota binary ready at: $($kiotaBin.FullName)" + Write-Host "##vso[task.setvariable variable=kiotaExecutable]$($kiotaBin.FullName)" displayName: 'Make Kiota executable' # checkout metadata repo if capture and clean step is skipped From d2e86865be451d0bf70448749bbfb454595e950c Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:17:02 -0800 Subject: [PATCH 71/75] download using dotnet tool --- .../build-and-publish-kiota.yml | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 21fe50ae5..8d69fd2c5 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,24 +1,8 @@ steps: - pwsh: | - $releaseJson = Invoke-RestMethod "https://api.github.com/repos/microsoft/kiota/releases/latest" - $latestTag = $releaseJson.tag_name - $asset = $releaseJson.assets | Where-Object { $_.name -match "linux-x64" } | Select-Object -First 1 - Write-Host "Downloading Kiota $latestTag" - Write-Host "Asset URL: $($asset.browser_download_url)" - - $extractDir = Join-Path ([System.IO.Path]::GetTempPath()) "kiota_extract_$([System.IO.Path]::GetRandomFileName())" - New-Item -ItemType Directory -Force -Path $extractDir | Out-Null - $downloadPath = Join-Path $extractDir "kiota_download.zip" - - Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $downloadPath - Expand-Archive -Path $downloadPath -DestinationPath $extractDir -Force - - Write-Host "=== Extracted contents ===" - Get-ChildItem $extractDir -Recurse | Select-Object FullName - - $kiotaBin = Get-ChildItem -Path $extractDir -Recurse -File | Where-Object { $_.BaseName -eq "kiota" } | Select-Object -First 1 - Write-Host "Found Kiota binary at: $($kiotaBin.FullName)" - + dotnet tool install --global Microsoft.OpenApi.Kiota + $kiotaPath = Join-Path $HOME ".dotnet" "tools" "kiota" + Write-Host "Kiota installed at: $kiotaPath" New-Item -ItemType Directory -Force -Path "$(Build.ArtifactStagingDirectory)" | Out-Null - Copy-Item -Path $kiotaBin.FullName -Destination (Join-Path "$(Build.ArtifactStagingDirectory)" "kiota") - displayName: 'Download latest Kiota from GitHub' + Copy-Item -Path $kiotaPath -Destination (Join-Path "$(Build.ArtifactStagingDirectory)" "kiota") + displayName: 'Install Kiota via dotnet tool' From be3e73f1fe088b145a9ad4b56fbe35b735c0a367 Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Tue, 24 Feb 2026 16:19:06 -0800 Subject: [PATCH 72/75] simplify using dotnet install --- .../generation-templates/build-and-publish-kiota.yml | 7 ++----- .../language-generation-kiota.yml | 2 +- .../set-up-for-generation-kiota.yml | 11 +---------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 8d69fd2c5..63b2c8f02 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,8 +1,5 @@ steps: - pwsh: | - dotnet tool install --global Microsoft.OpenApi.Kiota - $kiotaPath = Join-Path $HOME ".dotnet" "tools" "kiota" - Write-Host "Kiota installed at: $kiotaPath" - New-Item -ItemType Directory -Force -Path "$(Build.ArtifactStagingDirectory)" | Out-Null - Copy-Item -Path $kiotaPath -Destination (Join-Path "$(Build.ArtifactStagingDirectory)" "kiota") + dotnet tool install Microsoft.OpenApi.Kiota ` + --tool-path "$(Build.ArtifactStagingDirectory)" displayName: 'Install Kiota via dotnet tool' diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index 3c122c707..847fda7b0 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -96,7 +96,7 @@ steps: Write-Warning "Kiota directory not found: $(kiotaDirectory)" } displayName: 'List files in Kiota directory' -- pwsh: '& "$(kiotaExecutable)" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' +- pwsh: '& "$(kiotaDirectory)/kiota" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}' env: KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }} diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml index 17986ae24..b1020fcfd 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml @@ -8,16 +8,7 @@ steps: parameters: version: "10.x" -- pwsh: | - $kiotaBin = Get-ChildItem -Path "$(kiotaDirectory)" -Recurse -File | Where-Object { $_.BaseName -eq "kiota" } | Select-Object -First 1 - if (-not $kiotaBin) { - Write-Error "Kiota binary not found under $(kiotaDirectory)" - Get-ChildItem "$(kiotaDirectory)" -Recurse -ErrorAction SilentlyContinue | Select-Object FullName - exit 1 - } - chmod +x $kiotaBin.FullName - Write-Host "Kiota binary ready at: $($kiotaBin.FullName)" - Write-Host "##vso[task.setvariable variable=kiotaExecutable]$($kiotaBin.FullName)" +- pwsh: chmod +x "$(kiotaDirectory)/kiota" displayName: 'Make Kiota executable' # checkout metadata repo if capture and clean step is skipped From 82e175cec07cf24e5aa5edae4b2278733dc75e69 Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:31:34 -0800 Subject: [PATCH 73/75] Remove refs to Dev branch --- ...h-SDK-Code-Generator-branch-protection.yml | 35 ------------------- .github/workflows/codeql.yml | 5 ++- .github/workflows/dotnet.yml | 4 +-- 3 files changed, 4 insertions(+), 40 deletions(-) diff --git a/.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml b/.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml index d08b55ee3..769a1bf56 100644 --- a/.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml +++ b/.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml @@ -9,41 +9,6 @@ resource: repository configuration: branchProtectionRules: - - branchNamePattern: dev - # This branch pattern applies to the following branches: - # dev - - # Specifies whether this branch can be deleted. boolean - allowsDeletions: false - # Specifies whether forced pushes are allowed on this branch. boolean - allowsForcePushes: false - # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean - dismissStaleReviews: true - # Specifies whether admins can overwrite branch protection. boolean - isAdminEnforced: false - # Indicates whether "Require a pull request before merging" is enabled. boolean - requiresPullRequestBeforeMerging: true - # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required - requiredApprovingReviewsCount: 1 - # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean - requireCodeOwnersReview: true - # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. - requiresCommitSignatures: false - # Are conversations required to be resolved before merging? boolean - requiresConversationResolution: true - # Are merge commits prohibited from being pushed to this branch. boolean - requiresLinearHistory: false - # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status - requiredStatusChecks: - - build - - CodeQL - # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean - requiresStrictStatusChecks: true - # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. - restrictsPushes: false - # Restrict who can dismiss pull request reviews. boolean - restrictsReviewDismissals: false - - branchNamePattern: main # This branch pattern applies to the following branches: # main diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f1882995e..2b47d2251 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,10 +13,9 @@ name: "CodeQL" on: push: - branches: [ "dev", "main" ] + branches: [ "main" ] pull_request: - # The branches below must be a subset of the branches above - branches: [ "dev" ] + branches: [ "main" ] schedule: - cron: '1 * * * 1' # At minute 0 on Monday diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 1f0e31332..a8d4fc815 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -2,9 +2,9 @@ name: .NET on: push: - branches: [ main, dev ] + branches: [ main ] pull_request: - branches: [ main, dev ] + branches: [ main ] jobs: build: From 7a1afde8e8d09a04dd46431f2c79e6ecd9468bae Mon Sep 17 00:00:00 2001 From: Gavin Barron Date: Wed, 11 Mar 2026 09:22:40 -0700 Subject: [PATCH 74/75] Update generation-pipeline.yml for Azure Pipelines (#1438) --- .azure-pipelines/generation-pipeline.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index cf9d1baa6..4ce983816 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -928,10 +928,12 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -972,10 +974,12 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -1016,10 +1020,12 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -1060,10 +1066,12 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -1104,10 +1112,12 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_v1_openapi + - open_api_v1_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -1148,10 +1158,12 @@ extends: dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi + - open_api_beta_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: From ec6ede9a413c79d7f6507885b93ed2bc61ab0328 Mon Sep 17 00:00:00 2001 From: "Gavin Barron (from Dev Box)" Date: Tue, 14 Apr 2026 09:48:31 -0700 Subject: [PATCH 75/75] ci: use wildcard version for Microsoft.OpenApi.Hidi install Update the hidi dotnet tool install command from a pinned version (1.6.24) to a 1.* wildcard so pipelines automatically resolve to the latest stable v1.x release. Closes #1439 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .azure-pipelines/generation-templates/capture-metadata.yml | 2 +- .azure-pipelines/generation-templates/capture-openapi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/generation-templates/capture-metadata.yml b/.azure-pipelines/generation-templates/capture-metadata.yml index 4a6fb2377..0c1a7008b 100644 --- a/.azure-pipelines/generation-templates/capture-metadata.yml +++ b/.azure-pipelines/generation-templates/capture-metadata.yml @@ -153,7 +153,7 @@ steps: parameters: version: '9.x' -- pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 +- pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.* displayName: 'Install hidi tool' # verify that generated metadata is parsable as an Edm model diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml index 99709756e..5bf5b9121 100644 --- a/.azure-pipelines/generation-templates/capture-openapi.yml +++ b/.azure-pipelines/generation-templates/capture-openapi.yml @@ -71,7 +71,7 @@ jobs: parameters: version: '9.x' - - pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24 + - pwsh: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.* displayName: install hidi - pwsh: |