I have a project I'm trying to build, but my .api-keys document is being gitignored.
So, I added my keys as environment variables to the project on circle CI.
My problem is I'm not quite sure where/how to let my yaml config script know what they are:
old config script:
version: 2.1
orbs:
cypress: cypress-io/[email protected]
workflows:
build:
jobs:
- cypress/install:
build: 'npm run build'
- cypress/run:
requires:
- cypress/install
start: 'npm start'
Line I'd like to add (I think?):
environment:
masterFirebaseConfig: $masterFirebaseConfig
Is this the correct thing to do? Where should this line go in the yaml above?
Many thanks for any tips!
Update 29 December, 2018:
I updated my api-keys.ts file to this:
export var masterFirebaseConfig = {apiKey: $fireBaseApiKey, authDomain: 'dataJitsu.firebaseapp.com',databaseURL: 'https://datajitsu.firebaseio.com',storageBucket: '',messagingSenderId: '495992924984'};
export var masterStripeConfig = {publicApiTestKey: $masterStripePublicApiKey,secretApiTestKey: $masterStripeSecretApiKey,publicApiKey: '',secretApiKey: ''};
Where $fireBaseApiKey, $masterStripePublicApiKey, and $masterStripeSecretApiKey are environmental variables I've added to the project.
This doesn't seem to working, either:
ERROR in src/app/api-keys.ts(1,44): error TS2304: Cannot find name '$fireBaseApiKey'. src/app/api-keys.ts(2,52): error TS2304: Cannot find name '$masterStripePublicApiKey'. src/app/api-keys.ts(2,96): error TS2304: Cannot find name '$masterStripeSecretApiKey'.