diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 243f041..3040ae3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,19 +4,21 @@ stages: - test before_script: - - mkdir -p /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/ - - cp -R /builds/$CI_PROJECT_PATH /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/ - - cd /go/src/dev.sum7.eu/$CI_PROJECT_PATH + - mkdir -p "/go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/" + - cp -R "$CI_PROJECT_DIR" "/go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/" + - cd "/go/src/dev.sum7.eu/$CI_PROJECT_PATH" - go get -d -t ./... build-my-project: stage: build script: - - go install dev.sum7.eu/$CI_PROJECT_PATH - - mv /go/bin/$CI_PROJECT_NAME /builds/$CI_PROJECT_PATH + - mkdir "$CI_PROJECT_DIR/bin/" + - go install "dev.sum7.eu/$CI_PROJECT_PATH" + - mv "/go/bin/$CI_PROJECT_NAME" "$CI_PROJECT_DIR/bin/$CI_PROJECT_NAME" artifacts: paths: - - $CI_PROJECT_NAME + - "bin/$CI_PROJECT_NAME" + - config_example.toml test-my-project: stage: test @@ -26,6 +28,7 @@ test-my-project: - ./.ci/check-gofmt - ./.ci/check-testfiles - go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt + - go tool cover -func=.testCoverage.txt artifacts: paths: - .testCoverage.txt diff --git a/README.md b/README.md index 4c60c60..f4ea11f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # logmania -[![DroneCI](https://ci.sum7.eu/api/badges/genofire/logmania/status.svg?branch=master)](https://ci.sum7.eu/genofire/logmania) -[![CircleCI](https://circleci.com/gh/genofire/logmania/tree/master.svg?style=shield)](https://circleci.com/gh/genofire/logmania/tree/master) -[![Coverage Status](https://coveralls.io/repos/github/genofire/logmania/badge.svg?branch=master)](https://coveralls.io/github/genofire/logmania?branch=master) + +[![pipeline status](https://dev.sum7.eu/genofire/logmania/badges/master/pipeline.svg)](https://dev.sum7.eu/genofire/logmania/pipelines) +[![coverage report](https://dev.sum7.eu/genofire/logmania/badges/master/coverage.svg)](https://dev.sum7.eu/genofire/logmania/pipelines) [![Go Report Card](https://goreportcard.com/badge/dev.sum7.eu/genofire/logmania)](https://goreportcard.com/report/dev.sum7.eu/genofire/logmania) [![GoDoc](https://godoc.org/dev.sum7.eu/genofire/logmania?status.svg)](https://godoc.org/dev.sum7.eu/genofire/logmania) @@ -26,6 +26,27 @@ it could replace text by regex expression configuration live possible by bot (on input e.g. xmpp) +## Get logmania + +#### Download + +Latest Build binary from ci here: + +[Download All](https://dev.sum7.eu/genofire/logmania/-/jobs/artifacts/master/download/?job=build-my-project) (with config example) + +[Download Binary](https://dev.sum7.eu/genofire/logmania/-/jobs/artifacts/master/raw/logmania?inline=false&job=build-my-project) + +#### Build + +```bash +go get -u dev.sum7.eu/genofire/logmania +``` + +## Configure + +see `config_example.toml` + + ## Related Projects - [hook2xmpp](https://dev.sum7.eu/genofire/hook2xmpp) for e.g. grafana, alertmanager(prometheus), gitlab, git, circleci diff --git a/logmania_example.conf b/config_example.toml similarity index 100% rename from logmania_example.conf rename to config_example.toml