0

Is there any possible ways to add answer for this question "may we anonymously report usage statistics to improve the tool over time?", which is asked as the 1st question when I hit "yo jhipster --force" on cmd, in .yo-rc.json. My .yo-rc.json file contains different required details but no answer for the above mentioned question. As the jhipster gets reinstalled everytime deployment is done on kubernets and the image gets recreated, and then jhipster command ran from script, it gets stuck at the first question prompt whose answer I am expecting to be taken from .yo-rc.json file, which is otherwise a manual task to go into cmd and manually answer the prompt for every deployment.

I am attaching my .yo-rc.json file. Please help me with my requirement.

{
  "generator-jhipster": {
    "baseName": "localApp",
    "packageName": "com.cg.localApp",
    "packageFolder": "com/cg/localApp",
    "serverPort": "*****",
    "authenticationType": "session",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": "no",
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "useSass": true,
    "applicationType": "monolith",
    "testFrameworks": ["gatling", "cucumber", "protractor"],
    "jhiPrefix": "cg",
    "enableTranslation": false,
    "jhipsterVersion": "6.10.3",
    "cacheProvider": "ehcache",
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "rememberMeKey": "****",
    "embeddableLaunchScript": false,
    "clientPackageManager": "npm",
    "clientFramework": "angularX",
    "clientTheme": "none",
    "creationTimestamp": 1608305785798,
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [],
    "blueprints": []
  }
}
Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49
  • Deployment process should not require jhipster. Could you edit your question with more details like which commands you use and why? Also it's been many years that we don't use `yo jhipster` but only `jhipster` – Gaël Marziou Dec 21 '20 at 14:22
  • Thanks @GaëlMarziou. Ya, jhipster is not required in deployment, but on every deployment, jhipster is installed newly and for that first time, it asks the above question and once set manually, it doesn't ask that particular question until next build. If we don't set it, it will fail because the .yo-rc.json doesn't contain answer to the specific question. I will try with the addition in .yo-rc.json what you have suggested. – Dibyaratnam Samarlia Dec 24 '20 at 09:49
  • I don't understand your point about "on every deployment, jhipster is installed newly", Could you please edit your question with full process and commands you run? I'd like to be sure that JHipster team did not forget something either in code or in documentation. – Gaël Marziou Dec 24 '20 at 11:06
  • var batchCommand = '' + '' + 'yo jhipster --force --skip-install' + '' + ''; this batch command is run, which then uses the .yo-rc.json file to fetch the configurations required(we have created a yorc json file from a different script of own own) rather than sending it from prompt. But we don't have the answer for "may we anonymously report usage statistics to improve the tool over time?" this question in yorc file..... – Dibyaratnam Samarlia Dec 24 '20 at 11:54
  • And it's a tedious job to set an answer to it from prompt every time and we intend to do it from 'yo-rc.json but didn't find anything specific as per my research. So I am supposing that with "noInsight": true we'll be able to set the value for the specific question as you answered. I hope I've cleared myself. – Dibyaratnam Samarlia Dec 24 '20 at 11:56
  • Well not really, you clarified your question but I already understood it. What I asked is for is why and how you deploy. What I understand is that you run your deployment from Jenkins but why using jhipster command is still not clear. Please edit question raher than commenting, it's more readable. Also, don't use `yo jhipster`, it's been years that `jhipster` only is used. Also you could put a .yo-rc.json file with common options in a parent directory (e.g. jenkins home), it would be merged with own project – Gaël Marziou Dec 24 '20 at 12:02

1 Answers1

1

There's an undocumented command line option --no-insight which does this, so you could use in .yo-rc.json as "noInsight": true.

But deployment process should not require jhipster command, so I suspect something is wrong in your approach.

Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49