im85288 / service.upnext

GNU General Public License v2.0
80 stars 41 forks source link

Fix SonarCloud integration #292

Closed MoojMidge closed 1 year ago

MoojMidge commented 1 year ago

@im85288 - I noticed that a number of the existing workflows were failing. Have fixed most of them up, but the SonarCloud integration looks like it will need a new user authorisation token to be created.

You will need to go to https://sonarcloud.io/account/security to (re)create the user token.

Then go to https://github.com/im85288/service.upnext/settings/secrets/actions and create a new repository secret named SONAR_TOKEN with the secret set to the newly created user token.

im85288 commented 1 year ago

@MoojMidge great stuff and thanks for the detail on fixing the sonar cloud. I will have a look in the next couple of days to fix it, but please ping me if it's not done by next week in case I got distracted.

MoojMidge commented 1 year ago

@im85288 - bump

im85288 commented 1 year ago

@MoojMidge there was already a token in sonarcloud linked, but to be safe I created a new one and updated the value in the secrets section.

image

Hopefully it's all good now

MoojMidge commented 1 year ago

Not sure why it wasn't authenticating before, but that part is now OK.

The analysis execution still fails though - will try and enable logging to figure out why, sometime down the track.

MoojMidge commented 1 year ago

@im85288 - the reason why the analysis is still failing is that for some reason the im85288_service.upnext project on SonarCloud can't be found. Maybe the project was unlinked for some reason when the token became invalid?

I think in order to fix it you will need to go to https://github.com/settings/installations/ select the Configure button on the SonarCloud list item on the Installed GitHub Apps, then select/add the im85288/service.upnext repository in the Repository Access list.

im85288 commented 1 year ago

@MoojMidge I had to re-link the project to SonarCloud. Hopefully that has resolved the issue now. Before I was not seeing SonarCloud in the Installed GitHub Apps section but now it is there

MoojMidge commented 1 year ago

Re-ran one of the old CI actions and it failed with an error indicating that automatic analysis was enabled, so the CI action may no longer be necessary. Can be removed if it causes a problem, but the (automatic?) analysis worked anyway.