Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
My Nagios Plugin Wrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shore
My Nagios Plugin Wrapper
Commits
a70e63a4
Commit
a70e63a4
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
pre-commit hooks update.
- Update from the git skeleton files. - Fix some newly found issues.
parent
e33fa024
No related branches found
No related tags found
No related merge requests found
Pipeline
#2659
passed
3 years ago
Stage: .pre
Stage: build
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+2
-2
2 additions, 2 deletions
.gitlab-ci.yml
.pre-commit-config.yaml
+46
-48
46 additions, 48 deletions
.pre-commit-config.yaml
mnpw/nagios.py
+4
-4
4 additions, 4 deletions
mnpw/nagios.py
with
52 additions
and
54 deletions
.gitlab-ci.yml
+
2
−
2
View file @
a70e63a4
...
...
@@ -6,7 +6,7 @@ include:
file
:
templates/python.yml
variables
:
SKIP_PYPI_UPLOAD
:
!!str
true
SKIP_PYPI_UPLOAD
:
'
true
'
build-wheel
:
extends
:
.python3-build
...
...
@@ -88,7 +88,7 @@ release:
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
tags
:
[
host01.shore.co.il
]
script
:
-
!!str
true
-
'
true
'
only
:
-
tags
needs
:
...
...
This diff is collapsed.
Click to expand it.
.pre-commit-config.yaml
+
46
−
48
View file @
a70e63a4
---
repos
:
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
.git
rev
:
v4.0.1
hooks
:
-
id
:
check-
executables-have-shebang
s
-
id
:
check-
added-large-file
s
-
id
:
check-merge-conflict
-
id
:
check-toml
-
id
:
detect-private-key
-
id
:
end-of-file-fixer
-
id
:
trailing-whitespace
exclude
:
\.diff$
-
repo
:
https://github.com/Yelp/detect-secrets
-
repo
:
https://github.com/codespell-project/codespell.git
rev
:
v2.1.0
hooks
:
-
id
:
codespell
-
repo
:
https://github.com/Yelp/detect-secrets.git
rev
:
v1.1.0
hooks
:
-
id
:
detect-secrets
-
repo
:
https://git
hu
b.com/
codespell-project/codespell
.git
rev
:
v
2.
1.0
-
repo
:
https://git
la
b.com/
devopshq/gitlab-ci-linter
.git
rev
:
v1.0
.2
hooks
:
-
id
:
codespell
-
id
:
gitlab-ci-linter
args
:
-
"
--server"
-
https://git.shore.co.il
-
repo
:
https://github.com/adrienverge/yamllint
rev
:
v1.26.1
-
repo
:
https://git.shore.co.il/nimrod/yamltool.git
rev
:
v0.1.2
hooks
:
-
id
:
yamltool
-
repo
:
https://github.com/adrienverge/yamllint.git
rev
:
v1.26.3
hooks
:
-
id
:
yamllint
-
repo
:
https://git
hub.com/ambv/black
rev
:
21.6b
0
-
repo
:
https://git
.shore.co.il/nimrod/pre-commit-hooks.git
rev
:
v0.2.
0
hooks
:
-
id
:
black
args
:
-
|
--line-length=79
-
id
:
poetry-check
-
repo
:
https://github.com/Lucas-C/pre-commit-hooks-markup
-
repo
:
https://github.com/Lucas-C/pre-commit-hooks-markup
.git
rev
:
v1.0.1
hooks
:
-
id
:
rst-linter
-
repo
:
https://github.com/myint/rstcheck.git
rev
:
3f92957478422df87bd730abde66f089cc1ee19b
# pragma: allowlist secret
rev
:
master
hooks
:
-
id
:
rstcheck
-
repo
:
https://github.com/PyCQA/prospector
rev
:
1.3.1
-
repo
:
https://github.com/ambv/black.git
rev
:
21.10b0
hooks
:
-
id
:
black
args
:
-
|
--line-length=79
-
repo
:
https://github.com/PyCQA/isort
rev
:
5.10.1
hooks
:
-
id
:
isort
args
:
[
"
--filter-files"
,
"
--profile"
,
"
black"
]
-
repo
:
https://github.com/PyCQA/prospector.git
rev
:
1.6.0
hooks
:
-
id
:
prospector
args
:
...
...
@@ -67,7 +94,7 @@ repos:
additional_dependencies
:
-
bandit
-
pyroma
exclude
:
^
tests
/.*
exclude
:
tests
-
repo
:
https://gitlab.com/pycqa/flake8.git
rev
:
3.9.2
...
...
@@ -79,36 +106,7 @@ repos:
additional_dependencies
:
-
flake8-bugbear
-
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/timothycrosley/isort
rev
:
5.9.1
hooks
:
-
id
:
isort
additional_dependencies
:
-
toml
-
repo
:
https://github.com/asottile/pyupgrade
rev
:
v2.23.2
hooks
:
-
id
:
pyupgrade
-
repo
:
local
hooks
:
-
id
:
poetry check
name
:
poetry check
language
:
system
entry
:
poetry
args
:
[
check
]
description
:
Checks pyproject.toml
always_run
:
true
pass_filenames
:
false
types
:
[
toml
]
files
:
pyproject\.toml
This diff is collapsed.
Click to expand it.
mnpw/nagios.py
+
4
−
4
View file @
a70e63a4
...
...
@@ -158,10 +158,10 @@ class Check:
timeout
=
timeout
,
universal_newlines
=
True
,
)
except
FileNotFoundError
:
raise
RuntimeError
(
f
"
Command
{
self
.
Command
}
not found.
"
)
except
subprocess
.
TimeoutExpired
:
raise
RuntimeError
(
"
Timeout exceeded.
"
)
except
FileNotFoundError
as
ex
:
raise
RuntimeError
(
f
"
Command
{
self
.
Command
}
not found.
"
)
from
ex
except
subprocess
.
TimeoutExpired
as
ex
:
raise
RuntimeError
(
"
Timeout exceeded.
"
)
from
ex
self
.
ExitCode
=
proc
.
returncode
logging
.
info
(
f
"
Exit code is
{
self
.
ExitCode
}
.
"
)
self
.
_stdout
=
proc
.
stdout
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment