passing a variable value from Jenkins to Node APP -


not sure how ask question put here , want hear suggestions. far, use "db_link" variable has mongo database url in config.json file. node app uses variable connect mongo. db_link gets checked git, dont want happen because dont want check in passwords git. in local development, use local.json file has these configs , not check file git (in .gitignore entry). fine making work in local dev environment, challenge when jenkins try push code test, has pass testcases (it has run test cases, time db_link value needed) before deployment happens. when need db_link variable passed jenkins.

here did far .. in jenkins configurations, @ 'predefined parameters' added db_link=mymongolink parameters list. value not being handed on node app. suggestions on how achieve trying achieve?

ok. figured out. before change, used pass command jenkins run test cases

 npm run test 

but now,

 dblink=mydb npm run test 

so dblink variable here being handed on node app , able run test cases. before change, used pass dblink=mydb config file


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -