Best practices for experimenting with new SonarQube (CE) Versions

Hello everyone,

i would like to ask for tips or best practices concerning experimenting with a new Sonarqube-Server Community edition. (I have 7.4 configured and running and now want to see if i like 7.6. Will for example the missing notion of modules be something troubling)

My Current setup

  • Sonarqube-Server 7.4 CE with an configured Database (Oracle)
  • groups and users with tokens
  • project-key-templates with rights/rulesets
  • jenkins setup that triggers analysis via gradle/maven (user-auth via tokens)

What i so far did:

  • Installed Sonarqube-Server 7.6 CE with no extra DB config(defaults to inmemoryDB)
  • Triggered Jenkins-Job that failed with missing credentials

I would now like to - in the most easy way - just get one of my jobs trigger an analysis. To do that without changing my setup i need to migrate some basic configuration between the Sonarqubes, i suppose. (e.g. existing users with the existing tokens)

cheers
Daniel

Hi Daniel,

The best testing setup for you is going to depend on the resources you have available. Ideally, you’d pull a copy of your database and stand it up in a test DB server, then point your under-test SQ version (7.6) at your test DB and run the migration. Since you particularly mentioned the drop of modules as something you want to test, I’ll mention that there’s an intermediate step in this particular upgrade between SonarQubes DB migration and the first analysis of each project. I won’t go into details, but there are some differences in how things are displayed in the UI in this in between state.

Once you’ve run the DB migration, then you’re ready to run some analyses. I won’t suggest a full test copy of your Jenkins - even to me that seems like overkill - but you should be able to set up a 2nd SQ instance in Jenkins’ global configuration. You’ll probably name it something like “TEST NOT PRODUCTION SQ”. Then you can clone a couple of your build/analysis jobs, update them to use your test SQ and analyze.

 
HTH,
Ann

Hi Ann,

thank you for the thoroughness of your answer! This is very helpful as it clarifies my uncertainties if i can do it without dabbling in db backup/restores. Creating the backup and restoring it in under a different name should not be that much of a hassle i guess, tbh. Oh and btw, i just realized i am using postgres :smiley:

I wonder, if in paid version there exists some functionality that lets me do smth like the following?

I want to do a fresh install of SQ using the inmemory database and somehow continue with my meticulously crafted “RBAC-Setup”

(slight exaggerations, but no snarkiness included :wink: )

cheers,
Daniel

Hi,

Regardless of edition, H2 is only for initial trial and there is no functionality for migration or data porting.

Ann

Hi Ann,

thank you for another clarification!

I am tempted to continue with a followup-question but i will open another post because no more “best practices” concern :slight_smile:

cheers
Daniel

Funny how mornings before coffee can go … here goes the story:

  • i just was served this Thread as a search result for this $searchengine search
  • i skimmed through it very quickly … found nothing of interest but it resonated with my thinking
  • i thought even more about it because it was “kinda my thinking, but now i found a wayy better way to do the things OP asked for”
  • i felt the urge to tell OP this much better solution, describe it as an answer here to also broaden every other persons horizon
  • i stumbled over this generic “D”-Avatar, scrolled up once more, got quite confused and thoroughly inspected the OP … because … i myself am such a “D” … but i found that some other "D"s have been active in the forum, only they have not such a nice color as my Avatar :sunglasses: Needed to check which “other D” posted this.
  • realized that i read my own post and was very near to telling myself (the OP) what i could do better now

funny life. now coffee. :metal:

1 Like