UPDATE The script in the answer is obsolete now, since Gitlab plugin for Jenkins can now report build status back to Jenkins.
I'm trying to integrate Gitlab CE 8.4 and Jenkins. I've read that Jenkins CI integration is available in Gitlab EE, but currently its not an option.
I've already set up Jenkins gitlab plugin and Web hooks, and pushes to my repo trigger builds of Jenkins jobs. However, these builds are not shown in the 'Builds' tab in the respective Gitlab page. If I commit .gitlab-ci.yml file to the repository, web hooks still work, Jenkins jobs run, but the 'Builds' page shows that the build is stuck, since no runners are defined.
Indeed, I haven't set up any Gitlab CI runners, since they are not related to Jenkins, as far as I understand.
I'd like to keep my Jenkins job since some useful information is published there, and I also would like to have its status on the Gitlab page. I'm thinking in this regard about a simple script for Gitlab CI runner, that would capture console output from a Jenkins job and translate it to Gitlab. Something like running wget or curl, because Jenkins provides API to see job's output.
However, documentation about Gitlab CI and .gitlab-ci.yml is limited, as well as examples.
How could I write that job file? Am I right in thinking that Gitlab receives job's stdout?