Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating Report via Scripting #359

Open
hexploder opened this issue Jun 29, 2023 · 0 comments
Open

Generating Report via Scripting #359

hexploder opened this issue Jun 29, 2023 · 0 comments
Labels
question Further information is requested

Comments

@hexploder
Copy link

I run the command

java -jar sonar-cnes-report-4.1.2.jar -t "xxxxx" -p project_name in the terminal and everything goes well

I try to run this command through a bash script that basically run a for of a list of project_names and technically the script finishes but no report is being generated.

I thought that maybe because while running a script it runs the java -jar multiple times one execution step the other and fails so I made a logic that saves the PID of the java running the sonar-cnes-report. jar and with a while I check when the PID is no longer there basically while [ -n $PID] with this I can see that each execution of the jar is starting after the one before finishes, yet no report is being generated, I run the java command in a multiple combination of nohup, as background with &, with a > /dev/null with a 2>&1 I do not find a way of making the reports get generated.

I end up even creating a second script where I run the java command with nothing and then calling with nohup and background the script it self so the execution of the java command is detached of the first script nothing works.

I suspect that the java command runs as a process to connect to sonar (that is running locally) and then a second process actually generates the report so am I not waiting for that? yet I do a sleep 10 after the PID dissapear and nothing.

Is this a behavior of java or the sonar-cnes-report not being able to work as a background script or to work being executed from a script or maybe I'm having some dumb thing with users and permissions?.

In the nohup.out I am not getting the last line saying that the report was SUCCEDED to be generated, but the lines before are the same as for the stdout of the command in the terminal executed directly.

Please complete the following information.

  • OS: Centos 7
  • Project version: 4.1.2
@hexploder hexploder added the question Further information is requested label Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant