From e6e584f5e0be69db0e7053dde67986b916d692d6 Mon Sep 17 00:00:00 2001 From: ray chen Date: Tue, 19 Nov 2024 18:45:07 +0000 Subject: [PATCH] Updated pipeline yml and added codeowner --- .github/CODEOWNERS | 1 + tools/spec-gen-sdk/build-spec-gen-sdk.yml | 43 ----------------------- tools/spec-gen-sdk/ci.yml | 41 ++++++++++++++++----- 3 files changed, 34 insertions(+), 51 deletions(-) delete mode 100644 tools/spec-gen-sdk/build-spec-gen-sdk.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 385477446..4c466cea5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -44,6 +44,7 @@ /tools/pipeline-witness/ @hallipr /tools/sdk-ai-bots/ @raych1 /tools/sdk-testgen/ @lirenhe @tadelesh +/tools/spec-gen-sdk/ @raych1 @chidozieononiwu /tools/test-proxy/ @scbedd @mikeharder @benbp /tools/tsp-client/ @catalinaperalta /tools/webhook-router/ @praveenkuttappan @weshaggard diff --git a/tools/spec-gen-sdk/build-spec-gen-sdk.yml b/tools/spec-gen-sdk/build-spec-gen-sdk.yml deleted file mode 100644 index 17fa734ed..000000000 --- a/tools/spec-gen-sdk/build-spec-gen-sdk.yml +++ /dev/null @@ -1,43 +0,0 @@ -parameters: - - name: Publish - type: boolean - default: false - -steps: - - task: NodeTool@0 - inputs: - versionSpec: '$(NodeVersion)' - displayName: 'Install Node.js' - - - bash: | - npm ci - displayName: 'npm ci' - workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk - - - bash: | - npm run build-test - displayName: 'build and test' - workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk - - - bash: | - npm pack - displayName: 'npm pack' - workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk - condition: ${{ parameters.Publish }} - - - bash: 'cp azure-tools-spec-gen-sdk-*.tgz $(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)' - displayName: 'copy to staging directory' - workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk - condition: ${{ parameters.Publish }} - - - pwsh: | - Get-ChildItem -Path $(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY) ` - | ForEach-Object { Write-Host "npm install $($_.FullName)"; npm install $_.FullName } - displayName: Smoke test a package installation - condition: ${{ parameters.Publish }} - - - task: 1ES.PublishPipelineArtifact@1 - inputs: - targetPath: '$(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)' - artifactName: '$(VAR_ARTIFACT_NAME)' - condition: ${{ parameters.Publish }} \ No newline at end of file diff --git a/tools/spec-gen-sdk/ci.yml b/tools/spec-gen-sdk/ci.yml index f007c2ebb..73f9a31bc 100644 --- a/tools/spec-gen-sdk/ci.yml +++ b/tools/spec-gen-sdk/ci.yml @@ -14,11 +14,6 @@ pr: include: - tools/spec-gen-sdk -parameters: - - name: Publish - type: boolean - default: false - extends: template: /eng/pipelines/templates/stages/archetype-sdk-publish-js.yml parameters: @@ -43,6 +38,36 @@ extends: image: $(LINUXVMIMAGE) os: linux steps: - - template: /tools/spec-gen-sdk/build-spec-gen-sdk.yml - parameters: - Publish: ${{ parameters.Publish }} \ No newline at end of file + - task: NodeTool@0 + inputs: + versionSpec: '$(NodeVersion)' + displayName: 'Install Node.js' + + - bash: | + npm ci + displayName: 'npm ci' + workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk + + - bash: | + npm run build-test + displayName: 'build and test' + workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk + + - bash: | + npm pack + displayName: 'npm pack' + workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk + + - bash: 'cp azure-tools-spec-gen-sdk-*.tgz $(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)' + displayName: 'copy to staging directory' + workingDirectory: $(System.DefaultWorkingDirectory)/tools/spec-gen-sdk + + - pwsh: | + Get-ChildItem -Path $(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY) ` + | ForEach-Object { Write-Host "npm install $($_.FullName)"; npm install $_.FullName } + displayName: Smoke test a package installation + + - task: 1ES.PublishPipelineArtifact@1 + inputs: + targetPath: '$(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)' + artifactName: '$(VAR_ARTIFACT_NAME)' \ No newline at end of file