سؤال

i customized the xunit reporter for mocha test to generate xml report. and i want to test in jenkins. i committed the code changes of the project to git and integrated with jenkins and executed. but for the customized xunit reporter module, how to commit the node modules to jenkins. because till now i just committed only the project code to git and used in jenkins.

 jenkins use JUnit reporter to publish the result. 

please help me how to use the customized node modules in jenkins ?

هل كانت مفيدة؟

المحلول

There are a few option there. If you have forked the xunit reporter you may want to add the dependency to package.json as a git url. This will allow Jenkins to pull down the modified version of the dependency when it pulls down all the other dependencies.

If you just want to include the modified files in the node_modules folder, you can manually add them which will override the .gitignore. Something like the following should work.

git add ./node_modules/customized_package/* -f

The -f will force files to be added, even if they would have otherwise been ignored.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top