-
Notifications
You must be signed in to change notification settings - Fork 34
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
Adds Storybook topic deploys to Bacon #2292
Closed
Closed
Changes from 50 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
cfd4edc
fix: upgrades Applitools
KevinGhadyani-Okta 181ba04
fix: reduces Applitools concurrency per Ali Parsa
KevinGhadyani-Okta f849a50
fix: adds Visual Regression Test to Bacon
KevinGhadyani-Okta 7e12332
fix: adds Storybook publish script
KevinGhadyani-Okta 45117e3
fix: updates visual regression test script
KevinGhadyani-Okta 871f36e
fix: updates Bacon yaml
KevinGhadyani-Okta cd4b49a
Merge branch 'main' into kg_bacon_another
KevinGhadyani-Okta 85a3572
fix: removed root version number that isn't used in Odyssey
KevinGhadyani-Okta 2ddc7c2
fix: add releng.yml
KevinGhadyani-Okta 00a5804
fix: updates to 1.17.1
KevinGhadyani-Okta 78568bd
fix: rename releng.yml to .releng.yml
KevinGhadyani-Okta 0c5f359
Merge branch '1.17' into kg_bacon_another
KevinGhadyani-Okta 04b320f
fix: added APPLITOOLS_SERVER_URL as an env var to visual-regression-t…
KevinGhadyani-Okta 38248ff
feat: updated Storybook publish steps
KevinGhadyani-Okta 6ee893b
fix: update queue name of Visual Regression test
KevinGhadyani-Okta 5263842
fix: adds vrt logging
KevinGhadyani-Okta 594deea
fix: install Chromium before running VRTs
KevinGhadyani-Okta c028e1d
fix: trying snap install
KevinGhadyani-Okta 68fdca7
fix: only installing Chromium with snap
KevinGhadyani-Okta 097af4f
fix: change to setup_service
KevinGhadyani-Okta e5b4d2e
fix: another attempt at a Chromium install
KevinGhadyani-Okta c312888
build: fix VRT using Monolith version
KevinGhadyani-Okta 12954f4
fix: removes unused Chrome check
KevinGhadyani-Okta 4e2904d
build: adds chromedriver install
KevinGhadyani-Okta 084e9b2
build: upgrades chrome version
KevinGhadyani-Okta aed2a42
build: use Artifactory chromedriver
KevinGhadyani-Okta 84f019f
build: updates CHROME_DRIVER variable name
KevinGhadyani-Okta e881621
Merge remote-tracking branch 'origin/main' into kg_bacon_another
KevinGhadyani-Okta 6c2da9f
fix: upgrades eyes-storybook
KevinGhadyani-Okta d1287f3
fix: adds logging from Applitools
KevinGhadyani-Okta 9ea0522
build: potential fix for Puppeteer failing on Amazon Linux 2023
KevinGhadyani-Okta ecea098
build: second fix for Puppeteer to get Applitools working on Amazon L…
KevinGhadyani-Okta f0f99ab
build: running VRTs as limited user
KevinGhadyani-Okta 9cdab4f
build: add Puppeteer debugging
KevinGhadyani-Okta a544c76
build: try running VRTs as another user again
KevinGhadyani-Okta 4c1466c
build: forced headless in Applitools
KevinGhadyani-Okta d699b18
build: seeing if interaction tests work with the AL2023 image
KevinGhadyani-Okta 36f5d7d
build: removed `sudo` from VRTs chromedriver install
KevinGhadyani-Okta df24f84
Revert "build: seeing if interaction tests work with the AL2023 image"
KevinGhadyani-Okta 2fdcb0f
build: removes creating user and fixes chromedriver code
KevinGhadyani-Okta 26f36e8
build: updates Storybook topic deploy to use Aperture
KevinGhadyani-Okta f9806fb
build: adds missing build step to publishing topic package and Storybook
KevinGhadyani-Okta fe0992f
build: switched from npm-release to npm-topic for Storybook Aperture
KevinGhadyani-Okta deb68f5
build: storybook topic
KevinGhadyani-Okta 3be4bc4
build: adds Storybook URL
KevinGhadyani-Okta f64ae35
build: removes Notify Slack webhook for now
KevinGhadyani-Okta 021d23d
build: deploy storybook from correct dist dir
KevinGhadyani-Okta 9ef5616
build: fixed Storybook topic publish step
KevinGhadyani-Okta 97243f3
build: attempt at fixing Storybook topic deploy
KevinGhadyani-Okta 7f9c08c
build: made VRTs optional as they're not yet working
KevinGhadyani-Okta 9b692fc
build: removed extra logging from Applitools config
KevinGhadyani-Okta 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 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
Binary file added
BIN
+61.4 KB
.yarn/cache/@applitools-core-base-npm-1.16.0-0886e55624-a3376a085f.zip
Binary file not shown.
Binary file removed
BIN
-53.9 KB
.yarn/cache/@applitools-core-base-npm-1.9.1-41c40f38b2-da71f85afb.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+405 KB
...-tree-npm-1.1.2-4d9822bee1-969967455e.zip → ...-tree-npm-1.1.4-edf8d936ef-c47ac208c3.zip
Binary file not shown.
Binary file removed
BIN
-240 KB
.yarn/cache/@applitools-dom-capture-npm-11.2.6-3e7093f71b-13b215614e.zip
Binary file not shown.
Binary file added
BIN
+241 KB
.yarn/cache/@applitools-dom-capture-npm-11.3.0-293398bfb8-3abc086279.zip
Binary file not shown.
Binary file renamed
BIN
+14.3 KB
...ared-npm-1.0.13-ec596082ab-b6dffd39c6.zip → ...ared-npm-1.0.15-d554142e2f-6111c2cce1.zip
Binary file not shown.
Binary file added
BIN
+262 KB
.yarn/cache/@applitools-dom-snapshot-npm-4.11.3-9a95f566aa-1befbcc1cd.zip
Binary file not shown.
Binary file removed
BIN
-261 KB
.yarn/cache/@applitools-dom-snapshot-npm-4.9.2-00ec446724-3c6e71a454.zip
Binary file not shown.
Binary file renamed
BIN
+66.8 KB
...iver-npm-1.16.5-3d166ba37e-f20f35ec42.zip → ...iver-npm-1.17.5-f8933180ae-8ddfe33c02.zip
Binary file not shown.
Binary file renamed
BIN
+39.8 KB
...ient-npm-1.7.30-1512bf8773-6ce9722441.zip → ...lient-npm-1.9.2-ce8ccdd56b-190d110e96.zip
Binary file not shown.
Binary file renamed
BIN
+46.9 KB
...erver-npm-0.5.4-7b45b795f9-092d0510db.zip → ...erver-npm-0.5.6-3a19125f3b-1f4949b6d1.zip
Binary file not shown.
Binary file removed
BIN
-27.2 KB
.yarn/cache/@applitools-execution-grid-tunnel-npm-2.1.10-9089120d91-5e882d0b31.zip
Binary file not shown.
Binary file added
BIN
+33.7 KB
.yarn/cache/@applitools-execution-grid-tunnel-npm-3.0.5-5c647d96de-ff26460ad9.zip
Binary file not shown.
Binary file removed
BIN
-75.1 KB
.yarn/cache/@applitools-eyes-storybook-npm-3.47.4-69b64b8932-121076a90f.zip
Binary file not shown.
Binary file added
BIN
+78.4 KB
.yarn/cache/@applitools-eyes-storybook-npm-3.50.6-6d6ecc3034-8c9c95440e.zip
Binary file not shown.
Binary file renamed
BIN
+21.8 KB
...image-npm-1.1.9-48062dbc2f-1febd4dd2c.zip → ...mage-npm-1.1.13-c97b4f700c-b11b82c332.zip
Binary file not shown.
Binary file renamed
BIN
+23.4 KB
...gger-npm-2.0.14-af5626e3f0-52b53cc613.zip → ...gger-npm-2.0.18-e09e75f8db-179dc26b45.zip
Binary file not shown.
Binary file renamed
BIN
+24.1 KB
...lient-npm-1.7.5-5243643f33-50223945fe.zip → ...lient-npm-1.8.8-020220fb95-95025d7d95.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+22.8 KB
...oter-npm-3.8.27-2ce695e2c2-a516208621.zip → ...oter-npm-3.8.34-5434191035-b897244a04.zip
Binary file not shown.
Binary file renamed
BIN
+12.1 KB
...pets-npm-2.4.25-f9c6817ff7-c6a7f6bcc6.zip → ...pets-npm-2.4.27-857d96730a-d042b8a3cf.zip
Binary file not shown.
Binary file renamed
BIN
+19.1 KB
...cket-npm-1.1.14-59a43142d0-16bb22468a.zip → ...cket-npm-1.1.18-65e68824d8-25847fca32.zip
Binary file not shown.
Binary file renamed
BIN
+15.9 KB
...eteer-npm-1.4.3-fddd7a63a2-ac2c86df20.zip → ...teer-npm-1.4.10-6f880a1a04-4e3bb2d588.zip
Binary file not shown.
Binary file renamed
BIN
+18.2 KB
...river-npm-1.1.3-a97a5bdbb9-1369142943.zip → ...iver-npm-1.1.10-6129da289b-5d4d70bf22.zip
Binary file not shown.
Binary file removed
BIN
-23.2 KB
.yarn/cache/@applitools-tunnel-client-npm-1.4.1-d18819d08a-db99d7bb6e.zip
Binary file not shown.
Binary file added
BIN
+25.1 KB
.yarn/cache/@applitools-tunnel-client-npm-1.5.7-d94b346f7f-5061db49de.zip
Binary file not shown.
Binary file renamed
BIN
+46.7 KB
...ient-npm-1.10.2-672e81d2ff-cfefecf3f6.zip → ...ient-npm-1.12.2-e5d0754ed6-fbcfd2af98.zip
Binary file not shown.
Binary file renamed
BIN
+29.4 KB
...utils-npm-1.7.0-eb6d9ba4f0-bcf0fa3814.zip → ...utils-npm-1.7.4-7abe6d4f6e-f4162e9234.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
|
@@ -107,6 +107,5 @@ | |
"ws@npm:8.13.0": "^8.17.1", | ||
"ws@npm:8.16.0": "^8.17.1" | ||
}, | ||
"version": "0.6.0", | ||
"packageManager": "[email protected]" | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
|
||
source $OKTA_HOME/$REPO/scripts/setup.sh | ||
|
||
cd $OKTA_HOME/$REPO | ||
|
||
PUBLISH_SHA="$(git rev-parse --short $SHA)" | ||
PUBLISH_REGISTRY="${ARTIFACTORY_URL}/api/npm/npm-topic" | ||
CURRENT_VERSION=$(< lerna.json jq -r '.version') | ||
TAGGED_VERSION=$CURRENT_VERSION-$PUBLISH_SHA | ||
|
||
npm config set @okta:registry ${PUBLISH_REGISTRY} | ||
|
||
function lerna_publish() { | ||
# use lerna to publish without making a commit to the repo | ||
MY_CMD="yarn run lerna publish from-package --force-publish=* --ignore-changes --no-push --no-git-tag-version --no-verify-access --registry \"${PUBLISH_REGISTRY}\" --yes" | ||
echo "Running ${MY_CMD}" | ||
${MY_CMD} | ||
} | ||
|
||
# prevent local changes from being reported so lerna can publish | ||
git checkout . | ||
|
||
# All packages are built by `prepack`. | ||
|
||
# update version with commit SHA to allow lerna to publish | ||
FILES_TO_UPDATE_VERSION="packages/odyssey-storybook/package.json" | ||
for PATH_AND_FILE in $FILES_TO_UPDATE_VERSION; do | ||
FULL_PATH="$OKTA_HOME/$REPO/$PATH_AND_FILE" | ||
json_contents="$(jq '.version = "'$TAGGED_VERSION'"' $FULL_PATH)" && \ | ||
echo -E "${json_contents}" > $FULL_PATH | ||
git update-index --assume-unchanged $FULL_PATH | ||
done | ||
|
||
echo "Publishing to artifactory" | ||
if ! lerna_publish; then | ||
echo "ERROR: Lerna Publish has failed." | ||
exit $PUBLISH_ARTIFACTORY_FAILURE | ||
else | ||
echo "Publish successful. Sending promotion message" | ||
fi | ||
|
||
## | ||
## Publish docs | ||
## | ||
## While the package artifact is already in npm-release, we use this | ||
## promotion event workaround to trigger the conductor workflow to deploy | ||
## | ||
|
||
echo "Publish successful. Sending promotion message" | ||
|
||
function send_promotion_message() { | ||
curl -H "x-aurm-token: ${AURM_TOKEN}" \ | ||
-H "Content-Type: application/json" \ | ||
-X POST -d "[{\"artifactId\":\"$1\",\"repository\":\"npm-topic\",\"artifact\":\"$2\",\"version\":\"$3\",\"promotionType\":\"ARTIFACT\"}]" \ | ||
-k "${APERTURE_BASE_URL}/v1/artifact-promotion/createPromotionEvent" | ||
} | ||
|
||
ARTIFACT="@okta/odyssey-storybook/-/@okta/odyssey-storybook-${CURRENT_VERSION}.tgz" | ||
echo "Artifact is ${ARTIFACT}" | ||
if ! send_promotion_message "odyssey-storybook" "${ARTIFACT}" "${CURRENT_VERSION}"; then | ||
echo "Error sending docs promotion event to Aperture" | ||
fi | ||
|
||
exit $SUCCESS |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
source $OKTA_HOME/$REPO/scripts/setup.sh | ||
|
||
cd $OKTA_HOME/$REPO | ||
|
||
get_terminus_secret "/" AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID | ||
get_terminus_secret "/" AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY | ||
get_terminus_secret "/" AWS_REGION AWS_REGION | ||
|
||
export URL_STORYBOOK="https://${SHA}.ods.dev" | ||
echo $URL_STORYBOOK | ||
|
||
# Build all packages except Storybook because it's excluded. | ||
yarn build | ||
|
||
# Build Storybook package. | ||
cd ./packages/odyssey-storybook && rm -rf ./node_modules/.cache && yarn build | ||
|
||
aws s3 sync ./dist/ s3://ods.dev/$SHA --delete | ||
|
||
# bash ./scripts/notify-slack.sh | ||
|
||
echo "Publish successful." | ||
log_custom_message "Storybook URL" $URL_STORYBOOK | ||
|
||
exit $SUCCESS |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash -x | ||
|
||
source $OKTA_HOME/$REPO/scripts/setup.sh | ||
|
||
cd $OKTA_HOME/$REPO | ||
|
||
export TEST_SUITE_TYPE="junit" | ||
export TEST_RESULT_FILE_DIR="${REPO}/src/v3/build2/reports/unit" | ||
echo $TEST_SUITE_TYPE > $TEST_SUITE_TYPE_FILE | ||
echo $TEST_RESULT_FILE_DIR > $TEST_RESULT_FILE_DIR_FILE | ||
|
||
get_terminus_secret "/" APPLITOOLS_API_KEY APPLITOOLS_API_KEY | ||
get_terminus_secret "/" APPLITOOLS_SERVER_URL APPLITOOLS_SERVER_URL | ||
|
||
if [[ -z "$APPLITOOLS_API_KEY" ]]; then | ||
echo "Error in getting APPLITOOLS_API_KEY from Terminous." | ||
report_results FAILURE PUBLISH_TYPE_AND_RESULT_DIR_BUT_SUCCEED_IF_NO_RESULTS | ||
exit 1 | ||
fi | ||
|
||
export APPLITOOLS_SHOW_LOGS=true | ||
export CHROME_VERSION="126.0.6478.55" | ||
|
||
if ! setup_service google-chrome-stable ${CHROME_VERSION}-1 ; then | ||
echo "failure" > ${setup_chrome_status_file} | ||
fi | ||
|
||
if ! wget https://artifacts.aue1e.internal/artifactory/thirdparty-yum/x86_64/chrome-sel3/${CHROME_VERSION}-1/webdriver/${CHROME_VERSION}/chromedriver-linux64.zip ; then | ||
echo "failure" > ${setup_chrome_status_file} | ||
fi | ||
|
||
unzip chromedriver_linux64.zip | ||
mv chromedriver_linux64 /usr/local/bin/ | ||
chmod +x /usr/local/bin/chromedriver_linux64 | ||
rm chromedriver_linux64.zip | ||
|
||
if ! yarn workspace @okta/odyssey-storybook ci:visualRegressionTest; then | ||
echo "Applitools Visual Regression Tests failed! Exiting..." | ||
exit ${PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL} | ||
fi | ||
|
||
echo "Visual Regression Tests passed!" | ||
report_results SUCCESS publish_type_and_result_dir_but_succeed_if_no_results |
Oops, something went wrong.
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.
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.
Is this
-temp
file still needed? I don't see it referenced in .bacon.yml or the other scripts.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. I might switch over to this
-temp
method of hitting Aperture after I finish up the other tasks, so we're not having to hit S3 directly.