diff --git a/.gitignore b/.gitignore index f9528a21f090014a91337b2abf1b60ae8c6e4e24..1f18f4e51f6c2c7e636b3aea35a5122ae60c5c9b 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ dist/ tfplan *.tfstate* *.venv +mnpw diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..153e4a1f73998bca80cffd44637656e5992d177a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +--- +include: + - project: shore/ci-templates + file: templates/pre-commit.yml + +before_script: + - >- + echo 'deb http://deb.debian.org/debian buster-backports main' + >> /etc/apt/sources.list + - apt-get update + - apt-get install -y -t buster-backports golang + - go version + +build: + stage: build + image: registry.hub.docker.com/library/golang:1.16-alpine + before_script: + - go build + script: + - ./mnpw diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..328955e173617c21c7d4cf98493b3a4d0868f554 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,45 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.4.0 + hooks: + - id: check-added-large-files + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: trailing-whitespace + + - repo: https://github.com/Yelp/detect-secrets + rev: v1.1.0 + hooks: + - id: detect-secrets + + - repo: https://github.com/adrienverge/yamllint + rev: v1.26.1 + hooks: + - id: yamllint + + - repo: https://github.com/amperser/proselint/ + rev: 0.10.2 + hooks: + - id: proselint + types: [plain-text] + exclude: LICENSE + + - repo: https://github.com/executablebooks/mdformat.git + rev: 0.7.4 + hooks: + - id: mdformat + + - repo: https://gitlab.com/devopshq/gitlab-ci-linter + rev: v1.0.3 + hooks: + - id: gitlab-ci-linter + args: + - "--server" + - https://git.shore.co.il + + - repo: https://github.com/tekwizely/pre-commit-golang.git + rev: v0.8.3 + hooks: + - id: go-fmt + - id: go-vet diff --git a/README.md b/README.md index 80720f5ea8a2170d63c4d44bf747088fcc78dfee..f78ff858e30572b3765f891ae9f907add2e8277a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # My Nagios Plugin Wrapper +[](https://git.shore.co.il/shore/mnpw/-/commits/master) + ## License This software is licensed under the MIT license (see `LICENSE.txt`). diff --git a/go.mod b/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..9ee2eb2ad3a8b3f3a1a351904d41423c8baab296 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.shore.co.il/shore/mnpw + +go 1.15 diff --git a/mnpw.go b/mnpw.go new file mode 100644 index 0000000000000000000000000000000000000000..ec7d7b9d8106574f78e80cd101f6d3856b00caec --- /dev/null +++ b/mnpw.go @@ -0,0 +1,9 @@ +package main + +import ( + "os" +) + +func main() { + os.Exit(0) +}