-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87052ba
commit 8d6f000
Showing
1 changed file
with
82 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,82 @@ | ||
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. | ||
trigger: | ||
branches: | ||
include: | ||
- main | ||
- feature/* | ||
- release/* | ||
- hotfix/* | ||
paths: | ||
include: | ||
- tools/apiview/emitters/typespec-apiview | ||
|
||
pr: | ||
branches: | ||
include: | ||
- main | ||
- feature/* | ||
- release/* | ||
- hotfix/* | ||
paths: | ||
include: | ||
- tools/apiview/emitters/typespec-apiview | ||
|
||
extends: | ||
template: /eng/pipelines/templates/stages/archetype-sdk-publish-js.yml | ||
parameters: | ||
BuildStageName: Build | ||
ArtifactName: apiview | ||
PackageJsonPath: $(Build.SourcesDirectory)/tools/apiview/emitters/typespec-apiview | ||
BuildStages: | ||
- stage: 'Build' | ||
variables: | ||
- template: /eng/pipelines/templates/variables/image.yml | ||
- name: NodeVersion | ||
value: '22.x' | ||
- name: TypeSpecEmitterDirectory | ||
value: 'tools/apiview/emitters/typespec-apiview' | ||
jobs: | ||
- job: 'Build' | ||
|
||
pool: | ||
name: $(LINUXNEXTPOOL) | ||
image: $(LINUXNEXTVMIMAGE) | ||
os: linux | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '$(NodeVersion)' | ||
displayName: 'Use NodeJS $(NodeVersion)' | ||
|
||
- script: | | ||
npm ci | ||
workingDirectory: $(TypeSpecEmitterDirectory) | ||
displayName: "Install npm packages for TypeSpec emitter" | ||
- script: | | ||
npm ls -a | ||
workingDirectory: $(TypeSpecEmitterDirectory) | ||
displayName: "List npm packages for TypeSpec emiter" | ||
condition: succeededOrFailed() | ||
continueOnError: true | ||
- script: | | ||
npm run-script build | ||
workingDirectory: $(TypeSpecEmitterDirectory) | ||
displayName: "Build TypeSpec emitter" | ||
- script: | | ||
npm run-script test | ||
workingDirectory: $(TypeSpecEmitterDirectory) | ||
displayName: "Test TypeSpec emitter" | ||
- pwsh: | | ||
npm pack $(TypeSpecEmitterDirectory) | ||
Copy-Item ./*.tgz $(Build.ArtifactStagingDirectory) | ||
displayName: "Pack TypeSpec Emitter" | ||
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml | ||
parameters: | ||
ArtifactName: apiview | ||
ArtifactPath: $(Build.ArtifactStagingDirectory) | ||
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. | ||
trigger: | ||
branches: | ||
include: | ||
- main | ||
- feature/* | ||
- release/* | ||
- hotfix/* | ||
paths: | ||
include: | ||
- tools/apiview/emitters/typespec-apiview | ||
|
||
pr: | ||
branches: | ||
include: | ||
- main | ||
- feature/* | ||
- release/* | ||
- hotfix/* | ||
paths: | ||
include: | ||
- tools/apiview/emitters/typespec-apiview | ||
|
||
extends: | ||
template: /eng/pipelines/templates/stages/archetype-sdk-publish-js.yml | ||
parameters: | ||
BuildStageName: Build | ||
ArtifactName: apiview | ||
PackageJsonPath: $(Build.SourcesDirectory)/tools/apiview/emitters/typespec-apiview | ||
BuildStages: | ||
- stage: 'Build' | ||
variables: | ||
- template: /eng/pipelines/templates/variables/image.yml | ||
- name: NodeVersion | ||
value: '22.x' | ||
- name: TypeSpecEmitterDirectory | ||
value: 'tools/apiview/emitters/typespec-apiview' | ||
jobs: | ||
- job: 'Build' | ||
|
||
pool: | ||
name: $(LINUXNEXTPOOL) | ||
image: $(LINUXNEXTVMIMAGE) | ||
os: linux | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '$(NodeVersion)' | ||
displayName: 'Use NodeJS $(NodeVersion)' | ||
|
||
- script: | | ||
npm ci | ||
workingDirectory: $(TypeSpecEmitterDirectory) | ||
displayName: "Install npm packages for TypeSpec emitter" | ||
- script: | | ||
npm ls -a | ||
workingDirectory: $(TypeSpecEmitterDirectory) | ||
displayName: "List npm packages for TypeSpec emiter" | ||
condition: succeededOrFailed() | ||
continueOnError: true | ||
- script: | | ||
npm run-script build | ||
workingDirectory: $(TypeSpecEmitterDirectory) | ||
displayName: "Build TypeSpec emitter" | ||
- script: | | ||
npm run-script test | ||
workingDirectory: $(TypeSpecEmitterDirectory) | ||
displayName: "Test TypeSpec emitter" | ||
- pwsh: | | ||
npm pack $(TypeSpecEmitterDirectory) | ||
Copy-Item ./*.tgz $(Build.ArtifactStagingDirectory) | ||
displayName: "Pack TypeSpec Emitter" | ||
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml | ||
parameters: | ||
ArtifactName: apiview | ||
ArtifactPath: $(Build.ArtifactStagingDirectory) |