Commit 35c26369 authored by Alessio Caiazza's avatar Alessio Caiazza

Stick with codeclimate 0.69.0

parent 898641ca
Pipeline #14071860 passed with stages
in 21 minutes and 12 seconds
---
check-version: false
......@@ -92,14 +92,13 @@ codequality:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
CODECLIMATE_FORMAT: json
cache: {}
dependencies: []
before_script: []
before_script:
- apk add -U make
script:
# Add custom code climate engines
- docker pull registry.gitlab.com/nolith/codeclimate-gocyclo && docker tag registry.gitlab.com/nolith/codeclimate-gocyclo codeclimate/codeclimante-gocyclo
# Run code climate
- 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
- make codequality > codeclimate.json
artifacts:
paths: [codeclimate.json]
expire_in: 1 week
......
......@@ -5,6 +5,7 @@ REVISION := $(shell git rev-parse --short=8 HEAD || echo unknown)
BRANCH := $(shell git show-ref | grep "$(REVISION)" | grep -v HEAD | awk '{print $$2}' | sed 's|refs/remotes/origin/||' | sed 's|refs/heads/||' | sort | head -n 1)
BUILT := $(shell date +%Y-%m-%dT%H:%M:%S%:z)
TESTFLAGS ?= -cover
CODECLIMATE_FORMAT ?= text
LATEST_STABLE_TAG := $(shell git -c versionsort.prereleaseSuffix="-rc" -c versionsort.prereleaseSuffix="-RC" tag -l "v*.*.*" --sort=-v:refname | awk '!/rc/' | head -n 1)
export IS_LATEST :=
......@@ -52,6 +53,7 @@ help:
#
# Testing commands:
# make test - run project tests
# make codequality - run code quality analysis
#
# Deployment commands:
# make deps - install all dependencies
......@@ -78,6 +80,16 @@ deps:
go get -u github.com/jteeuwen/go-bindata/...
go install cmd/vet
codequality:
@docker pull registry.gitlab.com/nolith/codeclimate-gocyclo > /dev/null
@docker tag registry.gitlab.com/nolith/codeclimate-gocyclo codeclimate/codeclimante-gocyclo > /dev/null
@docker run --rm --tty --env CODECLIMATE_CODE="$(PWD)" \
--volume "$(PWD)":/code \
--volume "$(PWD)/.codeclimate-global.yml":/config.yml \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /tmp/cc:/tmp/cc \
codeclimate/codeclimate:0.69.0 analyze -f $(CODECLIMATE_FORMAT)
out/docker/prebuilt-x86_64.tar.xz: $(GO_FILES)
# Create directory
mkdir -p out/docker
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment