github.com/alloyci/alloy-runner@v1.0.1-0.20180222164613-925503ccafd6/scripts/codequality (about)

     1  #!/bin/sh
     2  
     3  set -eo pipefail
     4  
     5  code_path=$(pwd)
     6  
     7  # docker run --tty will merge stderr and stdout, we don't need this on CI or
     8  # it will break codequality json file
     9  [ "$CI" != "" ] || docker_tty="--tty"
    10  
    11  docker pull registry.gitlab.com/nolith/codeclimate-gocyclo > /dev/null
    12  docker tag registry.gitlab.com/nolith/codeclimate-gocyclo codeclimate/codeclimate-gocyclo > /dev/null
    13  exec docker run --rm $docker_tty --env CODECLIMATE_CODE="$code_path" \
    14  	--volume "$code_path":/code \
    15  	--volume /var/run/docker.sock:/var/run/docker.sock \
    16  	--volume /tmp/cc:/tmp/cc \
    17  	codeclimate/codeclimate:0.70.3 "$@"