-
Notifications
You must be signed in to change notification settings - Fork 2.9k
ci: Enable 1ES PT to be compliant for all production pipelines. #29702
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
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0e8c1b4
Enable 1ES PT
dannyvv acea7fc
Update azure-pipelines-ci.yml
dannyvv 63fdb47
Update .devops/CredScanSuppressions.json
dannyvv 9237569
Update azure-pipelines-ci.yml
dannyvv 7f73149
Update azure-pipelines.yml
dannyvv c0a2cd6
Merge branch 'master' into 1espt
dannyvv 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,37 @@ | ||
| { | ||
| "tool": "Credential Scanner", | ||
| "suppressions": [ | ||
| { | ||
| "file": ".git/config", | ||
| "_justification": "Standard token for CI pipeline" | ||
| }, | ||
| { | ||
| "file": "node_modules/node-ipc/local-node-ipc-certs/private/oldclient.key", | ||
| "_justification": "External dependency node-ipc, not shipping these files" | ||
| }, | ||
| { | ||
| "file": "node_modules/node-ipc/local-node-ipc-certs/private/server.key", | ||
| "_justification": "External dependency node-ipc, not shipping these files" | ||
| }, | ||
| { | ||
| "file": "node_modules/node-ipc/local-node-ipc-certs/private/oldserver.key", | ||
| "_justification": "External dependency node-ipc, not shipping these files" | ||
| }, | ||
| { | ||
| "file": "node_modules/node-ipc/local-node-ipc-certs/private/client.key", | ||
| "_justification": "External dependency node-ipc, not shipping these files" | ||
| }, | ||
| { | ||
| "file": "node_modules/danger/node_modules/agent-base/test/ssl-cert-snakeoil.key", | ||
| "_justification": "External dependency danger has dependency agent-base with test certs, not shipping these files" | ||
| }, | ||
| { | ||
| "file": "node_modules/danger/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key", | ||
| "_justification": "External dependency danger has dependency http-proxy-agent with test certs, not shipping these files" | ||
| }, | ||
| { | ||
| "file": "node_modules/rollup-plugin-filesize/node_modules/node-gyp/test/fixtures/server.key", | ||
| "_justification": "External dependency rollup-plugin-filesize has dependency node-gyp with test certs, not shipping these files" | ||
| } | ||
| ] | ||
| } | ||
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,48 @@ | ||
| steps: | ||
| - template: tools.yml | ||
|
|
||
| - task: Bash@3 | ||
| inputs: | ||
| filePath: yarn-ci.sh | ||
| displayName: yarn (install packages) | ||
|
|
||
| - script: | | ||
| yarn nx run @fluentui/workspace-plugin:check-graph | ||
| yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify | ||
| yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify | ||
|
|
||
| displayName: Workspace lint | ||
|
|
||
| - script: | | ||
| # @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, thus it needs to be build in advance | ||
| yarn workspace @fluentui/api-docs build | ||
| # @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance | ||
| yarn workspace @fluentui/digest build | ||
| yarn tsc -p ./tsconfig.json | ||
| displayName: Type-check just.config.ts files | ||
|
|
||
| - script: | | ||
| yarn check:installed-dependencies-versions | ||
| displayName: 'check packages: installed dependencies versions' | ||
|
|
||
| - script: | | ||
| if [[ -n "$(targetBranch)" ]]; then | ||
| yarn format --since $(targetBranch) --check | ||
| else | ||
| yarn format --all --check | ||
| fi | ||
| displayName: check formatting | ||
|
|
||
| ## Danger.js checks for Fluent UI N* | ||
| - script: | | ||
| DANGER_DISABLE_TRANSPILATION="true" yarn danger ci | ||
| displayName: danger | ||
| condition: eq(variables.isPR, true) | ||
| env: | ||
| DANGER_GITHUB_API_TOKEN: $(DANGER_GITHUB_API_TOKEN) | ||
|
|
||
| - script: | | ||
| yarn buildci $(sinceArg) | ||
| displayName: build, test, lint, test-ssr | ||
|
|
||
| - template: cleanup.yml |
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
| steps: | ||
| - template: tools.yml | ||
|
|
||
| - task: Bash@3 | ||
| inputs: | ||
| filePath: yarn-ci.sh | ||
| displayName: yarn | ||
|
|
||
| # this also builds FUI N* docs if appropriate | ||
| - script: | | ||
| yarn bundle $(sinceArg) | ||
| displayName: bundle | ||
|
|
||
| - script: | | ||
| yarn lage build-storybook --verbose $(sinceArg) | ||
| displayName: build Storybooks | ||
|
|
||
| ## This runs regardless of scope, the app will adapt to the scope as well | ||
| - script: | | ||
| yarn workspace @fluentui/pr-deploy-site generate:site | ||
| displayName: generate PR Deploy Site | ||
|
|
||
| - task: AzureUpload@2 | ||
| displayName: Upload PR deploy site | ||
| inputs: | ||
| azureSubscription: $(azureSubscription) | ||
| BlobPrefix: $(deployBasePath) | ||
| ContainerName: '$web' | ||
| SourcePath: 'apps/pr-deploy-site/dist' | ||
| storage: $(azureStorage) | ||
|
|
||
| - task: GithubPRStatus@0 | ||
| displayName: 'Update PR deploy site github status' | ||
| inputs: | ||
| githubOwner: microsoft | ||
| githubRepo: fluentui | ||
| githubContext: 'Pull request demo site' | ||
| githubDescription: 'Click "Details" to go to the deployed demo site for this pull request' | ||
| # This MUST have a trailing slash, or the links to PR deploy site assets won't work | ||
| githubTargetLink: $(deployUrl)/ | ||
|
|
||
| - script: | | ||
| yarn e2e $(sinceArg) | ||
| displayName: Cypress E2E tests | ||
|
|
||
| - template: cleanup.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,62 @@ | ||
| pr: none | ||
|
|
||
| trigger: none | ||
|
|
||
| variables: | ||
| - ${{ if not(startsWith(variables['Build.SourceBranch'], 'refs/heads/')) }}: | ||
| - name: sinceArg | ||
| value: --since $(targetBranch) | ||
|
|
||
| - group: fabric-variables | ||
|
|
||
| - template: .devops/templates/variables.yml | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: 1esPipelines | ||
| type: git | ||
| name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
| ref: refs/tags/release | ||
|
|
||
| extends: | ||
| template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines | ||
| parameters: | ||
| pool: | ||
| name: Azure-Pipelines-1ESPT-ExDShared | ||
| image: windows-latest | ||
| os: windows # We need windows because compliance task only run on windows. | ||
| customBuildTags: null # send empty tags since it is not supported on GH repo's for PR's | ||
| customLogIssues: null # send empty tags since it is not supported on GH repo's for PR's | ||
| stages: | ||
| - stage: main | ||
| jobs: | ||
| - job: BuildTestLint | ||
| pool: | ||
| name: '1ES-Host-Ubuntu' | ||
| image: '1ES-PT-Ubuntu-20.04' | ||
| os: linux | ||
| workspace: | ||
| clean: all | ||
| steps: | ||
| - template: .devops/templates/build-test-lint.yml@self | ||
|
|
||
| - job: DeployE2E | ||
| displayName: Deploy and E2E | ||
| workspace: | ||
| clean: all | ||
| pool: | ||
| name: '1ES-Host-Ubuntu' | ||
| image: '1ES-PT-Ubuntu-20.04' | ||
| os: linux | ||
| templateContext: | ||
| outputs: | ||
| - output: pipelineArtifact | ||
| targetPath: $(System.DefaultWorkingDirectory)/apps/pr-deploy-site/dist | ||
| artifactName: web | ||
| steps: | ||
| - template: .devops/templates/deployE2E.yml@self | ||
|
|
||
| # False positive AV. Wi'l follow up with AV owners. For now to get compliant deleting file before. | ||
| - script: | | ||
dannyvv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| rm apps/pr-deploy-site/dist/public-docsite-v9/storybook/407.13419a99614bf685f100.manager.bundle.js | ||
dannyvv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| displayName: 'Remove false positive file' | ||
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,31 @@ | ||
| pr: | ||
| - master | ||
|
|
||
| # There's a separate pipeline for CI which also uses this file, but with a trigger override in the UI | ||
| # https://dev.azure.com/uifabric/fabricpublic/_apps/hub/ms.vss-ciworkflow.build-ci-hub?_a=edit-build-definition&id=164&view=Tab_Triggers | ||
| trigger: none | ||
|
|
||
| variables: | ||
| - ${{ if not(startsWith(variables['Build.SourceBranch'], 'refs/heads/')) }}: | ||
| - name: sinceArg | ||
| value: --since $(targetBranch) | ||
|
|
||
| - group: fabric-variables | ||
|
|
||
| - template: .devops/templates/variables.yml | ||
|
|
||
| pool: '1ES-Host-Ubuntu' | ||
|
|
||
| jobs: | ||
| - job: BuildTestLint | ||
| workspace: | ||
| clean: all | ||
| steps: | ||
| - template: .devops/templates/build-test-lint.yml | ||
|
|
||
| - job: DeployE2E | ||
| displayName: Deploy and E2E | ||
| workspace: | ||
| clean: all | ||
| steps: | ||
| - template: .devops/templates/deployE2E.yml |
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.