-
Notifications
You must be signed in to change notification settings - Fork 23
Add azure pipelines #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add azure pipelines #414
Changes from all commits
8b50781
298426e
6c358af
3fd3ccb
7f0423f
6698682
7443379
fa5f7d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Azure Pipelines equivalent of .github/workflows/build-test-lint.yml | ||
|
|
||
| trigger: | ||
| branches: | ||
| include: | ||
| - main | ||
|
|
||
| pr: | ||
| branches: | ||
| include: | ||
| - '*' | ||
|
|
||
| # Manual trigger support | ||
| schedules: [] | ||
|
|
||
| pool: | ||
| vmImage: 'ubuntu-latest' | ||
|
|
||
| steps: | ||
| - checkout: self | ||
| clean: true | ||
|
|
||
| - task: NodeTool@0 | ||
| displayName: 'Use Node.js 23.x' | ||
| inputs: | ||
| versionSpec: '23.x' | ||
|
|
||
| - script: echo "registry=https://pkgs.dev.azure.com/dynamicscrm/OneCRM/_packaging/DPX-Tools-Upstream/npm/registry/" > .npmrc | ||
| displayName: 'Set NPM registry' | ||
|
|
||
| - task: npmAuthenticate@0 | ||
| inputs: | ||
| workingFile: .npmrc | ||
|
|
||
| - task: Npm@1 | ||
| inputs: | ||
| command: ci | ||
| customRegistry: useFeed | ||
| customFeed: OneCRM/DPX-Tools-Upstream | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should use our one feed, not this one |
||
| verbose: true | ||
| workingDir: . | ||
| displayName: 'npm ci' | ||
|
|
||
| - script: npm run lint | ||
| displayName: 'Lint' | ||
|
|
||
| - script: npm run build | ||
| displayName: 'Build' | ||
|
|
||
| - script: npm run test | ||
| displayName: 'Test' | ||
|
|
||
| - script: | | ||
| mkdir -p $(Build.ArtifactStagingDirectory)/packages | ||
| for dir in packages/* external/*; do | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: why do we have a tree here? can we flat the source tree under packages? Also, I'd suggest to use npm workspaces, so we can run single commands from the root |
||
| if [ -d "$dir" ] && [ -f "$dir/package.json" ]; then | ||
| echo "Packing $dir..." | ||
| (cd "$dir" && npm pack --pack-destination $(Build.ArtifactStagingDirectory)/packages) | ||
| fi | ||
| done | ||
| displayName: 'Pack artifacts' | ||
|
|
||
| - task: PublishBuildArtifacts@1 | ||
| inputs: | ||
| pathToPublish: '$(Build.ArtifactStagingDirectory)/packages' | ||
| artifactName: 'npm-packages' | ||
| publishLocation: 'Container' | ||
| displayName: 'Publish package artifacts' | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.