Simplify code intelligence setup for GitLab native code intelligence

Problem to solve

To enable native code intelligence for a project, a CI pipeline must generate an LSIF file, and convert it into a custom GitLab format, and make it available as a report. We should make this simpler, and avoid forcing the user to run custom GitLab scripts that they need to fork into their own GitLab instance or download from the internet.

code_navigation:
  script:
    - echo "Up to you! 🤷‍♂️"
  artifacts:
    reports:
      lsif: lsif.json

Further details

Proposal

The report should use the documented standard LSIF format that can be validated by other tool.

code_navigation:
  script:
    - go get github.com/sourcegraph/lsif-go/cmd/lsif-go
    - lsif-go
 artifacts:
    reports:
      lsif: dump.lsif

If the CI job passes, GitLab should convert the dump into our internal representation, and store this in an appropriate location.

Testing

This is a good candidate for a new end-to-end test so that we can confirm that the .lsif file is picked up by the runner, processed by the backend, and the content is revealed in the frontend. Of course each step should still be covered by unit/integration tests.

Links / references

Edited by Daniel Gruesso