Skip to content

Commit 6348979

Browse files
authored
Merge pull request #939 from microsoftgraph/fix/sdk-release-pipeline
Fix sdk release pipeline on azure
2 parents e11bd90 + 91603bd commit 6348979

2 files changed

Lines changed: 92 additions & 85 deletions

File tree

.azure-pipelines/release.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,45 +27,52 @@ extends:
2727
parameters:
2828
pool:
2929
name: Azure-Pipelines-1ESPT-ExDShared
30-
image: windows-latest
31-
os: windows
30+
vmImage: windows-latest
3231
stages:
3332
- stage: build
3433
jobs:
35-
- job: build_v1_0_typings
36-
displayName: Pack v1.0 typings
34+
- job: build_sdk
35+
pool:
36+
name: Azure-Pipelines-1ESPT-ExDShared
37+
image: ubuntu-latest
38+
os: linux
39+
displayName: Build, Test, and Package v1.0 SDK
3740
templateContext:
3841
outputs:
3942
- output: pipelineArtifact
4043
displayName: 'Publish Artifact drop'
41-
targetPath: '$(Build.ArtifactStagingDirectory)/npm'
44+
targetPath: '$(Build.ArtifactStagingDirectory)'
4245
artifactName: npm_$(package_name)
4346
steps:
44-
- checkout: self
45-
displayName: checkout main
46-
4747
- task: UseNode@1
4848
displayName: 'Install Node.js'
4949
inputs:
5050
version: '22.x'
5151

52-
- script: npm ci
53-
displayName: 'Install npm dependencies'
54-
workingDirectory: '$(Build.SourcesDirectory)'
52+
- task: Npm@1
53+
inputs:
54+
command: 'ci'
55+
verbose: true
56+
displayName: 'Install npm dependencies with retry'
5557

5658
- script: npm run build
5759
displayName: 'Build project'
60+
workingDirectory: '$(Build.SourcesDirectory)'
5861

59-
- script: npm run test
60-
displayName: 'Run tests'
62+
# excluding test for now since it requires a tenant and secrets to run
63+
# TODO: create secrets to the pipeline similar to https://github.com/microsoftgraph/msgraph-sdk-typescript/settings/secrets/actions and the build.yml file
64+
# - script: npm run test
65+
# displayName: 'Run tests'
66+
# workingDirectory: '$(Build.SourcesDirectory)'
6167

6268
- task: PowerShell@2
6369
displayName: 'Copy README.md to packages'
6470
inputs:
6571
filePath: './scripts/copy-readme.ps1'
6672

73+
6774
# Pack Typescript sdk packages
68-
- script: npm pack --pack-destination=$(Build.ArtifactStagingDirectory)/npm --workspaces
75+
- script: npm pack --pack-destination=$(Build.ArtifactStagingDirectory) --workspaces
6976
displayName: 'Generate npm packages of the Typescript msgraph sdk'
7077
workingDirectory: '$(Build.SourcesDirectory)'
7178

@@ -80,8 +87,8 @@ extends:
8087
- deployment: deploy_npm
8188
pool:
8289
name: Azure-Pipelines-1ESPT-ExDShared
83-
os: windows
84-
image: windows-latest
90+
image: ubuntu-latest
91+
os: linux
8592
dependsOn: []
8693
environment: msgraph-npm-org
8794

0 commit comments

Comments
 (0)