-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(PPDSC-2670): merge branch main into docs/PPDSC-2670-title
- Loading branch information
Showing
387 changed files
with
14,411 additions
and
10,782 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ orbs: | |
slack: circleci/[email protected] | ||
aws-cli: circleci/[email protected] | ||
github-cli: circleci/[email protected] | ||
node: circleci/[email protected] | ||
|
||
slack_notify: &slack_notify | ||
event: 'fail' | ||
|
@@ -1060,11 +1061,12 @@ jobs: | |
at: ~/project | ||
- aws-cli/setup: | ||
role-arn: << parameters.aws_assume_role_arn >> | ||
profile-name: "NEWSKIT-OIDC-PROFILE" | ||
role-session-name: "${CIRCLE_WORKFLOW_ID}-s3-push" | ||
profile-name: 'NEWSKIT-OIDC-PROFILE' | ||
role-session-name: '${CIRCLE_WORKFLOW_ID}-s3-push' | ||
- run: | ||
name: Upload sites to given S3 paths | ||
command: | # output current date time to a HTML file to allow a in-browser that check CDN does not return old files | ||
command: | ||
| # output current date time to a HTML file to allow a in-browser that check CDN does not return old files | ||
export AWS_DEFAULT_REGION=<< parameters.aws_region >> | ||
export s3Path_docs=<< parameters.s3Path_docs >> | ||
export s3Path_storybook=<< parameters.s3Path_storybook >> | ||
|
@@ -1076,22 +1078,40 @@ jobs: | |
- slack/notify: | ||
<<: *slack_notify | ||
|
||
# Deprecated by push_s3_general_oidc | ||
push_s3_pr: | ||
executor: aws-cli/default #TODO: refactor other steps to use this orb it's much cleaner, install and setup can then be moved into the shared aws step | ||
push_s3_pr_oidc: | ||
parameters: | ||
aws_region: | ||
description: AWS Region | ||
type: string | ||
default: '${AWS_DEFAULT_REGION}' | ||
aws_assume_role_arn: | ||
description: AWS ARN For Assume Role | ||
type: string | ||
default: '${S3_AWS_ASSUME_ROLE_ARN}' | ||
executor: aws-cli-and-terraform | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/project | ||
- aws-cli/install | ||
- aws-cli/setup | ||
- aws-cli/setup: | ||
role-arn: << parameters.aws_assume_role_arn >> | ||
profile-name: 'NEWSKIT-OIDC-PROFILE' | ||
role-session-name: '${CIRCLE_WORKFLOW_ID}-s3-push' | ||
- node/install: | ||
install-yarn: false | ||
node-version: '16.13' | ||
- run: | ||
name: Upload PR sites to S3 subfolders | ||
command: | | ||
export s3Path_docs=$(node scripts/s3-pr-branch-naming.js ${CIRCLE_BRANCH} 's3://ncu-newskit-docs/') | ||
export AWS_DEFAULT_REGION=<< parameters.aws_region >> | ||
export s3Path_docs=$(node scripts/s3-pr-branch-naming.js ${CIRCLE_BRANCH} 's3://ncu-newskit-docs-pr/') | ||
echo "${SITE_ENV} $(date)" > timestamp.html | ||
aws s3 cp public $s3Path_docs --recursive | ||
export s3Path_storybook=$(node scripts/s3-pr-branch-naming.js ${CIRCLE_BRANCH} 's3://ncu-newskit-docs/' 'storybook') | ||
aws s3 cp timestamp.html $s3Path_docs | ||
export s3Path_storybook=$(node scripts/s3-pr-branch-naming.js ${CIRCLE_BRANCH} 's3://ncu-newskit-docs-pr/' 'storybook/') | ||
echo $s3Path_storybook | ||
aws s3 cp dist-storybook $s3Path_storybook --recursive | ||
aws s3 cp timestamp.html $s3Path_storybook | ||
- slack/notify: | ||
<<: *slack_notify | ||
|
||
|
@@ -1108,8 +1128,8 @@ jobs: | |
circleci-agent step halt | ||
else | ||
gh pr comment --body "You can preview these changes on: | ||
Documentation Site: $(node scripts/pr_comment_link.js ${CIRCLE_BRANCH} 'http://ncu-newskit-docs.s3-website-eu-west-1.amazonaws.com/' 'docs') | ||
Storybook: $(node scripts/pr_comment_link.js ${CIRCLE_BRANCH} 'http://ncu-newskit-docs.s3-website-eu-west-1.amazonaws.com/' 'storybook')" | ||
Documentation Site: $(node scripts/pr_comment_link.js ${CIRCLE_BRANCH} 'http://ncu-newskit-docs-pr.s3-website-eu-west-1.amazonaws.com/' 'docs') | ||
Storybook: $(node scripts/pr_comment_link.js ${CIRCLE_BRANCH} 'http://ncu-newskit-docs-pr.s3-website-eu-west-1.amazonaws.com/' 'storybook')" | ||
fi | ||
- slack/notify: | ||
<<: *slack_notify | ||
|
@@ -1463,11 +1483,11 @@ workflows: | |
tf_env: false | ||
requires: | ||
- init_aws | ||
- deploy_terraform: | ||
- deploy_terraform_oidc: | ||
name: deploy_terraform_s3_pr | ||
package: s3 | ||
context: ncu-product-platforms-context | ||
apply: false | ||
package: s3/dev-newskit | ||
context: ncu-newskit-site-pr | ||
apply: true | ||
tf_env: false | ||
environment: pr | ||
requires: | ||
|
@@ -1504,9 +1524,9 @@ workflows: | |
context: ncu-newskit-site-pr | ||
requires: | ||
- build_icons | ||
- push_s3_pr: | ||
- push_s3_pr_oidc: | ||
name: deploy_to_s3_pr | ||
context: ncu-product-platforms-context | ||
context: ncu-newskit-site-pr | ||
requires: | ||
- deploy_terraform_s3_pr | ||
- build_docs_pr | ||
|
@@ -1519,6 +1539,7 @@ workflows: | |
- validate_terraform: | ||
name: validate_terraform | ||
requires: | ||
- deploy_terraform_s3_pr | ||
- validate_deploy_terraform_s3_dev | ||
- validate_deploy_terraform_s3_staging | ||
- validate_deploy_terraform_s3_prod | ||
|
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ node_modules | |
.env | ||
.DS_STORE | ||
.eslintcache | ||
.env.local | ||
build | ||
*.log | ||
dist | ||
|
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ import { | |
|
||
const unlimitedScenarios = [ | ||
'Accordion', | ||
'Paragraph', | ||
'grid', | ||
'stack', | ||
'card', | ||
|
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
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 |
---|---|---|
|
@@ -51,10 +51,16 @@ Scripts should be named using the following naming convention: | |
|
||
* `e2e:docs:ci` -> starts serve:docs and runs the cypress docs tests headlessly. | ||
|
||
Run Percy from main branch if you want to force the baseline images to be updated. The two commands to yarn run, after you have switched to main branch and done a git pull, are shown below: | ||
|
||
* `test:visual:comps:local:percy` -> sets required env variables and runs the percy component tests locally. | ||
|
||
* `e2e:visual:docs:local:percy` -> sets required env variables and runs the percy doc site tests locally. | ||
|
||
Image updating normally happens whenever a PR is merged to main, but occasionally it can get out of sync. NB Do *not* set PERCY_PARTIAL_BUILD=1 on main branch, as that is not supported (only on feature branches). We use it on the pull_request workflow to bypass a full visual regression (just one dummy test is run). | ||
|
||
Percy support issues can be raised by emailing [email protected]. | ||
|
||
## Storybook | ||
|
||
* `dev:storybook` -> locally starts storybook at port 6006. | ||
|
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
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
Oops, something went wrong.