1

We are building our angular UI via frontend-maven-plugin , After upgrading to angular 15, the build is not moving ahead after the tests. All tests are passed and there s no skipped test. There is no activity after the ng test. When we tried the pipeling without unit tests, build was fine. We already tried few options like sandbox. without sandbox, headless, watch=false, progress= false but no luck.

This is the last line which is logged to jenkins [2023-07-20T10:24:57.311Z] [INFO] TOTAL: 3 SUCCESS

Build stays stucked even with a new angular project having version 15+ having karma tests.

We execute the following steps in the pipeline

Download node and install

                     <id>install node and npm</id>
                     <goals>
                         <goal>install-node-and-npm</goal>
                         <nodeDownloadRoot>
                             https://artifactory.swisscom.com/artifactory/nodejs-dist-remote-cache/
                         </nodeDownloadRoot>
                         <npmDownloadRoot>https://artifactory.swisscom.com/artifactory/npm-remote/npm/-/

npm ci

npm test

From package.json “test”: “ng test --source-map=false --watch=false --browsers=ChromeHeadless --progress=false”

dependencies

"@angular/animations": "^16.1.0",
"@angular/common": "^16.1.0",
"@angular/compiler": "^16.1.0",
"@angular/core": "^16.1.0",
"@angular/forms": "^16.1.0",
"@angular/platform-browser": "^16.1.0",
"@angular/platform-browser-dynamic": "^16.1.0",
"@angular/router": "^16.1.0",
devDependencies

"@angular-devkit/build-angular": "^16.1.4",
"@angular/cli": "~16.1.4",
"@angular/compiler-cli": "^16.1.0",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.1",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.1.3"
anurag
  • 82
  • 2
  • 10
  • Have you tried the same command locally to ensure that there is no hanging process – Sergey Jul 24 '23 at 18:40
  • 1
    yes we tried that, locally tests works absolutely fine. We got reply in github issue. This might solve the problem. https://github.com/trion-development/docker-ng-cli-karma/issues/14#issuecomment-1648243510 – anurag Jul 26 '23 at 08:00
  • check memory/cpu where you run this script agent can stuck because of lack of resources also you can try verbose output – Ruslan Jul 27 '23 at 21:05

0 Answers0