-
Notifications
You must be signed in to change notification settings - Fork 232
Build pipeline #1026
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
Merged
Merged
Build pipeline #1026
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5636d10
Set up CI with Azure Pipelines
nikithauc cfca916
remove trigger
nikithauc 024312f
Merge branch 'dev' into nikithauc/buildPipeline
nikithauc d35997b
Merge branch 'dev' into nikithauc/buildPipeline
nikithauc cad4c84
Merge branch 'dev' into nikithauc/buildPipeline
nikithauc 34c40cc
adding common security template
nikithauc 8d2fd33
using windows image when testing
nikithauc 46150ed
junit runner; publish result
nikithauc 003a62d
contents to ignore
nikithauc 3434c2d
script for each line
nikithauc 5465f95
displayName for each script
nikithauc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| # Node.js | ||
| # Build a general Node.js project with npm. | ||
| # Add steps that analyze code, save build artifacts, deploy, and more: | ||
| # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript | ||
|
|
||
| name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) | ||
|
|
||
| trigger: | ||
| branches: | ||
| include: | ||
| - main | ||
|
|
||
| pr: none | ||
|
|
||
|
|
||
| stages: | ||
| - stage: "Test" | ||
| jobs: | ||
| - job: | ||
| pool: | ||
| vmImage: windows-latest | ||
| strategy: | ||
| matrix: | ||
| Node 12: | ||
| NODE_VERSION: '12.x' | ||
| Node 14: | ||
| NODE_VERSION: '14.x' | ||
| Node 16: | ||
| NODE_VERSION: '16.x' | ||
| maxParallel: 2 | ||
| steps: | ||
| - template: ./common-templates/security-pre-checks.yml | ||
| - task: NodeTool@0 | ||
| inputs: | ||
| versionSpec: $(NODE_VERSION) | ||
| displayName: 'Install Node.js' | ||
|
|
||
| - script: npm ci | ||
| displayName: 'npm install for tests' | ||
| - script: npm run build | ||
| displayName: 'npm build for tests' | ||
| - script: npm run test | ||
| displayName: 'Run the node tests' | ||
| - script: npm run karma | ||
| displayName: 'Run karma tests' | ||
|
|
||
| - task: PublishTestResults@2 | ||
| displayName: 'Publish Unit Test Results' | ||
| inputs: | ||
| testResultsFormat: 'JUnit' | ||
| testResultsFiles: '**/testResult.xml' | ||
| failTaskOnFailedTests: true | ||
|
|
||
| - template: ./common-templates/security-post-checks.yml | ||
|
|
||
| - stage: "Build" | ||
| jobs: | ||
| - job: | ||
|
|
||
| pool: | ||
| vmImage: ubuntu-latest | ||
| steps: | ||
| - task: NodeTool@0 | ||
| inputs: | ||
| versionSpec: '16.x' | ||
| displayName: 'Install Node.js' | ||
|
|
||
| - script: | | ||
| npm ci | ||
| npm run build | ||
| displayName: 'Build for production artifact' | ||
| - task: CopyFiles@2 | ||
| inputs: | ||
| sourceFolder: '$(Build.SourcesDirectory)' | ||
| targetFolder: $(Build.ArtifactStagingDirectory) | ||
| Contents: | | ||
| **/* | ||
| !test/** | ||
| !.azure-pipelines/** | ||
| !.github/** | ||
| !.git/** | ||
| !.vscode/** | ||
| !node_modules/** | ||
| displayName: 'Copy npm package' | ||
|
|
||
| - task: PublishBuildArtifacts@1 | ||
| inputs: | ||
| pathtoPublish: $(Build.ArtifactStagingDirectory) | ||
| artifactName: "release-drop" | ||
| displayName: 'Publish artifacts' | ||
|
|
||
|
|
||
53 changes: 53 additions & 0 deletions
53
.azure-pipelines/common-templates/security-post-checks.yml
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
| steps: | ||
| - task: CodesignValidation@0 | ||
|
|
||
| - task: SdtReport@1 | ||
| displayName: "Security Analysis Report" | ||
| continueOnError: true | ||
| condition: succeededOrFailed() | ||
| inputs: | ||
| AllTools: false | ||
| APIScan: false | ||
| BinSkim: false | ||
| BinSkimBreakOn: "WarningAbove" | ||
| CodesignValidation: true | ||
| CodesignValidationBreakOn: "WarningAbove" | ||
| CredScan: true | ||
| FortifySCA: false | ||
| FxCop: false | ||
| ModernCop: false | ||
| MSRD: false | ||
| PoliCheck: true | ||
| PoliCheckBreakOn: "Severity1" | ||
| RoslynAnalyzers: true | ||
| RoslynAnalyzersBreakOn: "WarningAbove" | ||
| SDLNativeRules: false | ||
| Semmle: false | ||
| TSLint: false | ||
| TSLintBreakOn: "WarningAbove" | ||
| ToolLogsNotFoundAction: "Standard" | ||
|
|
||
| - task: PublishSecurityAnalysisLogs@3 | ||
| displayName: "Publish Security Analysis Logs" | ||
| inputs: | ||
| ArtifactName: "CodeAnalysisLogs" | ||
| ArtifactType: "Container" | ||
| AllTools: false | ||
| AntiMalware: false | ||
| APIScan: false | ||
| BinSkim: false | ||
| CodesignValidation: true | ||
| CredScan: true | ||
| FortifySCA: false | ||
| FxCop: false | ||
| ModernCop: true | ||
| MSRD: false | ||
| PoliCheck: true | ||
| RoslynAnalyzers: true | ||
| SDLNativeRules: false | ||
| Semmle: false | ||
| TSLint: false | ||
| WebScout: false | ||
| ToolLogsNotFoundAction: "Standard" |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
| steps: | ||
| - task: CredScan@2 | ||
| displayName: "Run CredScan" | ||
| inputs: | ||
| debugMode: false | ||
| batchSize: 20 | ||
| toolMajorVersion: "V2" | ||
| searchersFileType: "Skype" | ||
|
|
||
| - task: PoliCheck@1 | ||
| displayName: "Run PoliCheck" | ||
| condition: and(succeeded(), eq(eq(variables['Build.SourceBranch'], 'refs/heads/main'), false)) | ||
| inputs: | ||
| targetType: F | ||
| SOMEnabled: true | ||
| optionsFC: 0 | ||
| optionsXS: 0 | ||
| optionsHMENABLE: 0 | ||
| continueOnError: true |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -28,4 +28,6 @@ test/development/secrets.ts | |
|
|
||
| .nyc_output/* | ||
|
|
||
| .idea/* | ||
| .idea/* | ||
|
|
||
| testResult.xml | ||
This file contains hidden or 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,4 +1,5 @@ | ||
| src/ | ||
| scripts/ | ||
| design/ | ||
| changelogs/ | ||
| changelogs/ | ||
| testResult.xml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.