From 1c28afd2df73799caf07e7aefc97d72e805de824 Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:38:19 -0800 Subject: [PATCH 1/2] chore: kiota is now downloaded from nuget rather than built locally during pipeline --- .azure-pipelines/generation-pipeline.yml | 6 ------ .../build-and-publish-kiota.yml | 17 +++-------------- .../generation-templates/download-kiota.yml | 5 ----- .../language-generation-kiota.yml | 2 +- .../set-up-for-generation-kiota.yml | 5 ++++- 5 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 .azure-pipelines/generation-templates/download-kiota.yml diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 39280ede9..cf9d1baa6 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -97,10 +97,6 @@ resources: type: github endpoint: microsoftgraph (22) name: microsoftgraph/microsoft-graph-docs - - repository: kiota - type: github - endpoint: microsoftkiota - name: microsoft/kiota - repository: Agents-M365Copilot type: github endpoint: microsoftkiota @@ -175,8 +171,6 @@ extends: parameters: sdl: sourceRepositoriesToScan: - include: - - repository: kiota exclude: - repository: msgraph-sdk-dotnet - repository: msgraph-beta-sdk-dotnet diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 1a5a996a1..90a52a2b5 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,18 +1,7 @@ steps: - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: - version: "10.x" #kiota uses a net10 target + version: "10.x" -- checkout: kiota - displayName: checkout kiota - fetchDepth: 1 - -- pwsh: dotnet build $(Build.SourcesDirectory)/src/kiota/kiota.csproj --configuration $(buildConfiguration) - displayName: 'Build Kiota' - -- task: CopyFiles@2 - inputs: - sourceFolder: '$(Build.SourcesDirectory)/src/kiota/bin/$(BuildConfiguration)/net10.0' - contents: '**/*' - targetFolder: '$(Build.ArtifactStagingDirectory)' - displayName: Copy Kiota executable \ No newline at end of file +- bash: dotnet tool install Microsoft.OpenApi.Kiota --tool-path $(Build.ArtifactStagingDirectory) + displayName: 'Install latest Kiota from NuGet' diff --git a/.azure-pipelines/generation-templates/download-kiota.yml b/.azure-pipelines/generation-templates/download-kiota.yml deleted file mode 100644 index 3ec33e096..000000000 --- a/.azure-pipelines/generation-templates/download-kiota.yml +++ /dev/null @@ -1,5 +0,0 @@ -# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. -# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. -# The 'DownloadBuildArtifacts@0' tasks have been converted to inputs within the `templateContext` section of each job. -steps: -- bash: chmod +x $(Build.SourcesDirectory)/kiota/kiota \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index aedeb6c82..847fda7b0 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -96,7 +96,7 @@ steps: Write-Warning "Kiota directory not found: $(kiotaDirectory)" } displayName: 'List files in Kiota directory' -- pwsh: '& "$(kiotaDirectory)/kiota.exe" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' +- pwsh: '& "$(kiotaDirectory)/kiota" generate --openapi "$(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml" --language "${{ parameters.language }}" -o "$(kiotaDirectory)/output" -n "${{ parameters.targetNamespace }}" -c "${{ parameters.targetClassName }}" ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }}' displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}' env: KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }} diff --git a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml index 980cad008..91682461c 100644 --- a/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/set-up-for-generation-kiota.yml @@ -6,7 +6,10 @@ steps: - template: /.azure-pipelines/generation-templates/set-user-config.yml@self - template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self parameters: - version: "10.x" #kiota uses a net10 target + version: "10.x" + +- bash: chmod +x $(kiotaDirectory)/kiota + displayName: 'Make Kiota executable' # checkout metadata repo if capture and clean step is skipped - checkout: msgraph-metadata From 3eef546c9ebbb3862f8e4360447cc7feb65bf13b Mon Sep 17 00:00:00 2001 From: ramsessanchez <63934382+ramsessanchez@users.noreply.github.com> Date: Fri, 20 Feb 2026 00:29:27 -0800 Subject: [PATCH 2/2] download binaries from github releases --- .../generation-templates/build-and-publish-kiota.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml index 90a52a2b5..3a34ede19 100644 --- a/.azure-pipelines/generation-templates/build-and-publish-kiota.yml +++ b/.azure-pipelines/generation-templates/build-and-publish-kiota.yml @@ -1,7 +1,7 @@ steps: -- template: /.azure-pipelines/generation-templates/use-dotnet-sdk.yml@self - parameters: - version: "10.x" - -- bash: dotnet tool install Microsoft.OpenApi.Kiota --tool-path $(Build.ArtifactStagingDirectory) - displayName: 'Install latest Kiota from NuGet' +- bash: | + LATEST_TAG=$(curl -sL -o /dev/null -w "%{url_effective}" "https://github.com/microsoft/kiota/releases/latest" | rev | cut -d'/' -f1 | rev) + echo "Downloading Kiota $LATEST_TAG" + curl -L "https://github.com/microsoft/kiota/releases/download/${LATEST_TAG}/linux-x64.zip" -o kiota.zip + unzip kiota.zip -d $(Build.ArtifactStagingDirectory) + displayName: 'Download latest Kiota from GitHub'