I'm trying to pass a variable into my npm script so I can run some pre-deployment methods. Unfortunately the below doesn't work and just throws an error, like the variable doesn't exist (however, it does):
- step:
name: Run Pre-deploy scripts
script:
- MONGODB_URI=$MONGODB_URI npm run preDeploy
Any help would be greatly appreciated!
Hi Nick,
Have you defined MONGODB_URI as a repo or a workspace Pipelines variable?
Could you please copy-paste here the full output of this command from the Pipelines log? Please sanitize private/sensitive info in the output, if any.
Kind regards,
Theodora
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.