I have set up some repository variables which I can call in my bitbucket-pipelines.yml file using $API_KEY
But What I cannot figure out is how to pass those variables into one of the scripts I have running in the step my yml looks something like this
clone:
depth: full
options:
max-time: 20
pipelines:
branches:
develop:
- step:
name: Create config and deploy
image: node:10.15.3
script:
- npm install
- npm test
- bin/generate-config.js
variables:
API_KEY: $DEV_API_KEY
- bin/deploy.sh
in github i know you can have env: and put variables in there but I'm not sure how to achieve this with bb pipelines.
And within my .js file I'm not sure how I can then call these passed variables