diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml
index 13cdebb15..4ce983816 100644
--- a/.azure-pipelines/generation-pipeline.yml
+++ b/.azure-pipelines/generation-pipeline.yml
@@ -1,137 +1,137 @@
# 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:
-- cron: '0 10 * * TUE'
- displayName: Tuesday generation (PST 2am, EST 5am, EAT 3pm)
+
+# Minute: 0 → At the start of the hour.
+# Hour: 10 → 10:00 AM UTC.
+# Day of Month: 1-7,15-21 → On the 1st–7th and 15th–21st.
+# Month: * → Every month.
+# Weekday: TUE → Only on Tuesdays.
+# This cron will run bi-weekly unless the month has 5 Tuesdays, in which case it will skip the 5th Tuesday (won't be bi-weekly that month).
+- cron: '0 10 1-7,15-21 * TUE'
+ displayName: Bi-weekly Tuesday generation (1st and 3rd Tuesday, PST 2am, EST 5am, EAT 3pm)
branches:
include:
- main
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: Agents-M365Copilot
+ type: github
+ endpoint: microsoftkiota
+ name: microsoft/Agents-M365Copilot
+ - repository: 1ESPipelineTemplates
+ type: git
+ name: 1ESPipelineTemplates/1ESPipelineTemplates
+ ref: refs/tags/release
parameters:
- - name: v1BranchPrefix
- default: v1.0/pipelinebuild
- displayName: V1 Branch Prefix
-
- - name: betaBranchPrefix
- default: beta/pipelinebuild
- displayName: Beta Branch Prefix (should be different than V1)
-
- - name: skipMetadataCaptureAndClean
- default: false
- displayName: Skip metadata capture and clean
- type: boolean
-
- - name: skipOpenApiCaptureAndClean
- default: false
- displayName: Skip OpenAPI capture and clean
- type: boolean
-
- - name: publishChanges
- default: true
- type: boolean
- displayName: Publish changes?
-
- - name: overrideSkipCI
- default: false
- type: boolean
- displayName: Override [skip ci]? Checking this box will generate the SDK PRs
-
+- name: v1BranchPrefix
+ default: v1.0/pipelinebuild
+ displayName: V1 Branch Prefix
+- name: betaBranchPrefix
+ default: beta/pipelinebuild
+ displayName: Beta Branch Prefix (should be different than V1)
+- name: skipMetadataCaptureAndClean
+ default: false
+ displayName: Skip metadata capture and clean
+ type: boolean
+- name: skipOpenApiCaptureAndClean
+ default: false
+ displayName: Skip OpenAPI capture and clean
+ type: boolean
+- name: publishChanges
+ default: true
+ type: boolean
+ displayName: Publish changes?
+- name: overrideSkipCI
+ default: false
+ type: boolean
+ displayName: Override [skip ci]? Checking this box will generate the SDK PRs
+- name: skipOpenAPIPRGeneration
+ default: false
+ type: boolean
+ displayName: Skip Open API PR Generation.
variables:
buildConfiguration: 'Release'
cleanMetadataFileBeta: '$(Build.SourcesDirectory)/msgraph-metadata/clean_beta_metadata/cleanMetadataWithDescriptionsbeta.xml'
@@ -158,603 +158,1044 @@ 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 }}
+ skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration }}
phpVersion: 7.2
-
-# This stage is the core dependency for all other stages.
-stages:
-- stage: stage_build_and_publish_typewriter
- dependsOn: [] # remove the implicit dependency to any previous stage
- jobs:
- - job: build_and_publish_typewriter
- steps:
- - template: generation-templates/build-and-publish-typewriter.yml
-
-- stage: stage_build_and_publish_kiota
- dependsOn: [] # remove the implicit dependency to any previous stage
- jobs:
- - job: build_and_publish_kiota
- steps:
- - template: generation-templates/build-and-publish-kiota.yml
-
+extends:
+ template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
+ parameters:
+ sdl:
+ sourceRepositoriesToScan:
+ exclude:
+ - repository: msgraph-sdk-dotnet
+ - repository: msgraph-beta-sdk-dotnet
+ - repository: msgraph-sdk-php
+ - repository: msgraph-beta-sdk-php
+ - repository: msgraph-typescript-typings
+ - repository: msgraph-beta-typescript-typings
+ - repository: msgraph-sdk-java
+ - repository: msgraph-beta-sdk-java
+ - repository: msgraph-sdk-go
+ - repository: msgraph-beta-sdk-go
+ - repository: msgraph-sdk-typescript
+ - repository: msgraph-beta-sdk-typescript
+ - repository: msgraph-sdk-python
+ - repository: msgraph-beta-sdk-python
+ - repository: msgraph-metadata
+ - repository: microsoft-graph-docs
+ - repository: Agents-M365Copilot
+ - repository: 1ESPipelineTemplates
+ pool:
+ name: Azure-Pipelines-1ESPT-ExDShared
+ vmImage: ubuntu-latest
+ stages:
+ - stage: stage_build_and_publish_typewriter
+ dependsOn: [] # remove the implicit dependency to any previous stage
+ jobs:
+ - job: build_and_publish_typewriter
+ templateContext:
+ outputs:
+ - output: pipelineArtifact
+ targetPath: '$(Build.ArtifactStagingDirectory)'
+ artifactName: typewriter
+ steps:
+ - template: /.azure-pipelines/generation-templates/build-and-publish-typewriter.yml@self
+ - stage: stage_build_and_publish_kiota
+ dependsOn: [] # remove the implicit dependency to any previous stage
+ jobs:
+ - job: build_and_publish_kiota
+ templateContext:
+ outputs:
+ - output: pipelineArtifact
+ targetPath: '$(Build.ArtifactStagingDirectory)'
+ artifactName: kiota
+ steps:
+ - template: /.azure-pipelines/generation-templates/build-and-publish-kiota.yml@self
# Downloads the latest public beta metadata. If there are changes, we checkin
# the public metadata into microsoftgraph/msgraph-metadata, and then run the
# metadata through the cleaning and documentation processes before validating
# the results with generated and built .NET code files as a smoke test.
-- stage: stage_v1_metadata
- dependsOn: stage_build_and_publish_typewriter
- condition: |
- and(succeeded('stage_build_and_publish_typewriter'),
- eq( ${{ parameters.skipMetadataCaptureAndClean }}, false))
- jobs:
- - job: v1_metadata
- steps:
- - template: generation-templates/capture-metadata.yml
- parameters:
- endpoint: 'v1.0'
- inputMetadata: $(rawMetadataFileV1)
- outputPath: $(cleanMetadataFileV1OutputPath)
- cleanMetadataFile: $(cleanMetadataFileV1)
- cleanMetadataFolder: $(cleanMetadataFolderV1)
- cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsV1)
- metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource)
+ - stage: stage_v1_metadata
+ dependsOn: stage_build_and_publish_typewriter
+ condition: |
+ and(succeeded('stage_build_and_publish_typewriter'),
+ eq( ${{ parameters.skipMetadataCaptureAndClean }}, false))
+ jobs:
+ - job: v1_metadata
+ templateContext:
+ outputs:
+ - output: pipelineArtifact
+ targetPath: '$(Build.ArtifactStagingDirectory)'
+ artifactName: $(cleanMetadataFolderV1)
+ inputs:
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'typewriter'
+ targetPath: '$(Build.SourcesDirectory)/typewriter'
+ steps:
+ - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self
+ parameters:
+ endpoint: 'v1.0'
+ inputMetadata: $(rawMetadataFileV1)
+ outputPath: $(cleanMetadataFileV1OutputPath)
+ cleanMetadataFile: $(cleanMetadataFileV1)
+ cleanMetadataFolder: $(cleanMetadataFolderV1)
+ cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsV1)
+ metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource)
# Same description as stage_v1_metadata
-- stage: stage_beta_metadata
- dependsOn: stage_build_and_publish_typewriter
- condition: |
- and(succeeded('stage_build_and_publish_typewriter'),
- eq( ${{ parameters.skipMetadataCaptureAndClean }}, false))
- jobs:
- - job: beta_metadata
- steps:
- - template: generation-templates/capture-metadata.yml
- parameters:
- endpoint: 'beta'
- inputMetadata: $(rawMetadataFileBeta)
- outputPath: $(cleanMetadataFileBetaOutputPath)
- cleanMetadataFile: $(cleanMetadataFileBeta)
- cleanMetadataFolder: $(cleanMetadataFolderBeta)
- cleanMetadataFileWithAnnotations: $(cleanMetadataFileWithAnnotationsBeta)
- metadataTypeSpecAnnotationsSource: $(metadataTypeSpecAnnotationsSource)
+ - stage: stage_beta_metadata
+ dependsOn: stage_build_and_publish_typewriter
+ condition: |
+ and(succeeded('stage_build_and_publish_typewriter'),
+ eq( ${{ parameters.skipMetadataCaptureAndClean }}, false))
+ jobs:
+ - job: beta_metadata
+ templateContext:
+ outputs:
+ - output: pipelineArtifact
+ targetPath: '$(Build.ArtifactStagingDirectory)'
+ artifactName: $(cleanMetadataFolderBeta)
+ inputs:
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'typewriter'
+ targetPath: '$(Build.SourcesDirectory)/typewriter'
+ steps:
+ - template: /.azure-pipelines/generation-templates/capture-metadata.yml@self
+ parameters:
+ 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_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)
+ skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration}}
-- 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_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)
+ skipOpenAPIPRGeneration: ${{ parameters.skipOpenAPIPRGeneration}}
-- 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
- parameters:
- repoName: msgraph-sdk-dotnet
+ # Approval stage for v1 OpenAPI generation. All subsequent stages depending on OpenAPI generation
+ # will be blocked until approval is granted. Any new stages depending on OpenAPI generation
+ # should also depend on this approval stage.
+ - stage: open_api_v1_approval
+ dependsOn:
+ - stage_v1_openapi
+ condition: eq(dependencies.stage_v1_openapi.result, 'Succeeded')
+ jobs:
+ - deployment: OpenApiApproval
+ displayName: 'OpenAPI v1.0 Generation Review'
+ environment: 'openapi-generation-review'
+ strategy:
+ runOnce:
+ deploy:
+ steps:
+ - script: echo "OpenAPI generation approved."
-- 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
- parameters:
- repoName: msgraph-beta-sdk-dotnet
+ # Approval stage for beta OpenAPI generation. All subsequent stages depending on OpenAPI generation
+ # will be blocked until approval is granted. Any new stages depending on OpenAPI generation
+ # should also depend on this approval stage.
+ - stage: open_api_beta_approval
+ dependsOn:
+ - stage_beta_openapi
+ condition: eq(dependencies.stage_beta_openapi.result, 'Succeeded')
+ jobs:
+ - deployment: OpenApiApproval
+ displayName: 'OpenAPI Beta Generation Review'
+ environment: 'openapi-generation-review'
+ strategy:
+ runOnce:
+ deploy:
+ steps:
+ - script: echo "OpenAPI generation approved."
-- stage: stage_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
+ - stage: stage_csharp_v1_kiota
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: csharp_v1_kiota
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: msgraph-sdk-go
+ language: 'csharp'
+ version: ''
+ repoName: 'msgraph-sdk-dotnet'
+ baseBranchName: 'main'
+ branchName: 'kiota/$(v1Branch)'
+ targetClassName: "BaseGraphServiceClient"
+ targetNamespace: "Microsoft.Graph"
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ customArguments: "-b" # Enable the backing store
+ cleanMetadataFolder: $(cleanOpenAPIFolderV1)
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self
+ parameters:
+ repoName: msgraph-sdk-dotnet
-- stage: stage_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
+ - stage: stage_csharp_beta_kiota
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: csharp_beta_kiota
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: msgraph-beta-sdk-go
+ language: 'csharp'
+ version: 'beta'
+ repoName: 'msgraph-beta-sdk-dotnet'
+ baseBranchName: 'main'
+ branchName: 'kiota/$(betaBranch)'
+ targetClassName: "BaseGraphServiceClient"
+ targetNamespace: "Microsoft.Graph.Beta"
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ customArguments: "-b" # Enable the backing store
+ cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self
+ parameters:
+ repoName: msgraph-beta-sdk-dotnet
-- stage: stage_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
+ - stage: stage_go_v1
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: go_v1
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: msgraph-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: ''
+ repoName: 'msgraph-sdk-go'
+ branchName: $(v1Branch)
+ targetClassName: "GraphBaseServiceClient"
+ targetNamespace: "github.com/microsoftgraph/msgraph-sdk-go/"
+ customArguments: "-b -e '/me' -e '/me/**'"
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ cleanMetadataFolder: $(cleanOpenAPIFolderV1)
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/go.yml@self
+ parameters:
+ repoName: msgraph-sdk-go
+ - stage: stage_go_beta
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: go_beta
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
+ parameters:
+ language: 'go'
+ version: 'beta'
+ repoName: 'msgraph-beta-sdk-go'
+ branchName: $(betaBranch)
+ targetClassName: "GraphBaseServiceClient"
+ targetNamespace: "github.com/microsoftgraph/msgraph-beta-sdk-go/"
+ customArguments: "-b -e '/me' -e '/me/**'"
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/go.yml@self
+ parameters:
+ repoName: msgraph-beta-sdk-go
+ - stage: stage_java_v1_kiota
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: java_v1_kiota
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
+ parameters:
+ language: 'java'
+ version: ''
+ repoName: 'msgraph-sdk-java'
+ baseBranchName: 'main'
+ branchName: '$(v1Branch)'
+ targetClassName: "BaseGraphServiceClient"
+ targetNamespace: "com.Microsoft.Graph"
+ cleanMetadataFolder: $(cleanOpenAPIFolderV1)
+ customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/java-kiota.yml@self
+ parameters:
+ repoName: msgraph-sdk-java
+ namespacePath: com/microsoft/graph
+ - stage: stage_java_beta_kiota
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: java_beta_kiota
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: msgraph-beta-sdk-java
- namespacePath: com/microsoft/graph/beta
+ language: 'java'
+ version: 'beta'
+ repoName: 'msgraph-beta-sdk-java'
+ baseBranchName: 'main'
+ branchName: '$(betaBranch)'
+ targetClassName: "BaseGraphServiceClient"
+ targetNamespace: "com.Microsoft.Graph.Beta"
+ cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
+ customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/java-kiota.yml@self
+ parameters:
+ repoName: msgraph-beta-sdk-java
+ namespacePath: com/microsoft/graph/beta
+ - stage: stage_php_v1_kiota
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: php_v1_kiota
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
+ parameters:
+ language: 'php'
+ version: ''
+ repoName: 'msgraph-sdk-php'
+ branchName: 'kiota/$(v1Branch)'
+ targetClassName: "BaseGraphClient"
+ targetNamespace: 'Microsoft\Graph\Generated'
+ baseBranchName: 'main'
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ cleanMetadataFolder: $(cleanOpenAPIFolderV1)
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/php-kiota.yml@self
+ parameters:
+ repoName: msgraph-sdk-php
+ customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store
-- stage: stage_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
+ - stage: stage_php_beta_kiota
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: php_beta_kiota
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
language: 'php'
version: 'beta'
repoName: 'msgraph-beta-sdk-php'
branchName: 'kiota/$(betaBranch)'
targetClassName: "BaseGraphClient"
- targetNamespace: 'Microsoft\\Graph\\Beta\\Generated'
+ targetNamespace: 'Microsoft\Graph\Beta\Generated'
baseBranchName: 'main'
commitMessagePrefix: "feat(generation): update request builders and models"
cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
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
+ - template: /.azure-pipelines/generation-templates/php-kiota.yml@self
+ parameters:
+ repoName: msgraph-beta-sdk-php
+ customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store
-- stage: stage_php_v1_kiota
- dependsOn:
- - stage_build_and_publish_kiota
- - stage_v1_openapi
- condition: |
- and
- (
- eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
- in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
- )
- jobs:
- - job: php_v1_kiota
- steps:
- - template: generation-templates/language-generation-kiota.yml
+ - stage: stage_typescript_v1
+ dependsOn:
+ - stage_build_and_publish_typewriter
+ - stage_v1_metadata
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: typescript_v1
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'typewriter'
+ targetPath: '$(Build.SourcesDirectory)/typewriter'
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanMetadataFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanMetadataFolderV1)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation.yml@self
parameters:
- language: 'php'
+ language: 'TypeScript'
version: ''
- repoName: 'msgraph-sdk-php'
- branchName: 'kiota/$(v1Branch)'
- targetClassName: "BaseGraphClient"
- targetNamespace: 'Microsoft\\Graph\\Generated'
+ repoName: 'msgraph-typescript-typings'
+ branchName: $(v1Branch)
+ cleanMetadataFile: $(cleanMetadataFileV1)
+ cleanMetadataFolder: $(cleanMetadataFolderV1)
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/typescript.yml@self
+ parameters:
+ repoName: 'msgraph-typescript-typings'
+
+ - stage: stage_typescript_beta
+ dependsOn:
+ - stage_build_and_publish_typewriter
+ - stage_beta_metadata
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: typescript_beta
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'typewriter'
+ targetPath: '$(Build.SourcesDirectory)/typewriter'
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanMetadataFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanMetadataFolderBeta)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation.yml@self
+ parameters:
+ language: 'TypeScript'
+ version: 'beta'
+ repoName: 'msgraph-beta-typescript-typings'
+ branchName: $(betaBranch)
+ cleanMetadataFile: $(cleanMetadataFileBeta)
+ cleanMetadataFolder: $(cleanMetadataFolderBeta)
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/typescript.yml@self
+ parameters:
+ repoName: 'msgraph-beta-typescript-typings'
+
+ - stage: stage_typescript_sdk_v1
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: typescript_sdk_v1
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
+ parameters:
+ 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/php-kiota.yml
- parameters:
- repoName: msgraph-sdk-php
- customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and Enable the backing store
+ - template: /.azure-pipelines/generation-templates/typescript-sdk.yml@self
+ parameters:
+ repoName: msgraph-sdk-typescript
+ packageName: '@microsoft/msgraph-sdk'
-- 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
+ - stage: stage_typescript_sdk_beta
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: typescript_sdk_beta
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: 'msgraph-typescript-typings'
+ language: 'typescript'
+ version: 'beta'
+ repoName: 'msgraph-beta-sdk-typescript'
+ baseBranchName: 'main'
+ branchName: $(betaBranch)
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ targetClassName: "GraphBetaBaseServiceClient"
+ targetNamespace: "github.com/microsoftgraph/msgraph-sdk-typescript/"
+ customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store
+ cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/typescript-sdk.yml@self
+ parameters:
+ repoName: msgraph-beta-sdk-typescript
+ packageName: '@microsoft/msgraph-beta-sdk'
-- stage: stage_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
+ - stage: stage_python_v1
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: python_v1
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: 'msgraph-beta-typescript-typings'
+ language: 'python'
+ version: ''
+ repoName: 'msgraph-sdk-python'
+ branchName: $(v1Branch)
+ targetClassName: "BaseGraphServiceClient"
+ targetNamespace: "msgraph.generated"
+ customArguments: "-b -e '/me' -e '/me/**'" # Exclude me and enable backing store
+ cleanMetadataFolder: $(cleanOpenAPIFolderV1)
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/python.yml@self
+ parameters:
+ repoName: msgraph-sdk-python
+ baseDirectory: msgraph
-- stage: stage_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
+ - stage: stage_python_beta
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: python_beta
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: msgraph-sdk-typescript
- packageName: '@microsoft/msgraph-sdk'
+ language: 'python'
+ version: 'beta'
+ repoName: 'msgraph-beta-sdk-python'
+ branchName: $(betaBranch)
+ targetClassName: "BaseGraphServiceClient"
+ targetNamespace: "msgraph_beta.generated"
+ customArguments: "-b -e '/me' -e '/me/**'"
+ cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
+ commitMessagePrefix: "feat(generation): update request builders and models"
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/python.yml@self
+ parameters:
+ repoName: msgraph-beta-sdk-python
+ baseDirectory: msgraph_beta
-- stage: stage_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
+ - stage: stage_agents_m365copilot_csharp_v1
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: csharp_v1_agents_m365copilot
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: msgraph-beta-sdk-typescript
- packageName: '@microsoft/msgraph-beta-sdk'
+ language: 'csharp'
+ version: 'v1'
+ orgName: 'microsoft'
+ repoName: 'Agents-M365Copilot'
+ baseBranchName: 'main'
+ branchName: 'ccs-dotnet/$(v1Branch)'
+ targetClassName: "BaseAgentsM365CopilotServiceClient"
+ targetNamespace: "Microsoft.Agents.M365Copilot"
+ commitMessagePrefix: "feat(generation): update request builders and models for dotnet v1"
+ customArguments: "-i '**/copilot/**'" # include only copilot paths
+ cleanMetadataFolder: $(cleanOpenAPIFolderV1)
+ pathExclusionArguments: ''
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self
+ parameters:
+ repoName: 'Agents-M365Copilot/dotnet'
+ packageName: Microsoft.Agents.M365Copilot
-- stage: stage_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
+ - stage: stage_agents_m365copilot_csharp_beta
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: csharp_beta_agents_m365copilot
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: msgraph-sdk-python
- baseDirectory: msgraph
+ 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: "-i '**/copilot/**'" # include only copilot paths
+ cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
+ pathExclusionArguments: ''
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self
+ parameters:
+ repoName: 'Agents-M365Copilot/dotnet'
+ packageName: Microsoft.Agents.M365Copilot.Beta
-- stage: stage_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
+ - stage: stage_agents_m365copilot_python_v1
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: python_v1_agents_m365copilot
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: msgraph-beta-sdk-python
- baseDirectory: msgraph_beta
+ language: 'python'
+ version: 'v1'
+ orgName: 'microsoft'
+ repoName: 'Agents-M365Copilot'
+ baseBranchName: 'main'
+ branchName: 'ccs-python/$(v1Branch)'
+ targetClassName: "BaseAgentsM365CopilotServiceClient"
+ targetNamespace: "microsoft_agents_m365copilot.generated"
+ customArguments: "-i '**/copilot/**'" # include only copilot paths
+ cleanMetadataFolder: $(cleanOpenAPIFolderV1)
+ commitMessagePrefix: "feat(generation): update request builders and models for python v1"
+ pathExclusionArguments: ''
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/python.yml@self
+ parameters:
+ repoName: 'Agents-M365Copilot/python/packages'
+ baseDirectory: microsoft_agents_m365copilot/microsoft_agents_m365copilot
-- stage: stage_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
+ - stage: stage_agents_m365copilot_python_beta
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: python_beta_agents_m365copilot
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: 'Agents-M365Copilot/dotnet'
- packageName: Microsoft.Agents.M365Copilot.Beta
+ language: 'python'
+ version: 'beta'
+ orgName: 'microsoft'
+ repoName: 'Agents-M365Copilot'
+ baseBranchName: 'main'
+ branchName: 'ccs-python/$(betaBranch)'
+ targetClassName: "BaseAgentsM365CopilotBetaServiceClient"
+ targetNamespace: "microsoft_agents_m365copilot_beta.generated"
+ customArguments: "-i '**/copilot/**'" # include only copilot paths
+ cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
+ commitMessagePrefix: "feat(generation): update request builders and models for python beta"
+ pathExclusionArguments: ''
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/python.yml@self
+ parameters:
+ repoName: 'Agents-M365Copilot/python/packages'
+ baseDirectory: microsoft_agents_m365copilot_beta/microsoft_agents_m365copilot_beta
-- stage: stage_ccs_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
+ - stage: stage_agents_m365copilot_typescript_v1
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_v1_openapi
+ - open_api_v1_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_v1_approval.result, 'Succeeded'),
+ in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: typescript_v1_agents_m365copilot
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderV1)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: 'Agents-M365Copilot/python/packages'
- baseDirectory: microsoft_agents_m365copilot_beta
+ language: 'typescript'
+ version: 'v1'
+ orgName: 'microsoft'
+ repoName: 'Agents-M365Copilot'
+ baseBranchName: 'main'
+ branchName: 'ccs-typescript/$(v1Branch)'
+ commitMessagePrefix: "feat(generation): update request builders and models for typescript v1"
+ targetClassName: "BaseAgentsM365CopilotServiceClient"
+ targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/"
+ customArguments: "-i '**/copilot/**'"
+ cleanMetadataFolder: $(cleanOpenAPIFolderV1)
+ pathExclusionArguments: ''
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/ccs-typescript-sdk.yml@self
+ parameters:
+ repoName: 'Agents-M365Copilot/typescript'
+ packageName: '@microsoft/agents-m365copilot'
-- stage: stage_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
+ - stage: stage_agents_m365copilot_typescript_beta
+ dependsOn:
+ - stage_build_and_publish_kiota
+ - stage_beta_openapi
+ - open_api_beta_approval
+ condition: |
+ and
+ (
+ eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'),
+ eq(dependencies.open_api_beta_approval.result, 'Succeeded'),
+ in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped')
+ )
+ jobs:
+ - job: typescript_beta_agents_m365copilot
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ displayName: 'Downloading metadata from artifacts'
+ buildType: 'current'
+ artifactName: $(cleanOpenAPIFolderBeta)
+ targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)'
+ - input: pipelineArtifact
+ buildType: 'current'
+ artifactName: 'kiota'
+ targetPath: '$(kiotaDirectory)'
+ steps:
+ - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self
parameters:
- repoName: 'Agents-M365Copilot/typescript'
- packageName: '@microsoft/agents-m365copilot-beta'
+ language: 'typescript'
+ version: 'beta'
+ orgName: 'microsoft'
+ repoName: 'Agents-M365Copilot'
+ baseBranchName: 'main'
+ branchName: 'ccs-typescript/$(betaBranch)'
+ commitMessagePrefix: "feat(generation): update request builders and models for typescript beta"
+ targetClassName: "BaseAgentsM365CopilotBetaServiceClient"
+ targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/"
+ customArguments: "-i '**/copilot/**'"
+ cleanMetadataFolder: $(cleanOpenAPIFolderBeta)
+ pathExclusionArguments: ''
+ languageSpecificSteps:
+ - template: /.azure-pipelines/generation-templates/ccs-typescript-sdk.yml@self
+ parameters:
+ repoName: 'Agents-M365Copilot/typescript'
+ packageName: '@microsoft/agents-m365copilot-beta'
diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml
index 3cbf74aad..63b2c8f02 100644
--- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml
+++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml
@@ -1,23 +1,5 @@
steps:
-- template: use-dotnet-sdk.yml
- parameters:
- version: "9.x" #kiota uses a net9 target
-
-- checkout: kiota
- displayName: checkout kiota
- fetchDepth: 1
-
-- pwsh: dotnet build $(Build.SourcesDirectory)/src/kiota/kiota.csproj --configuration $(buildConfiguration)
- displayName: 'Build Kiota'
-
-- task: CopyFiles@2
- inputs:
- sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net9.0'
- contents: '**/*'
- targetFolder: '$(Build.ArtifactStagingDirectory)'
- displayName: Copy Kiota executable
-
-- task: PublishBuildArtifacts@1
- inputs:
- pathToPublish: '$(Build.ArtifactStagingDirectory)'
- artifactName: kiota
+- pwsh: |
+ dotnet tool install Microsoft.OpenApi.Kiota `
+ --tool-path "$(Build.ArtifactStagingDirectory)"
+ displayName: 'Install Kiota via dotnet tool'
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..0c1a7008b 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.*
displayName: 'Install hidi tool'
# verify that generated metadata is parsable as an Edm model
@@ -179,9 +166,9 @@ steps:
# Checkin clean metadata into metadata repo or make it an artifact.
- pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1'
-
- displayName: push clean ${{ parameters.endpoint }} metadata to msgraph-metadata repo
+ displayName: push clean ${{ parameters.endpoint }} CSDL metadata to msgraph-metadata repo
env:
+ CreateOpenAPIPR: False
EndpointVersion: ${{ parameters.endpoint }}
PublishChanges: $(publishChanges)
workingDirectory: '$(Build.SourcesDirectory)/msgraph-metadata'
diff --git a/.azure-pipelines/generation-templates/capture-openapi.yml b/.azure-pipelines/generation-templates/capture-openapi.yml
index 2a08868ca..5bf5b9121 100644
--- a/.azure-pipelines/generation-templates/capture-openapi.yml
+++ b/.azure-pipelines/generation-templates/capture-openapi.yml
@@ -1,9 +1,8 @@
-# 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.
+# capture-openapi.yml
+# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
+# The following template creates multiple artifacts from a matrix, this is the intended behavior to follow the same workflow before the governance migration
+# For more information please refer to: https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/pull/1377#discussion_r2271024012
parameters:
- name: 'endpoint'
type: string
@@ -13,7 +12,8 @@ parameters:
default: $(System.ArtifactsDirectory)
- name: 'cleanMetadataFolder'
type: string
-
+- name: 'skipOpenAPIPRGeneration'
+ type: boolean
jobs:
- job: get_conversion_settings
displayName: "Get conversion settings"
@@ -23,8 +23,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 +40,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 +49,29 @@ jobs:
matrix: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ]
variables:
targets: $[ dependencies.get_conversion_settings.outputs['setTargets.targets'] ]
-
+ templateContext:
+ outputs:
+ - output: pipelineArtifact
+ targetPath: '$(Build.ArtifactStagingDirectory)/$(Name)'
+ artifactName: '${{ parameters.cleanMetadataFolder }}-$(Name)'
steps:
- # We only need the scripts
- checkout: self
displayName: checkout generator
fetchDepth: 1
persistCredentials: true
- - template: checkout-metadata.yml
-
+ - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self
# required for the hidi to run
- - template: use-dotnet-sdk.yml
+ - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self
parameters:
version: '8.x'
# required for the hidi installation validation
- - template: use-dotnet-sdk.yml
+ - 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.*
displayName: install hidi
- pwsh: |
@@ -81,8 +80,13 @@ jobs:
displayName: ensure the generation happens from master latest
workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata
- - pwsh: '$(scriptsDirectory)/generate-open-api.ps1 -endpointVersion ${{ parameters.endpoint }} -settings "$(conversionSettingsDirectory)/$(File)" -platformName "$(Name)"'
- displayName: 'update ${{ parameters.endpoint }} open API description'
+ - pwsh: |
+ Write-Host "`ngit status before generation:"
+ git status
+ $(scriptsDirectory)/generate-open-api.ps1 -endpointVersion ${{ parameters.endpoint }} -settings "$(conversionSettingsDirectory)/$(File)" -platformName "$(Name)"
+ Write-Host "`ngit status after generation:"
+ git status
+ displayName: 'generate ${{ parameters.endpoint }} open API description'
workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata
# publish metadata as an artifact
@@ -90,23 +94,36 @@ jobs:
inputs:
sourceFolder: ${{ parameters.outputPath }}
contents: '**/$(Name).yaml'
- targetFolder: '$(Build.ArtifactStagingDirectory)'
- displayName: Copy generated metadata
-
- - task: PublishBuildArtifacts@1
- inputs:
- pathToPublish: '$(Build.ArtifactStagingDirectory)'
- artifactName: ${{ parameters.cleanMetadataFolder }}
+ targetFolder: '$(Build.ArtifactStagingDirectory)/$(Name)'
+ displayName: Copy generated OpenAPI yaml file to ArtifactStagingDirectory
- pwsh: |
./scripts/run-openapi-validation.ps1 -repoDirectory (Get-Location).Path -version "${{ parameters.endpoint }}" -platformName "$(Name)"
- displayName: ensure that OpenAPI docs can be parsed
+ displayName: Validate that OpenAPI docs can be parsed
workingDirectory: $(Build.SourcesDirectory)/msgraph-metadata
-
- job: publish_openapi
dependsOn: convert_openapi
- displayName: Publish
+ displayName: Publish OpenAPI files
+ ## If there's new settings added please add them here too
+ templateContext:
+ inputs:
+ - input: pipelineArtifact
+ artifactName: '${{ parameters.cleanMetadataFolder }}-default'
+ targetPath: '$(Build.SourcesDirectory)/artifacts'
+ - input: pipelineArtifact
+ artifactName: '${{ parameters.cleanMetadataFolder }}-graphexplorer'
+ targetPath: '$(Build.SourcesDirectory)/artifacts'
+ - input: pipelineArtifact
+ artifactName: '${{ parameters.cleanMetadataFolder }}-openapi'
+ targetPath: '$(Build.SourcesDirectory)/artifacts'
+ - input: pipelineArtifact
+ artifactName: '${{ parameters.cleanMetadataFolder }}-powershell_v2'
+ targetPath: '$(Build.SourcesDirectory)/artifacts'
+ outputs:
+ - output: pipelineArtifact
+ targetPath: '$(Build.ArtifactStagingDirectory)'
+ artifactName: ${{ parameters.cleanMetadataFolder }}
steps:
# We only need the scripts
- checkout: self
@@ -114,19 +131,62 @@ jobs:
fetchDepth: 1
persistCredentials: true
- - template: checkout-metadata.yml
- - template: set-user-config.yml
- - task: DownloadPipelineArtifact@2
+ # Note that msgraph-metadata repo has detached HEAD
+ - template: /.azure-pipelines/generation-templates/checkout-metadata.yml@self
+
+ - template: /.azure-pipelines/generation-templates/set-user-config.yml@self
+
+ # Copy OpenAPI files from the matrix artifacts to the ArtifactStagingDirectory
+ # This is used for library generation later
+ - task: CopyFiles@2
+ inputs:
+ sourceFolder: '$(Build.SourcesDirectory)/artifacts'
+ contents: '**/*.yaml'
+ targetFolder: '$(Build.ArtifactStagingDirectory)'
+ displayName: Copy OpenAPI input artifacts to artifact staging directory
+
+ # Copy OpenAPI files from ArtifactStagingDirectory to local msgraph-metadata repo
+ - task: CopyFiles@2
inputs:
- path: $(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}
- artifact: ${{ parameters.cleanMetadataFolder }}
+ sourceFolder: '$(Build.ArtifactStagingDirectory)'
+ contents: '**/*.yaml'
+ targetFolder: '$(Build.SourcesDirectory)/msgraph-metadata/openapi/${{ parameters.endpoint }}'
+ overwrite: true
+ displayName: Copy OpenAPI files to local msgraph-metadata repo
- # Checkin clean metadata into metadata repo or make it an artifact.
+ # Push changes to msgraph-metadata repo
- pwsh: '$(scriptsDirectory)/git-push-cleanmetadata.ps1'
-
- displayName: push clean ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo
+ condition: eq('${{ parameters.skipOpenAPIPRGeneration }}', false)
+ displayName: Publish ${{ parameters.endpoint }} OpenAPI description to msgraph-metadata repo
env:
+ CreateOpenAPIPR: True
EndpointVersion: ${{ parameters.endpoint }}
PublishChanges: $(publishChanges)
workingDirectory: '$(Build.SourcesDirectory)/msgraph-metadata'
enabled: true
+
+
+ # Create PR - note that this PR is not used for gating. It's just for discovery purposes.
+ # Library generation PRs will still be created based on the OpenAPI files.
+
+ - task: AzureKeyVault@2
+ displayName: "Azure Key Vault: Get Secrets"
+ inputs:
+ azureSubscription: "Federated AKV Managed Identity Connection"
+ KeyVaultName: akv-prod-eastus
+ SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey"
+
+ - pwsh: '$(scriptsDirectory)/create-pull-request.ps1'
+ condition: eq('${{ parameters.skipOpenAPIPRGeneration }}', false)
+ displayName: 'Create Pull Request for the generated OpenAPI files for msgraph-metadata'
+ env:
+ BaseBranch: master
+ GeneratePullRequest: true
+ GhAppId: $(microsoft-graph-devx-bot-appid)
+ GhAppKey: $(microsoft-graph-devx-bot-privatekey)
+ OverrideSkipCI: false
+ RepoName: 'microsoftgraph/msgraph-metadata'
+ ScriptsDirectory: $(scriptsDirectory)
+ # Version is intentionally left empty for OpenAPI PRs as versioning is not applicable in this context.
+ Version: ''
+ workingDirectory: '$(Build.SourcesDirectory)/msgraph-metadata'
\ No newline at end of file
diff --git a/.azure-pipelines/generation-templates/download-kiota.yml b/.azure-pipelines/generation-templates/download-kiota.yml
deleted file mode 100644
index 3e34b4e87..000000000
--- a/.azure-pipelines/generation-templates/download-kiota.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-steps:
-- task: DownloadBuildArtifacts@0
- inputs:
- buildType: 'current'
- downloadType: 'single'
- artifactName: 'kiota'
- downloadPath: '$(Build.SourcesDirectory)'
-
-- bash: chmod +x $(Build.SourcesDirectory)/kiota/kiota
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..847fda7b0 100644
--- a/.azure-pipelines/generation-templates/language-generation-kiota.yml
+++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml
@@ -57,11 +57,9 @@ parameters:
default: "-e '/copilot' -e '/copilot/**'"
steps:
-- template: set-up-for-generation-kiota.yml
+- template: /.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml@self
parameters:
cleanMetadataFolder: ${{ parameters.cleanMetadataFolder }}
- downloadSteps:
- - template: download-kiota.yml
- checkout: ${{ parameters.repoName }}
displayName: 'checkout ${{ parameters.repoName }}'
@@ -89,8 +87,16 @@ steps:
RepoDirectory: $(Build.SourcesDirectory)/${{ parameters.repoName }}
BranchName: ${{ parameters.branchName }}
workingDirectory: ${{ parameters.repoName }}
-
-- bash: '$(kiotaDirectory)/kiota generate --openapi $(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml --language ${{ parameters.language }} -o $(kiotaDirectory)/output -n ${{ parameters.targetNamespace }} -c ${{ parameters.targetClassName }} ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}'
+- pwsh: |
+ Write-Host "=== Files in Kiota Directory ==="
+ Write-Host "Kiota Directory: $(kiotaDirectory)"
+ if (Test-Path "$(kiotaDirectory)") {
+ Get-ChildItem "$(kiotaDirectory)" -Recurse | Format-Table Name, FullName, Length, LastWriteTime -AutoSize
+ } else {
+ Write-Warning "Kiota directory not found: $(kiotaDirectory)"
+ }
+ displayName: 'List files in Kiota directory'
+- pwsh: '& "$(kiotaDirectory)/kiota" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}'
displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}'
env:
KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }}
diff --git a/.azure-pipelines/generation-templates/language-generation.yml b/.azure-pipelines/generation-templates/language-generation.yml
index 0d7aa4757..f172dd678 100644
--- a/.azure-pipelines/generation-templates/language-generation.yml
+++ b/.azure-pipelines/generation-templates/language-generation.yml
@@ -34,12 +34,9 @@ parameters:
displayName: Generate PR after publish changes?
steps:
-- template: set-up-for-generation.yml
+- template: /.azure-pipelines/generation-templates/set-up-for-generation.yml@self
parameters:
cleanMetadataFolder: ${{ parameters.cleanMetadataFolder }}
- downloadSteps:
- - template: download-typewriter.yml
-
- checkout: ${{ parameters.repoName }}
displayName: 'checkout ${{ parameters.repoName }}'
fetchDepth: 1
@@ -67,7 +64,7 @@ steps:
TypewriterExecutable: $(typewriterExecutable)
TypewriterDirectory: $(typewriterDirectory)
Language: ${{ parameters.language }}
- Endpoint: ${{ parameters.version }}
+ Endpoint: ${{ parameters.version }}
displayName: 'Run Typewriter for ${{ parameters.language }} ${{ parameters.version }}'
- ${{ parameters.languageSpecificSteps }}
diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml
index 62b8eb9e5..b1020fcfd 100644
--- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml
+++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml
@@ -1,19 +1,15 @@
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
+ version: "10.x"
-- ${{ parameters.downloadSteps }}
+- pwsh: chmod +x "$(kiotaDirectory)/kiota"
+ displayName: 'Make Kiota executable'
# checkout metadata repo if capture and clean step is skipped
- checkout: msgraph-metadata
@@ -30,16 +26,3 @@ steps:
Move-Item -Path $(Build.SourcesDirectory)/msgraph-metadata/openapi/beta/openapi.yaml -Destination $(Build.SourcesDirectory)/msgraph-metadata/clean_beta_openapi/
displayName: Move metadata to expected location
condition: or(eq(variables.skipMetadataCaptureAndClean, true), eq(variables.skipOpenApiCaptureAndClean, true))
-
-# if capture and clean step is not skipped
-# then download the artifact from capture and clean steps
-# follow the same folder structure as msgraph-metadata repo
-# so that metadata reference path is always the same
-- task: DownloadBuildArtifacts@0
- inputs:
- buildType: 'current'
- downloadType: 'single'
- artifactName: ${{ parameters.cleanMetadataFolder }}
- downloadPath: '$(Build.SourcesDirectory)/msgraph-metadata'
- condition: and(eq(variables.skipMetadataCaptureAndClean, false), eq(variables.skipOpenApiCaptureAndClean, false))
- displayName: Downloading metadata from artifacts
diff --git a/.azure-pipelines/generation-templates/set-up-for-generation.yml b/.azure-pipelines/generation-templates/set-up-for-generation.yml
index 0cfc4daec..4536f99c3 100644
--- a/.azure-pipelines/generation-templates/set-up-for-generation.yml
+++ b/.azure-pipelines/generation-templates/set-up-for-generation.yml
@@ -1,16 +1,10 @@
parameters:
- name: cleanMetadataFolder
type: string
- - name: downloadSteps
- type: stepList
- default:
- - pwsh: |
- Write-Error "No download step is provided"
steps:
-- template: set-user-config.yml
-- template: use-dotnet-sdk.yml
-- ${{ parameters.downloadSteps }}
+- template: /.azure-pipelines/generation-templates/set-user-config.yml@self
+- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self
# checkout metadata repo if capture and clean step is skipped
- checkout: msgraph-metadata
@@ -19,16 +13,3 @@ steps:
persistCredentials: true
submodules: recursive
condition: or(eq(variables.skipMetadataCaptureAndClean, true), eq(variables.skipOpenApiCaptureAndClean, true))
-
-# if capture and clean step is not skipped
-# then download the artifact from capture and clean steps
-# follow the same folder structure as msgraph-metadata repo
-# so that metadata reference path is always the same
-- task: DownloadBuildArtifacts@0
- inputs:
- buildType: 'current'
- downloadType: 'single'
- artifactName: ${{ parameters.cleanMetadataFolder }}
- downloadPath: '$(Build.SourcesDirectory)/msgraph-metadata'
- condition: and(eq(variables.skipMetadataCaptureAndClean, false), eq(variables.skipOpenApiCaptureAndClean, false))
- displayName: Downloading metadata from artifacts
diff --git a/.azure-pipelines/generation-templates/use-dotnet-sdk.yml b/.azure-pipelines/generation-templates/use-dotnet-sdk.yml
index 24246b344..700958ae7 100644
--- a/.azure-pipelines/generation-templates/use-dotnet-sdk.yml
+++ b/.azure-pipelines/generation-templates/use-dotnet-sdk.yml
@@ -5,7 +5,7 @@ parameters:
steps:
- task: UseDotNet@2
- displayName: 'Use .NET SDK'
+ displayName: 'Use .NET SDK ${{ parameters.version }}'
inputs:
packageType: sdk
version: ${{ parameters.version }}
diff --git a/.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml b/.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml
index d08b55ee3..769a1bf56 100644
--- a/.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml
+++ b/.github/policies/MSGraph-SDK-Code-Generator-branch-protection.yml
@@ -9,41 +9,6 @@ resource: repository
configuration:
branchProtectionRules:
- - branchNamePattern: dev
- # This branch pattern applies to the following branches:
- # dev
-
- # Specifies whether this branch can be deleted. boolean
- allowsDeletions: false
- # Specifies whether forced pushes are allowed on this branch. boolean
- allowsForcePushes: false
- # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
- dismissStaleReviews: true
- # Specifies whether admins can overwrite branch protection. boolean
- isAdminEnforced: false
- # Indicates whether "Require a pull request before merging" is enabled. boolean
- requiresPullRequestBeforeMerging: true
- # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
- requiredApprovingReviewsCount: 1
- # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
- requireCodeOwnersReview: true
- # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
- requiresCommitSignatures: false
- # Are conversations required to be resolved before merging? boolean
- requiresConversationResolution: true
- # Are merge commits prohibited from being pushed to this branch. boolean
- requiresLinearHistory: false
- # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
- requiredStatusChecks:
- - build
- - CodeQL
- # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
- requiresStrictStatusChecks: true
- # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
- restrictsPushes: false
- # Restrict who can dismiss pull request reviews. boolean
- restrictsReviewDismissals: false
-
- branchNamePattern: main
# This branch pattern applies to the following branches:
# main
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 625d1eef1..2b47d2251 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -13,10 +13,9 @@ name: "CodeQL"
on:
push:
- branches: [ "dev", "main" ]
+ branches: [ "main" ]
pull_request:
- # The branches below must be a subset of the branches above
- branches: [ "dev" ]
+ branches: [ "main" ]
schedule:
- cron: '1 * * * 1' # At minute 0 on Monday
@@ -46,13 +45,13 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
submodules: recursive
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v3
+ uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -66,7 +65,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v3
+ uses: github/codeql-action/autobuild@v4
with:
working-directory: ${{ github.workspace }}/src/Typewriter
@@ -81,6 +80,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
+ uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 208edc3a8..a8d4fc815 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -2,9 +2,9 @@ name: .NET
on:
push:
- branches: [ main, dev ]
+ branches: [ main ]
pull_request:
- branches: [ main, dev ]
+ branches: [ main ]
jobs:
build:
@@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
with:
submodules: recursive
- name: Setup .NET
- uses: actions/setup-dotnet@v4.3.1
+ uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: 8.0.x
- name: Restore dependencies
@@ -26,13 +26,13 @@ jobs:
- name: Test
run: dotnet test ./Typewriter.sln --no-build --verbosity normal
- name: Upload languages test output on failure
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
if: ${{ failure() }}
with:
name: languages-test-output
path: 'test/Typewriter.Test/bin/Debug/net8.0/OutputDirectory*/**'
- name: Upload unit test output on failure
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
if: ${{ failure() }}
with:
name: unit-test-output
diff --git a/scripts/clean-typescript-ccs-files.ps1 b/scripts/clean-typescript-ccs-files.ps1
index 7698c9e47..7b7bf37fc 100644
--- a/scripts/clean-typescript-ccs-files.ps1
+++ b/scripts/clean-typescript-ccs-files.ps1
@@ -2,11 +2,14 @@ param (
[Parameter(Mandatory = $true)]
[string]
$targetDirectory,
+ [Parameter(Mandatory = $true)]
[string]
- $packageName = "@microsoft/agents-m365copilot"
+ $packageName
)
Push-Location $targetDirectory
+Write-Host "Starting cleaning operation in target directory: $targetDirectory"
+
$kiotaLockFileName = "kiota-lock.json"
# Extract folder name from package name (the part after the slash)
$folderToClean = $packageName.Split("/")[1]
diff --git a/scripts/copy-ccs-typescript-sdk-models.ps1 b/scripts/copy-ccs-typescript-sdk-models.ps1
index 8fae6b6b3..f6a0edbf3 100644
--- a/scripts/copy-ccs-typescript-sdk-models.ps1
+++ b/scripts/copy-ccs-typescript-sdk-models.ps1
@@ -5,8 +5,9 @@ param (
[Parameter(Mandatory = $true)]
[string]
$sourceDirectory,
+ [Parameter(Mandatory = $true)]
[string]
- $packageName = "@microsoft/copilot-beta-sdk"
+ $packageName
)
Write-Host "Path to repo models directory: $targetDirectory"
diff --git a/scripts/create-pull-request.ps1 b/scripts/create-pull-request.ps1
index 3478a084a..d8932c341 100644
--- a/scripts/create-pull-request.ps1
+++ b/scripts/create-pull-request.ps1
@@ -1,16 +1,27 @@
if (($env:OverrideSkipCI -eq $False) -and ($env:BUILD_REASON -eq 'Manual')) # Skip CI if manually running this pipeline.
{
- Write-Host "Skipping pull request creation due Skip CI." -ForegroundColor Green
+ Write-Host "Skipping pull request creation due Skip CI."
return;
}
if (($env:GeneratePullRequest -eq $False)) { # Skip CI if manually running this pipeline.
- Write-Host "Skipping pull request creation due this repository being disabled" -ForegroundColor Green
+ Write-Host "Skipping pull request creation due this repository being disabled"
return;
}
-$version = $env:Version
-$title = "Generated $version models and request builders"
+# Special case for beta typings as it uses a non-conforming preview versioning. Helps with triggering Release Please.
+if ($env:RepoName.Contains("msgraph-beta-typescript-typings"))
+{
+ $title = "feat: generated $env:Version models and request builders"
+}
+elseif ($env:RepoName.Contains("msgraph-metadata")) # we are only generating OpenAPI PRs for the metadata repo
+{
+ $title = "Generated $env:Version OpenAPI descriptions"
+}
+else {
+ $title = "Generated $env: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 = ""
@@ -22,10 +33,10 @@ if (![string]::IsNullOrEmpty($env:BaseBranch))
# The installed application is required to have the following permissions: read/write on pull requests/
$tokenGenerationScript = "$env:ScriptsDirectory\Generate-Github-Token.ps1"
$env:GITHUB_TOKEN = & $tokenGenerationScript -AppClientId $env:GhAppId -AppPrivateKeyContents $env:GhAppKey -Repository $env:RepoName
-Write-Host "Fetched Github Token for PR generation and set as environment variable." -ForegroundColor Green
+Write-Host "Fetched Github Token for PR generation and set as environment variable."
# No need to specify reviewers as code owners should be added automatically.
Invoke-Expression "gh auth login" # login to GitHub
Invoke-Expression "gh pr create -t ""$title"" -b ""$body"" $baseBranchParameter | Write-Host"
-Write-Host "Pull Request Created successfully." -ForegroundColor Green
\ No newline at end of file
+Write-Host "Pull Request Created successfully."
\ No newline at end of file
diff --git a/scripts/generate-open-api.ps1 b/scripts/generate-open-api.ps1
index a3634f115..1788e484b 100644
--- a/scripts/generate-open-api.ps1
+++ b/scripts/generate-open-api.ps1
@@ -21,6 +21,8 @@ param(
[parameter(Mandatory = $true)][String]$platformName
)
+Write-Host "Starting $endpointVersion OpenAPI generation for $platformName using generate-open-api.ps1"
+
$outputFile = Join-Path "./" "openapi" $endpointVersion "$platformName.yaml"
$oldOutputFile = "$outputFile.old"
$cleanVersion = $endpointVersion.Replace(".", "")
@@ -34,16 +36,16 @@ if($platformName -eq "openapi")
$fileName = "$baseFileName$endpointVersion.xml";
$inputFile = Join-Path "./" "clean_$($cleanVersion)_metadata" "$fileName"
-Write-Host "Settings: $settings"
-Write-Verbose "Generating OpenAPI description from $inputFile"
-Write-Verbose "Output file: $outputFile"
+Write-Host "`nSettings: $settings"
+Write-Host "Generating OpenAPI description from $inputFile"
+Write-Host "Output file: $outputFile"
if(Test-Path $outputFile)
{
- Write-Verbose "Removing existing output file"
+ Write-Host "`nRemoving existing output file"
if(Test-Path $oldOutputFile)
{
- Write-Verbose "Removing existing old output file"
+ Write-Host "Removing existing old output file: $oldOutputFile"
Remove-Item $oldOutputFile -Force
}
$oldFileName = Split-Path $outputFile -leaf
@@ -51,6 +53,7 @@ if(Test-Path $outputFile)
Rename-Item $outputFile $oldFileName
}
+Write-Host "`nGenerating OpenAPI description using hidi..."
$command = "hidi transform --csdl ""$inputFile"" --output ""$outputFile"" --settings-path ""$settings"" --version ""3.0"" --metadata-version ""$endpointVersion"" --log-level Information --format yaml"
Write-Host $command
@@ -62,16 +65,18 @@ try {
Set-Content $outputFile $updatedContent -NoNewline
if(Test-Path $oldOutputFile)
{
- Write-Verbose "Removing existing old output file"
+ Write-Host "`nRemoving existing old output file: $oldOutputFile"
Remove-Item $oldOutputFile -Force
}
+ Write-Host "Completed generating OpenAPI description using hidi"
} catch {
if(Test-Path $oldOutputFile)
{
- Write-Warning "Restoring old output file"
+ Write-Host "`nRestoring old output file: $oldOutputFile"
$originalFileName = Split-Path $outputFile -leaf
Rename-Item $oldOutputFile $originalFileName
}
Write-Error "Error generating OpenAPI description: $_"
throw $_
}
+
diff --git a/scripts/git-push-cleanmetadata.ps1 b/scripts/git-push-cleanmetadata.ps1
index cd33e51b1..a580d8a89 100644
--- a/scripts/git-push-cleanmetadata.ps1
+++ b/scripts/git-push-cleanmetadata.ps1
@@ -1,31 +1,85 @@
+# git-push-cleanmetadata.ps1
+# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the
+# project root for license information.
+
+# Referenced by:
+# capture-metadata.yml
+# capture-openapi.yml
+
+# This script stashes any changes, checks out the latest master branch, applies the stashed changes, commits, and
+# pushes the changes back to the remote repository.
+
if ($env:PublishChanges -eq $False)
{
- Write-Host "Not publishing changes per the run parameter!" -ForegroundColor Green
+ Write-Host "Not publishing changes per the run parameter!"
return;
}
-Write-Host "About to add clean $env:EndpointVersion metadata file....."
+Write-Host "`n1. git status:"
+git status | Write-Host
-git fetch origin master
+Write-Host "`n2. Stash the update metadata files.....`n3. Running: git stash"
+git stash | Write-Host
+
+Write-Host "`n4. Fetching latest master branch to ensure we are up to date..."
+git fetch origin master | Write-Host
# checkout master to move from detached HEAD mode
-git switch master
+git switch master | Write-Host
+
+
+
+Write-Host "`n5. git status:"
+git status | Write-Host
+
+Write-Host "`n6. Apply stashed metadata files...`n7. Running: git stash pop"
+git stash pop | Write-Host
+
+Write-Host "`n8. git status:"
+git status | Write-Host
+
+$branch = "publish-open-api-files/$env:BUILD_BUILDID/$env:EndpointVersion"
+if ($env:CreateOpenAPIPR -eq $True)
+{
+ Write-Host "`n9. Create branch: $branch"
+ git checkout -B $branch | Write-Host
+}
+
+Write-Host "`n10. Staging clean $env:EndpointVersion metadata files.....`n11. Running: git add ."
git add . | Write-Host
+
+Write-Host "`n12. git status:"
+git status | Write-Host
+
+Write-Host "`n13. Attempting to commit clean $env:EndpointVersion metadata files....."
+
if ($env:BUILD_REASON -eq 'Manual') # Skip CI if manually running this pipeline.
{
- git commit -m "Update clean metadata file with $env:BUILD_BUILDID [skip ci]" | Write-Host
+ git commit -m "Update clean $env:EndpointVersion metadata file with $env:BUILD_BUILDID [skip ci]" | Write-Host
}
else
{
- git commit -m "Update clean metadata file with $env:BUILD_BUILDID" | Write-Host
+ git commit -m "Update clean $env:EndpointVersion metadata file with $env:BUILD_BUILDID" | Write-Host
}
-Write-Host "Added and commited cleaned $env:EndpointVersion metadata." -ForegroundColor Green
+Write-Host "`n14. git status:"
+git status | Write-Host
+
+if ($env:CreateOpenAPIPR -eq $True)
+{
+ Write-Host "`n15a. Pushing branch for PR creation"
-# sync branch before pushing
-# this is especially important while running v1 and beta in parallel
-# and one process goes out of sync because of the other's check-in
-git pull origin master --rebase
+ Write-Host "`n15b. Running: git push --set-upstream origin $branch"
+ git push --set-upstream origin $branch | Write-Host
+}
+else # original behavior: push to master
+{
+ Write-Host "`n15c. Running: git pull origin master --rebase..."
+ # sync branch before pushing
+ # this is especially important while running v1 and beta in parallel
+ # and one process goes out of sync because of the other's check-in
+ git pull origin master --rebase | Write-Host
-git push --set-upstream origin master | Write-Host
-Write-Host "Pushed the results of the build $env:BUILD_BUILDID to the master branch." -ForegroundColor Green
\ No newline at end of file
+ Write-Host "`n15d. Running: git push --set-upstream origin master ..."
+ git push --set-upstream origin master | Write-Host
+}
\ No newline at end of file