From eddbf1a8d80271f4ea5edeb03878f5f817e4aa43 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 8 Jan 2026 13:59:15 -0600 Subject: [PATCH 1/5] adding release yaml pipeline --- .azure-pipelines/release.yml | 117 +++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 .azure-pipelines/release.yml diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml new file mode 100644 index 00000000000..d4c35bfe724 --- /dev/null +++ b/.azure-pipelines/release.yml @@ -0,0 +1,117 @@ +# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. +# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. +# This pipeline will be extended to the OneESPT template +# The pool section has been filled with placeholder values, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage +# This publishes to https://www.npmjs.com/package/@microsoft/microsoft-graph-types + +name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) +trigger: + tags: + include: + - '*' + +pr: none + +variables: + package_name: 'typescript-msgraph-sdk-v1.0' + +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + pool: + name: Azure-Pipelines-1ESPT-ExDShared + image: windows-latest + os: windows + stages: + - stage: build + jobs: + - job: build_v1_0_typings + displayName: Pack v1.0 typings + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish Artifact drop' + targetPath: '$(Build.ArtifactStagingDirectory)/npm' + artifactName: npm_$(package_name) + steps: + - checkout: self + displayName: checkout main + + - task: UseNode@1 + displayName: 'Install Node.js' + inputs: + version: '22.x' + + - script: npm ci + displayName: 'Install npm dependencies' + workingDirectory: '$(Build.SourcesDirectory)' + + - script: npm run build + displayName: 'Build project' + + - script: npm run test + displayName: 'Run tests' + + - task: PowerShell@2 + displayName: 'Copy README.md to packages' + inputs: + filePath: './scripts/copy-readme.ps1' + + # Pack Typescript sdk packages + - script: npm pack --pack-destination=$(Build.ArtifactStagingDirectory)/npm --workspaces + displayName: 'Generate npm packages of the Typescript msgraph sdk' + workingDirectory: '$(Build.SourcesDirectory)' + + + - stage: deploy + displayName: 'Deploy v1.0 Typescript SDK packages' + # This condition deploys on successful CI runs for success builds and also allows for manual deployments from an arbitrary branch + condition: or(and(contains(variables['Build.SourceBranch'], 'refs/tags/'), succeeded()), eq(variables['Build.Reason'], 'Manual')) + dependsOn: + - build + jobs: + - deployment: deploy_npm + pool: + name: Azure-Pipelines-1ESPT-ExDShared + os: windows + image: windows-latest + dependsOn: [] + environment: msgraph-npm-org + + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: build-drop + targetPath: '$(Build.ArtifactStagingDirectory)/npm' + + strategy: + runOnce: + deploy: + steps: + - task: EsrpRelease@9 + displayName: 'Publish V1.0 NPM package via ESRP Release' + inputs: + connectedservicename: "Federated DevX ESRP Managed Identity Connection" + usemanagedidentity: false + keyvaultname: 'akv-prod-eastus' + authcertname: 'ReferenceLibraryPrivateCert' + signcertname: 'ReferencePackagePublisherCertificate' + clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + intent: 'PackageDistribution' + contenttype: 'npm' + contentsource: 'Folder' + folderlocation: '$(Build.ArtifactStagingDirectory)/npm' + owners: 'mmainer@microsoft.com,mowen@microsoft.com,gavinbarron@microsoft.com' + approvers: 'mmainer@microsoft.com,christiano@microsoft.com,mowen@microsoft.com,lramosvea@microsoft.com,gavinbarron@microsoft.com' + serviceendpointurl: 'https://api.esrp.microsoft.com' + mainpublisher: 'ESRPRELPACMAN' + domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' \ No newline at end of file From 47bbc6a81d8b743b7dc7f6ba4e1f1b7f82c52be2 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 8 Jan 2026 13:59:41 -0600 Subject: [PATCH 2/5] commenting out deploy for now --- .azure-pipelines/release.yml | 86 ++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index d4c35bfe724..e4288dfa990 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -70,48 +70,48 @@ extends: workingDirectory: '$(Build.SourcesDirectory)' - - stage: deploy - displayName: 'Deploy v1.0 Typescript SDK packages' - # This condition deploys on successful CI runs for success builds and also allows for manual deployments from an arbitrary branch - condition: or(and(contains(variables['Build.SourceBranch'], 'refs/tags/'), succeeded()), eq(variables['Build.Reason'], 'Manual')) - dependsOn: - - build - jobs: - - deployment: deploy_npm - pool: - name: Azure-Pipelines-1ESPT-ExDShared - os: windows - image: windows-latest - dependsOn: [] - environment: msgraph-npm-org + # - stage: deploy + # displayName: 'Deploy v1.0 Typescript SDK packages' + # # This condition deploys on successful CI runs for success builds and also allows for manual deployments from an arbitrary branch + # condition: or(and(contains(variables['Build.SourceBranch'], 'refs/tags/'), succeeded()), eq(variables['Build.Reason'], 'Manual')) + # dependsOn: + # - build + # jobs: + # - deployment: deploy_npm + # pool: + # name: Azure-Pipelines-1ESPT-ExDShared + # os: windows + # image: windows-latest + # dependsOn: [] + # environment: msgraph-npm-org - templateContext: - type: releaseJob - isProduction: true - inputs: - - input: pipelineArtifact - artifactName: build-drop - targetPath: '$(Build.ArtifactStagingDirectory)/npm' + # templateContext: + # type: releaseJob + # isProduction: true + # inputs: + # - input: pipelineArtifact + # artifactName: build-drop + # targetPath: '$(Build.ArtifactStagingDirectory)/npm' - strategy: - runOnce: - deploy: - steps: - - task: EsrpRelease@9 - displayName: 'Publish V1.0 NPM package via ESRP Release' - inputs: - connectedservicename: "Federated DevX ESRP Managed Identity Connection" - usemanagedidentity: false - keyvaultname: 'akv-prod-eastus' - authcertname: 'ReferenceLibraryPrivateCert' - signcertname: 'ReferencePackagePublisherCertificate' - clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' - intent: 'PackageDistribution' - contenttype: 'npm' - contentsource: 'Folder' - folderlocation: '$(Build.ArtifactStagingDirectory)/npm' - owners: 'mmainer@microsoft.com,mowen@microsoft.com,gavinbarron@microsoft.com' - approvers: 'mmainer@microsoft.com,christiano@microsoft.com,mowen@microsoft.com,lramosvea@microsoft.com,gavinbarron@microsoft.com' - serviceendpointurl: 'https://api.esrp.microsoft.com' - mainpublisher: 'ESRPRELPACMAN' - domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' \ No newline at end of file + # strategy: + # runOnce: + # deploy: + # steps: + # - task: EsrpRelease@9 + # displayName: 'Publish V1.0 NPM package via ESRP Release' + # inputs: + # connectedservicename: "Federated DevX ESRP Managed Identity Connection" + # usemanagedidentity: false + # keyvaultname: 'akv-prod-eastus' + # authcertname: 'ReferenceLibraryPrivateCert' + # signcertname: 'ReferencePackagePublisherCertificate' + # clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + # intent: 'PackageDistribution' + # contenttype: 'npm' + # contentsource: 'Folder' + # folderlocation: '$(Build.ArtifactStagingDirectory)/npm' + # owners: 'mmainer@microsoft.com,mowen@microsoft.com,gavinbarron@microsoft.com' + # approvers: 'mmainer@microsoft.com,christiano@microsoft.com,mowen@microsoft.com,lramosvea@microsoft.com,gavinbarron@microsoft.com' + # serviceendpointurl: 'https://api.esrp.microsoft.com' + # mainpublisher: 'ESRPRELPACMAN' + # domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' \ No newline at end of file From 641f174462123b9176f1ac5057e0ad019255afcf Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 8 Jan 2026 14:02:37 -0600 Subject: [PATCH 3/5] uncommenting release step --- .azure-pipelines/release.yml | 86 ++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index e4288dfa990..d4c35bfe724 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -70,48 +70,48 @@ extends: workingDirectory: '$(Build.SourcesDirectory)' - # - stage: deploy - # displayName: 'Deploy v1.0 Typescript SDK packages' - # # This condition deploys on successful CI runs for success builds and also allows for manual deployments from an arbitrary branch - # condition: or(and(contains(variables['Build.SourceBranch'], 'refs/tags/'), succeeded()), eq(variables['Build.Reason'], 'Manual')) - # dependsOn: - # - build - # jobs: - # - deployment: deploy_npm - # pool: - # name: Azure-Pipelines-1ESPT-ExDShared - # os: windows - # image: windows-latest - # dependsOn: [] - # environment: msgraph-npm-org + - stage: deploy + displayName: 'Deploy v1.0 Typescript SDK packages' + # This condition deploys on successful CI runs for success builds and also allows for manual deployments from an arbitrary branch + condition: or(and(contains(variables['Build.SourceBranch'], 'refs/tags/'), succeeded()), eq(variables['Build.Reason'], 'Manual')) + dependsOn: + - build + jobs: + - deployment: deploy_npm + pool: + name: Azure-Pipelines-1ESPT-ExDShared + os: windows + image: windows-latest + dependsOn: [] + environment: msgraph-npm-org - # templateContext: - # type: releaseJob - # isProduction: true - # inputs: - # - input: pipelineArtifact - # artifactName: build-drop - # targetPath: '$(Build.ArtifactStagingDirectory)/npm' + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: build-drop + targetPath: '$(Build.ArtifactStagingDirectory)/npm' - # strategy: - # runOnce: - # deploy: - # steps: - # - task: EsrpRelease@9 - # displayName: 'Publish V1.0 NPM package via ESRP Release' - # inputs: - # connectedservicename: "Federated DevX ESRP Managed Identity Connection" - # usemanagedidentity: false - # keyvaultname: 'akv-prod-eastus' - # authcertname: 'ReferenceLibraryPrivateCert' - # signcertname: 'ReferencePackagePublisherCertificate' - # clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' - # intent: 'PackageDistribution' - # contenttype: 'npm' - # contentsource: 'Folder' - # folderlocation: '$(Build.ArtifactStagingDirectory)/npm' - # owners: 'mmainer@microsoft.com,mowen@microsoft.com,gavinbarron@microsoft.com' - # approvers: 'mmainer@microsoft.com,christiano@microsoft.com,mowen@microsoft.com,lramosvea@microsoft.com,gavinbarron@microsoft.com' - # serviceendpointurl: 'https://api.esrp.microsoft.com' - # mainpublisher: 'ESRPRELPACMAN' - # domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' \ No newline at end of file + strategy: + runOnce: + deploy: + steps: + - task: EsrpRelease@9 + displayName: 'Publish V1.0 NPM package via ESRP Release' + inputs: + connectedservicename: "Federated DevX ESRP Managed Identity Connection" + usemanagedidentity: false + keyvaultname: 'akv-prod-eastus' + authcertname: 'ReferenceLibraryPrivateCert' + signcertname: 'ReferencePackagePublisherCertificate' + clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + intent: 'PackageDistribution' + contenttype: 'npm' + contentsource: 'Folder' + folderlocation: '$(Build.ArtifactStagingDirectory)/npm' + owners: 'mmainer@microsoft.com,mowen@microsoft.com,gavinbarron@microsoft.com' + approvers: 'mmainer@microsoft.com,christiano@microsoft.com,mowen@microsoft.com,lramosvea@microsoft.com,gavinbarron@microsoft.com' + serviceendpointurl: 'https://api.esrp.microsoft.com' + mainpublisher: 'ESRPRELPACMAN' + domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' \ No newline at end of file From 9c483327d7815653e923200dbbed9cfdc3210362 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 8 Jan 2026 14:07:20 -0600 Subject: [PATCH 4/5] fixing wrong artifact name --- .azure-pipelines/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index d4c35bfe724..c7854337d4e 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -90,7 +90,7 @@ extends: isProduction: true inputs: - input: pipelineArtifact - artifactName: build-drop + artifactName: npm_$(package_name) targetPath: '$(Build.ArtifactStagingDirectory)/npm' strategy: From 36d8bd85da40de69d640913616918023aaef5854 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 8 Jan 2026 16:05:18 -0600 Subject: [PATCH 5/5] removing marting from owners --- .azure-pipelines/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index c7854337d4e..8e6f015a1bb 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -110,8 +110,8 @@ extends: contenttype: 'npm' contentsource: 'Folder' folderlocation: '$(Build.ArtifactStagingDirectory)/npm' - owners: 'mmainer@microsoft.com,mowen@microsoft.com,gavinbarron@microsoft.com' - approvers: 'mmainer@microsoft.com,christiano@microsoft.com,mowen@microsoft.com,lramosvea@microsoft.com,gavinbarron@microsoft.com' + owners: 'mmainer@microsoft.com,gavinbarron@microsoft.com' + approvers: 'mmainer@microsoft.com,christiano@microsoft.com,lramosvea@microsoft.com,gavinbarron@microsoft.com' serviceendpointurl: 'https://api.esrp.microsoft.com' mainpublisher: 'ESRPRELPACMAN' domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' \ No newline at end of file