我是jhipster的新手,我用jhipster创建了一个monothic应用程序,通过运行jhipster kubernetes,我可以在google云上部署我的应用程序。
不过,我很难用gitlab ci创建cicd管道。
我试图通过gitlab在google云上创建kubernetes集群,并在gitlab上启用Auto DevOps选项,但是我的应用程序总是停留在测试阶段。不过,当我运行npm测试时,同样的测试在本地运行得非常好。
通过运行jhipster-kubernetes,我已经生成了所有必需的k8s资源,并且手动地我可以在gcloud上很好地部署它们,app也很好地运行起来。
List of k8s files:
kubectl apply -f namespace.yml
kubectl apply -f cicdtesting/
kubectl apply -f monitoring/jhipster-prometheus-crd.yml
until [ $(kubectl get crd prometheuses.monitoring.coreos.com 2>>/dev/null | wc -l) -ge 2 ]; do
echo "Waiting for the custom resource prometheus operator to get initialised";
sleep 5;
done
kubectl apply -f monitoring/jhipster-prometheus-cr.yml
kubectl apply -f monitoring/jhipster-grafana.yml
kubectl apply -f monitoring/jhipster-grafana-dashboard.yml
以下是错误日志:
402 -----------------------------------------------|----------|----------|----------|----------|-------------------|
403 File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
404 -----------------------------------------------|----------|----------|----------|----------|-------------------|
405 All files | 82.01 | 55.48 | 62.7 | 81.4 | |
406 app | 100 | 100 | 100 | 100 | |
407 app.constants.ts | 100 | 100 | 100 | 100 | |
408 app/account/activate | 92.59 | 100 | 75 | 90 | |
409 activate.component.html | 100 | 100 | 100 | 100 | |
410 activate.component.ts | 94.44 | 100 | 83.33 | 92.31 | 32 |
411 activate.service.ts | 87.5 | 100 | 50 | 83.33 | 12 |
412 app/account/password | 83.33 | 73.08 | 75 | 82.35 | |
413 password-strength-bar.component.ts | 76.09 | 70.83 | 80 | 76.19 |... 75,76,77,78,80 |
414 password.component.html | 100 | 100 | 100 | 100 | |
415 password.component.ts | 95.65 | 100 | 80 | 94.74 | 27 |
416 password.service.ts | 87.5 | 100 | 50 | 83.33 | 12 |
417 app/account/password-reset/finish | 95 | 75 | 80 | 94.44 | |
418 password-reset-finish.component.html | 100 | 100 | 100 | 100 | |
419 password-reset-finish.component.ts | 96.77 | 75 | 87.5 | 96.55 | 70 |
420 password-reset-finish.service.ts | 87.5 | 100 | 50 | 83.33 | 12 |
421 app/account/password-reset/init | 96.67 | 100 | 85.71 | 96.15 | |
422 password-reset-init.component.html | 100 | 100 | 100 | 100 | |
423 password-reset-init.component.ts | 100 | 100 | 100 | 100 | |
424 password-reset-init.service.ts | 87.5 | 100 | 50 | 83.33 | 12 |
425 app/account/register | 93.62 | 100 | 70 | 93.02 | |
426 register.component.html | 100 | 100 | 100 | 100 | |
427 register.component.ts | 94.74 | 100 | 75 | 94.44 | 42,70 |
428 register.service.ts | 87.5 | 100 | 50 | 83.33 | 12 |
429 app/account/settings | 91.3 | 100 | 77.78 | 90 | |
430 settings.component.html | 100 | 100 | 100 | 100 | |
431 settings.component.ts | 90.91 | 100 | 77.78 | 89.47 | 28,29 |
432 app/admin/audits | 100 | 100 | 100 | 100 | |
433 audit.model.ts | 100 | 100 | 100 | 100 | |
434 audits.service.ts | 100 | 100 | 100 | 100 | |
435 app/admin/configuration | 96.3 | 50 | 91.67 | 96 | |
436 configuration.component.html | 100 | 100 | 100 | 100 | |
437 configuration.component.ts | 100 | 100 | 100 | 100 | |
438 configuration.service.ts | 93.94 | 33.33 | 85.71 | 93.55 | 24,43 |
439 app/admin/logs | 100 | 100 | 100 | 100 | |
440 log.model.ts | 100 | 100 | 100 | 100 | |
441 logs.component.html | 100 | 100 | 100 | 100 | |
442 logs.component.ts | 100 | 100 | 100 | 100 | |
443 logs.service.ts | 100 | 100 | 100 | 100 | |
444 app/admin/metrics | 86.21 | 0 | 70 | 84 | |
445 metrics.component.html | 100 | 100 | 100 | 100 | |
446 metrics.component.ts | 78.95 | 0 | 57.14 | 76.47 | 28,29,35,39 |
447 metrics.service.ts | 100 | 100 | 100 | 100 | |
448 app/admin/user-management | 84.92 | 43.75 | 70.73 | 86.11 | |
449 user-management-delete-dialog.component.html | 100 | 100 | 100 | 100 | |
450 user-management-delete-dialog.component.ts | 92.86 | 100 | 75 | 90 | 18 |
451 user-management-detail.component.html | 100 | 100 | 100 | 100 | |
452 user-management-detail.component.ts | 100 | 50 | 100 | 100 | 17 |
453 user-management-update.component.html | 100 | 100 | 100 | 100 | |
454 user-management-update.component.ts | 92.5 | 75 | 78.57 | 96.88 | 86 |
455 user-management.component.html | 100 | 100 | 100 | 100 | |
456 user-management.component.ts | 75 | 30 | 60 | 76.79 |... 25,129,130,140 |
457 app/core/auth | 30.14 | 0 | 0 | 25 | |
458 account.service.ts | 21.05 | 0 | 0 | 17.14 |... 67,71,75,79,83 |
459 auth-jwt.service.ts | 33.33 | 0 | 0 | 30.43 |... 40,45,46,47,48 |
460 state-storage.service.ts | 62.5 | 100 | 0 | 50 | 6,9,13 |
461 app/core/login | 46.43 | 0 | 0 | 45 | |
462 login-modal.service.ts | 40 | 0 | 0 | 33.33 |... 13,15,16,17,18 |
463 login.service.ts | 53.85 | 100 | 0 | 62.5 | 8,11,15 |
464 app/core/user | 88.37 | 84.62 | 50 | 87.8 | |
465 user.model.ts | 100 | 84.62 | 100 | 100 | 42,43,44,45 |
466 user.service.ts | 68.75 | 100 | 42.86 | 64.29 | 16,20,28,29,33 |
467 app/shared/constants | 100 | 100 | 100 | 100 | |
468 error.constants.ts | 100 | 100 | 100 | 100 | |
469 pagination.constants.ts | 100 | 100 | 100 | 100 | |
470 app/shared/login | 90 | 85.71 | 66.67 | 91.89 | |
471 login.component.html | 100 | 100 | 100 | 100 | |
472 login.component.ts | 89.74 | 85.71 | 66.67 | 91.67 | 35,63,79 |
473 app/shared/util | 63.64 | 33.33 | 33.33 | 63.64 | |
474 request-util.ts | 63.64 | 33.33 | 33.33 | 63.64 | 7,8,12,13 |
475 -----------------------------------------------|----------|----------|----------|----------|-------------------|
476 Summary of all failing tests
477 FAIL src/test/javascript/spec/app/admin/health/health.component.spec.ts
478 â Test suite failed to run
479 Call retries were exceeded
480 at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
481 FAIL src/test/javascript/spec/app/shared/alert/alert-error.component.spec.ts
482 â Test suite failed to run
483 Call retries were exceeded
484 at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
485 FAIL src/test/javascript/spec/app/admin/audits/audits.component.spec.ts
486 â Test suite failed to run
487 Call retries were exceeded
488 at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
489 FAIL src/test/javascript/spec/app/core/user/account.service.spec.ts
490 â Test suite failed to run
491 Call retries were exceeded
492 at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
493 Test Suites: 4 failed, 20 passed, 24 total
494 Tests: 62 passed, 62 total
495 Snapshots: 0 total
496 Time: 163.908s
497 Ran all test suites.
498 npm ERR! Test failed. See above for more details.