the last days I was working on getting CodeClimate’s docker container run in a stage of my GitLab CI. I read the documentation about it several times and finally got it to work.
I then pushed a commit to master, letting the job run. It created a codeclimate.json and uploaded it as the only artifact of the job. But after creating several merge requests (where the job also runs on a new commit) and alot of changes, there’s still no widget for the code quality as it is documented.
“codeclimate”-job artifact site with last commit in master:
“codeclimate”-job artifact site with last commit in source branch of MR:
GitLab version: GitLab Community Edition 9.3.9 755bb71
GitLab-runner version: 9.3.0 (3df822b)
image: maven:3.5-jdk-8 stages: - build - docs - deploy compile: stage: build tags: - maven script: - mvn clean package - cat target/site/jacoco/index.html artifacts: expire_in: 4w paths: - target/*.jar codeclimate: image: docker:latest stage: docs variables: DOCKER_DRIVER: overlay services: - docker:dind script: - docker pull codeclimate/codeclimate - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate init - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json > codeclimate.json artifacts: paths: [codeclimate.json] javadocs: stage: docs dependencies:  tags: - maven script: javadoc -d html/ -sourcepath src/main/java -subpackages de -exclude java.net:java.lang artifacts: expire_in: 4w paths: - html/* only: - master pages: stage: deploy dependencies: [javadocs] tags: - maven script: - mkdir .public - cp -r html/* .public - mv .public public artifacts: paths: - public only: - master
Maybe I’m just being stupid here, but any help would be highly appreciated