-
Notifications
You must be signed in to change notification settings - Fork 683
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
Self Documenting Braintree Environment Variable #2008
Conversation
Also: please verify that this should be a |
|
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.
Nice! This should be much clearer to those getting started. Also, I think minor
is correct for this change. "Backwards compatible, but new functionality".
@supernova-at
which successfully built the app, but did get this output:
Should we also add a question to the wizard that asks for this token, or does that seem too early in the setup process? It does seem preferable not to error here, but unless the developer was paying close attention, this notice would get buried by |
Great catch, yes - thanks! Updated the wizard in f0859e0. I also updated the PR description and verification steps. |
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.
Outstanding. Good catches and excellent work, everyone!
Error from AWS console:
|
You may need to do some work in https://github.com/magento/pwa-studio-cicd/search?utf8=%E2%9C%93&q=BRAINTREE_TOKEN&type= |
Description
The
CHECKOUT_BRAINTREE_TOKEN
environment variable defined inenvVarDefinitions.json
provided adefault
value which hid the fact that developers needed to supply their own.This PR:
example
value instead of adefault
.create-pwa
wizard accordinglyRelated Issue
Closes PWA-84.
Acceptance
Verification Stakeholders
@zetlen @jcalcaben
Specification
Verification Steps
📝 Creating a
.env
file (new projects)npx buildpack create-env-file .
CHECKOUT_BRAINTREE_TOKEN
(and providing you with an example value).📝 Modifying a
.env
file (existing projects)➡️ Missing
CHECKOUT_BRAINTREE_TOKEN
CHECKOUT_BRAINTREE_TOKEN
from your project's.env
file:#CHECKOUT_BRAINTREE_TOKEN=some_value
yarn install
➡️ Has
CHECKOUT_BRAINTREE_TOKEN
set to old default valueCHECKOUT_BRAINTREE_TOKEN
from your project's.env
file tosandbox_8yrzsvtm_s2bg8fs563crhqzk
:CHECKOUT_BRAINTREE_TOKEN=sandbox_8yrzsvtm_s2bg8fs563crhqzk
yarn install
➡️ Has
CHECKOUT_BRAINTREE_TOKEN
set to some other valueCHECKOUT_BRAINTREE_TOKEN
from your project's.env
file tosome_other_value
:CHECKOUT_BRAINTREE_TOKEN=some_other_value
yarn install
📝 Creating a Project via the Create PWA Wizard
Navigate to the
create-pwa
package:cd packages/create-pwa
.➡️ Use the example value
node ./bin/create-pwa
.env
file (located atpackages/create-pwa/<your project name>/.env
)CHECKOUT_BRAINTREE_TOKEN
is set:CHECKOUT_BRAINTREE_TOKEN=sandbox_8yrzsvtm_s2bg8fs563crhqzk
.➡️ Supply your own value
node ./bin/create-pwa
my_custom_value
to the braintree token question.env
file (located atpackages/create-pwa/<your project name>/.env
)CHECKOUT_BRAINTREE_TOKEN
is set:CHECKOUT_BRAINTREE_TOKEN=my_custom_value
.CHECKOUT_BRAINTREE_TOKEN
appeared in the console.➡️ Set an environment variable first
CHECKOUT_BRAINTREE_TOKEN=override node ./bin/create-pwa
.env
file and verify thatCHECKOUT_BRAINTREE_TOKEN
is set:CHECKOUT_BRAINTREE_TOKEN=override
.Screenshots / Screen Captures (if appropriate)
Checklist