Isolate E2E configuration and decrypt it in Bitrise - #582
Open
kieran-osgood-shopify wants to merge 3 commits into
Open
Isolate E2E configuration and decrypt it in Bitrise#582kieran-osgood-shopify wants to merge 3 commits into
kieran-osgood-shopify wants to merge 3 commits into
Conversation
This was referenced Aug 5, 2026
Contributor
Author
This was referenced Aug 5, 2026
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 5, 2026 11:06
76f072a to
ce17650
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-run-maestro-e2e-env
branch
from
August 5, 2026 11:06
bebc4d0 to
1dc2560
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 5, 2026 11:35
ce17650 to
88b6724
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-run-maestro-e2e-env
branch
2 times, most recently
from
August 5, 2026 11:45
39b95df to
a8cf7ad
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 5, 2026 11:45
88b6724 to
a2af77b
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-run-maestro-e2e-env
branch
from
August 5, 2026 12:33
a8cf7ad to
b2235cf
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 5, 2026 12:33
a2af77b to
22eb2d4
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-run-maestro-e2e-env
branch
from
August 6, 2026 15:48
b2235cf to
84842c5
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
3 times, most recently
from
August 7, 2026 11:05
f21da07 to
cb34ba1
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-run-maestro-e2e-env
branch
2 times, most recently
from
August 7, 2026 11:28
bdd7527 to
23d353a
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
2 times, most recently
from
August 7, 2026 13:51
b76b5f1 to
4d50b40
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-run-maestro-e2e-env
branch
2 times, most recently
from
August 7, 2026 14:15
3466ca1 to
ef1f3ac
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
2 times, most recently
from
August 7, 2026 15:41
8b654b6 to
eebdd2b
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-run-maestro-e2e-env
branch
from
August 7, 2026 15:41
ef1f3ac to
9b59e1e
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 10, 2026 09:08
eebdd2b to
a2b3bad
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 12, 2026 14:54
1910669 to
d28dfce
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
2 times, most recently
from
August 14, 2026 14:35
4f9fde7 to
c24dfc7
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 14, 2026 14:35
d28dfce to
329ae4f
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 14, 2026 16:24
c24dfc7 to
23fb5cd
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 14, 2026 16:24
329ae4f to
f0bbb0f
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 17, 2026 12:51
23fb5cd to
07e0611
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
2 times, most recently
from
August 17, 2026 13:13
854b848 to
9039d2b
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
2 times, most recently
from
August 18, 2026 09:27
14afe22 to
d13eb64
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 20, 2026 18:09
0cfc1a6 to
cfd107d
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
2 times, most recently
from
August 21, 2026 08:15
4faceeb to
979c54d
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 21, 2026 10:59
cfd107d to
e017ab2
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 21, 2026 10:59
979c54d to
218cc1d
Compare
kieran-osgood-shopify
changed the base branch from
kieran-osgood/ejson-generate-env-files
to
graphite-base/582
August 21, 2026 11:17
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 21, 2026 11:47
218cc1d to
bcc6d14
Compare
kieran-osgood-shopify
force-pushed
the
graphite-base/582
branch
from
August 21, 2026 11:47
e017ab2 to
ee691bc
Compare
kieran-osgood-shopify
changed the base branch from
graphite-base/582
to
kieran-osgood/ejson-generate-env-files
August 21, 2026 11:47
| e2e_install_ejson_key() { | ||
| local keydir public_keys public_key rendered | ||
|
|
||
| : "${EJSON_PRIVATE_KEY:?EJSON_PRIVATE_KEY is required. Check https://app.bitrise.io/app/f51f9054-053e-40f1-81e9-ae727567ae76/workflow_editor#!/secrets and enable Expose for pull requests.}" |
Contributor
Author
There was a problem hiding this comment.
this is already set but is a guard incase we start up another pipeline
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 21, 2026 12:02
bcc6d14 to
2be764e
Compare
kieran-osgood-shopify
marked this pull request as ready for review
August 21, 2026 12:02
Install this buildOpen Tophat, select your target device, then click Install. Links open on the Mac running Tophat.
Checkout Kit E2E results
|
Bitrise held nine project secrets that had to stay aligned with what the suite reads. It now holds EJSON_PRIVATE_KEY only. bitrise_ci_helpers installs a pinned ejson2env, verifies its checksum, writes the key into a keydir, and runs generate_env_files, so CI decrypts the same committed files a developer does. The key reaches the keydir through a redirect and the credentials reach envman through a file, so neither enters an argument list or the build log. Installing the key is idempotent, because the mode it sets makes the file unwritable. e2e-execute-browserstack-run builds no app, so it exports the account credentials itself; every other workflow gets them through a sample app build. The docs stop describing prompts that no longer exist and say plainly which audience does what: employees run `dev secrets edit`, external contributors copy .env.example and keep their file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Assisted-By: devx/252dfd24-6c25-4bb4-8463-27702ec564eb
The E2E suite read its own e2e/.env for Maestro, but the sample apps it drives were still configured from the repo-root .env. That file comes from config/secrets/demo.ejson, which a developer may point at their own shop, so a suite run tested whichever store happened to be set up for manual work. scripts/setup_storefront_env takes --env-file, and e2e_configure_storefront passes e2e/.env. The four generated platform config files are shared, so the last run still wins, but nothing on the E2E path reads the demo store now. It also takes --ignore-generated. The script reads the files it generates as a value source, so a developer who lost .env keeps their store. That inheritance is wrong for the suite: on a workspace that already built the demo app those files hold the demo store and a Canadian address. e2e.ejson carries no address, so the United States defaults decide it instead. That last part is flake B2 returning by a new route. The original fix relied on CI holding no address values at all, which encrypted config changed. Two tests hold it now: scripts/test_setup_storefront_env covers the flag, and the new e2e/scripts/test_bitrise_ci_helpers asserts the argv the CI path builds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Assisted-By: devx/252dfd24-6c25-4bb4-8463-27702ec564eb
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-ci-and-docs
branch
from
August 21, 2026 12:23
2be764e to
fc1b78e
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 21, 2026 12:23
ee691bc to
aa596d1
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Stack Context
This PR is two phased with #582 to achieve: Local and E2E runs will now always run the same configs - no drift.
#580 generate
.envfrom .ejson#582 generate
e2e/.envfrom ejson, use thee2e/.envin Bitrise, meaning we can delete all the secrets in the bitrise UI as they're sourced from ejson now, and developers can have the exact config of bitrise locallyWhat?
e2e/.envrather than whichever demo store is active in the root.env.EJSON_PRIVATE_KEYsecret.ejson2envrelease in Bitrise, replace unexpected versions with a warning, and verify the archive against committed checksums.Why?
The E2E sample apps could be built from the developer's demo configuration. That allowed tests to target the wrong storefront and inherit stale buyer identity values. Using
e2e/.envfor CI builds makes the selected store deterministic and keeps local demo work independent.Bitrise now decrypts the same committed storefront source developers use instead of maintaining storefront secrets that can drift independently. BrowserStack credentials remain separate Bitrise secrets.
How to test
dev upYou should now see a