From ead96bf7c467ff5b95b7c4352b5380df2a8486a4 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Aug 2025 11:23:35 -0600 Subject: [PATCH 01/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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/39] 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: |