-
Notifications
You must be signed in to change notification settings - Fork 45
chore(yarn): ensure network isolation for the build and tests #676
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?
Changes from all commits
5ecc0e3
1cb8d99
c3cd9a2
3a8230a
f1f9c99
7e1e24d
691f88d
b5982df
1f9bc11
28a27fe
7be175a
e57fe9e
687c0f7
8ace9a3
ebd513e
2c5e21a
44d7159
537c9e2
8740c70
aedf0bc
1d8817d
20816f1
3ec296e
678142d
03dc551
16e958d
015645e
c46a441
b962048
ce26e31
2e00989
99d8030
de34def
7a338c7
f155dc2
6fc4fc9
41f2e8a
5f042e0
111927d
393ff80
aa194ee
9720770
81542ff
b032a17
b4d6e5f
ae35e6c
bc313a2
6c62852
cdb3e21
b5aef59
4f4d7e8
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 |
|---|---|---|
|
|
@@ -10,6 +10,8 @@ variables: | |
| value: ade7d667-42f5-485a-91a9-f1dc6482a9b0 | ||
| - name: adoNpmFeedBaseUrl | ||
| value: https://pkgs.dev.azure.com/DomoreexpGithub/_packaging/GraphQL/npm/registry/ | ||
| - name: adoMirrorNpmFeedBaseUrl | ||
| value: https://pkgs.dev.azure.com/DomoreexpGithub/Github_Pipelines/_packaging/github-npm-mirror/npm/registry/ | ||
|
|
||
| resources: | ||
| repositories: | ||
|
|
@@ -22,6 +24,8 @@ extends: | |
| template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates | ||
|
|
||
| parameters: | ||
| # settings: | ||
| # networkIsolationPolicy: Permissive,CFSClean | ||
| sdl: | ||
| sourceAnalysisPool: | ||
| name: Azure-Pipelines-1ESPT-ExDShared | ||
|
|
@@ -46,16 +50,37 @@ extends: | |
| steps: | ||
| - checkout: self | ||
| persistCredentials: true # fix for beachball: https://github.com/microsoft/beachball/issues/674 | ||
| fetchDepth: 2 | ||
| - script: yarn | ||
| - script: | | ||
| cat <<'EOF' > "$(Agent.TempDirectory)/npm-mirror.npmrc" | ||
| always-auth=true | ||
| registry=$(adoMirrorNpmFeedBaseUrl) | ||
| EOF | ||
| displayName: Create temporary .npmrc for mirror feed | ||
| - task: npmAuthenticate@0 | ||
| inputs: | ||
| workingFile: "$(Agent.TempDirectory)/npm-mirror.npmrc" | ||
| - script: | | ||
| TOKEN=$(grep '_authToken' "$(Agent.TempDirectory)/npm-mirror.npmrc" | head -1 | cut -d'=' -f2) | ||
| echo "##vso[task.setvariable variable=NPM_TOKEN;issecret=true]$TOKEN" | ||
| displayName: Extract token from .npmrc | ||
| - script: | | ||
| yarn config set npmAlwaysAuth true | ||
| yarn config set npmRegistryServer $(adoMirrorNpmFeedBaseUrl) | ||
| displayName: Configure yarn for ADO npm feed | ||
| - script: yarn install | ||
| displayName: yarn | ||
| env: | ||
| YARN_NPM_AUTH_TOKEN: $(NPM_TOKEN) | ||
| NPM_CONFIG_USERCONFIG: $(Agent.TempDirectory)/npm-mirror.npmrc | ||
| - script: | | ||
| yarn ci | ||
| displayName: build and test [test] | ||
| env: | ||
| NPM_CONFIG_USERCONFIG: $(Agent.TempDirectory)/npm-mirror.npmrc | ||
| - script: | | ||
| git config user.email "gql-svc@microsoft.com" | ||
| git config user.name "Graphitation Service Account" | ||
| git fetch --depth=2 | ||
| git fetch origin main | ||
|
Contributor
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. you sure you don't want to keep depth for faster checkout? fetching all history looks like overkill here
Contributor
Author
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. |
||
| displayName: Configure git for release | ||
| - script: | | ||
| releaseBranch="origin/${BUILD_SOURCEBRANCH#refs/heads/}" | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| approvedGitRepositories: | ||
| - "**" | ||
|
|
||
| enableScripts: true | ||
|
|
||
| nodeLinker: node-modules | ||
|
|
||
| npmMinimalAgeGate: 0 | ||
|
|
||
| yarnPath: .yarn/releases/yarn-4.17.0.cjs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/apollo-forest-run", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/apollo-mock-client", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/apollo-react-relay-duct-tape-compiler", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/apollo-react-relay-duct-tape", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/cli", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/embedded-document-artefact-loader", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-codegen-near-operation-file-preset-with-resolver-metadata", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-codegen-resolvers-models", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-codegen-supermassive-schema-extraction-plugin", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-codegen-supermassive-typed-document-node-plugin", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-codegen-typescript-operations", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-codegen-typescript-typemap-plugin", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-eslint-rules", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-js-operation-payload-generator", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/graphql-js-tag", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/rempl-apollo-devtools", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/supermassive", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/supermassive-extractors", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/ts-codegen", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/ts-transform-graphql-js-tag", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "yarn upgrade", | ||
| "packageName": "@graphitation/webpack-loader", | ||
| "email": "pavelglac@gmail.com", | ||
| "dependentChangeType": "patch" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be commeneted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, currently our pipeline cannot run in network isolation because of npmjs and github enpoints during the release.