Git hook equivalent in RTC SCM
We have Gitlab configured like following:
- If anyone pushes their code, first sever side git hook (pre-receive) will trigger SonarQube Quality checks, if any error in code it rejects that push.
-
Also checks for file types, if some files like
.zip
,.o
or.class
are present, the code gets rejected by the same server side hook. - Same for file size.
Are the above 3 validations possible in IBM RTC SCM before delivering the code to the server? How? I know
.jazzignore
, but I want specifically for server side rules.
We want to integrate RTC with sonarqube and bamboo. For every checkin automatically sonarqube test shall run and post successful test, auto build using bamboo should run.
One answer
In RTC, the closest analogue for a git "push" to server is "deliver", not "check-in".
Comments
You would run the SonarQube check as a "private build" on the workspace containing the changes you want to deliver (accept all incoming changes from the stream to the workspace, to ensure you have the most recent changes to the stream). If that SonarQube check passes, set an appropriate property on the file, and your custom deliver pre-condition would require that this property be set in order for the deliver to succeed. I am not sure what you mean by "can I use a precondition of static checks on deliver stream" or "there in custom tool can I use sonarcube".