cathive / concourse-sonarqube-resource

performs SonarQube analyses and checks quality gates https://concourse-ci.org/ https://sonarqube.org/
Apache License 2.0
46 stars 49 forks source link

Node version is out dated. #82

Closed gangs1373 closed 2 years ago

gangs1373 commented 2 years ago

I am using latest version of concourse-sonarqube-resource and its using Node version 8.9.3


14:54:39.601 DEBUG: Using default Node.js executable: 'node'.
14:54:39.601 DEBUG: Checking Node.js version
14:54:39.603 DEBUG: Launching command node -v
14:54:39.651 DEBUG: Using Node.js v8.9.3.
14:54:39.651 DEBUG: Starting Node.js process to start eslint-bridge server at port 43415

and its leading to issues with sonarqube.

`4:54:39.651 DEBUG: Launching command node /tmp/build/put/source/.scannerwork/.sonartmp/eslint-bridge-bundle/package/bin/server 43415 127.0.0.1 /tmp/build/put/source/.scannerwork true false /tmp/build/put/source/.scannerwork/.sonartmp/eslint-bridge-bundle/package/custom-rules3273664980044719285/package
14:54:40.012 ERROR: /tmp/build/put/source/.scannerwork/.sonartmp/eslint-bridge-bundle/package/node_modules/eslint/lib/cli-engine/cli-engine.js:421
14:54:40.012 ERROR:     } catch {
14:54:40.012 ERROR:             ^
14:54:40.012 ERROR: 
14:54:40.012 ERROR: SyntaxError: Unexpected token {
14:54:40.012 ERROR:     at createScript (vm.js:80:10)
14:54:40.012 ERROR:     at Object.runInThisContext (vm.js:139:10)
14:54:40.012 ERROR:     at Module._compile (module.js:599:28)
14:54:40.012 ERROR:     at Object.Module._extensions..js (module.js:646:10)
14:54:40.012 ERROR:     at Module.load (module.js:554:32)
14:54:40.012 ERROR:     at tryModuleLoad (module.js:497:12)
14:54:40.012 ERROR:     at Function.Module._load (module.js:489:3)
14:54:40.012 ERROR:     at Module.require (module.js:579:17)
14:54:40.012 ERROR:     at require (internal/module.js:11:18)
14:54:40.012 ERROR:     at Object.<anonymous> (/tmp/build/put/source/.scannerwork/.sonartmp/eslint-bridge-bundle/package/node_modules/eslint/lib/cli-engine/index.js:3:23)
14:59:39.660 ERROR: Failed to start server (300s timeout)
holgerstolzenberg commented 2 years ago

I started a container with the latest version of the resource and cannot confirm this behaviour. At least on container OS level, node 14 is installed:

❯ podman run -it cathive/concourse-sonarqube-resource:latest bash
Resolving "cathive/concourse-sonarqube-resource" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/cathive/concourse-sonarqube-resource:latest...
Getting image source signatures
Copying blob sha256:051b6f0c7cd781f3f5456934d69c2fb70273cbb302140acef324594fade2a0c9
Copying blob sha256:44d3aa8d076675d49d85180b0ced9daef210fe4fdff4bdbb422b9cf384e591d0
Copying blob sha256:1fe172e4850f03bb45d41a20174112bc119fbfec42a650edbbd8491aee32e3c3
Copying blob sha256:db65f9124526218b3c0a06b2247d19afce6809cb1f8fe32d280846dd39df988c
Copying blob sha256:6ce99fdf16e86bd02f6ad66a0e1334878528b5a4b5487850a76e0c08a7a27d56
Copying blob sha256:6f96585e20b071ae916e190faba5a6f2a6501730a67f2bf166cb8f24466ab860
Copying blob sha256:d3027919a7a65ed98a9c66dda78d9dc23549c4a934d3f3b56987731a0640fbc8
Copying blob sha256:a98e7c9c893eebcc639dda1c963c8fd25829bab4b8d0cb16e5798f21731aefc2
Copying blob sha256:db3b806d6767085a857a79237b86a0602a4b2385e30d7e90abb4fcc2632cee18
Copying blob sha256:f6862240041598042fa75ade3a13e6bfb6a7df7f7782acea8f80249af365cc28
Copying blob sha256:ff763891318c9acf14fb169053e8b7b9d18f7dba84f36db32469452129e508e7
Copying blob sha256:b92b7f572740a555dba19131d32ffe7a6f9f9d1613de1dfa608ff31a198c7471
Copying blob sha256:aa8c088196165a20b1d2ff5b5b665ab668e2cb5935aecec8dd12c4bc410d4935
Copying blob sha256:f3b8ed3659477de4b57b12c93c386a4cf414f846343a3a1ee75e127904cc4bb2
Copying config sha256:1a2305931f49acf2e2608d2c5416e367507ea0e8f6a9981f71bc5175eb7445bb
Writing manifest to image destination
Storing signatures
root@173e21ebfb09:/# node --version
v14.20.0
root@173e21ebfb09:/# node -v
v14.20.0
root@173e21ebfb09:/#

Not sure but maybe the sonar-runner uses some internally packaged node.

Can you please confirm you are using the correct resource in latest version (not outdated, cached, invalid resource name from a fork...).

gangs1373 commented 2 years ago

Yes you are right the image was cached. I cleared it and able to pull the latest image but i am seeing another issue in latest image ++ awk -f /opt/resource/readproperties.awk -v sv=0 /opt/resource/common.sh: line 42: source/sonar-project.properties: No such file or directory

when i logged in to the container and checked i am seeing source/sonar-project.properties. can you please suggest whats going wrong over here.

gangs1373 commented 2 years ago

Resolved.