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
59caee6f
Commit
59caee6f
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
GitLab packages and releases.
parent
167aa381
No related branches found
No related tags found
No related merge requests found
Pipeline
#1981
canceled
3 years ago
Stage: .pre
Stage: build
Stage: test
Stage: deploy
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+45
-2
45 additions, 2 deletions
.gitlab-ci.yml
README.rst
+3
-5
3 additions, 5 deletions
README.rst
mnpw/__init__.py
+1
-1
1 addition, 1 deletion
mnpw/__init__.py
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
with
50 additions
and
9 deletions
.gitlab-ci.yml
+
45
−
2
View file @
59caee6f
...
...
@@ -4,8 +4,9 @@ include:
file
:
templates/pre-commit.yml
-
project
:
shore/ci-templates
file
:
templates/python.yml
-
project
:
shore/ci-templates
file
:
templates/gitlab-release.yml
variables
:
SKIP_PYPI_UPLOAD
:
!!str
true
build-wheel
:
extends
:
.python3-build
...
...
@@ -61,3 +62,45 @@ bats:
needs
:
-
job
:
build-executable
artifacts
:
true
upload
:
stage
:
deploy
image
:
docker.io/curlimages/curl
tags
:
[
host01.shore.co.il
]
only
:
-
tags
script
:
-
>-
curl
--header "JOB-TOKEN: $CI_JOB_TOKEN"
--upload-file dist/*.whl
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}.whl"
-
>-
curl
--header "JOB-TOKEN: $CI_JOB_TOKEN"
--upload-file dist/mnpw
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}"
release
:
stage
:
deploy
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
tags
:
[
host01.shore.co.il
]
script
:
-
!!str
true
only
:
-
tags
release
:
name
:
Release $CI_COMMIT_TAG
tag_name
:
$CI_COMMIT_TAG
ref
:
$CI_COMMIT_TAG
description
:
Release $CI_COMMIT_TAG
assets
:
links
:
-
name
:
wheel
link_type
:
package
url
:
|-
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}.whl
-
name
:
binary
link_type
:
package
url
:
|-
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}
This diff is collapsed.
Click to expand it.
README.rst
+
3
−
5
View file @
59caee6f
...
...
@@ -12,7 +12,7 @@ It is intended for my personal use as the warning and critical alerts go to `my
notification mechanism <https://git.shore.co.il/nimrod/nextcloud-notifier>`_.
There is a small-ish binary that is created in the CI pipeline that doesn't have
any external dependencies (like the Python VM or any 3rd party Python packages).
The binary is avaiable at
The
latest
binary is avaiable at
https://git.shore.co.il/shore/mnpw/-/jobs/artifacts/master/raw/dist/mnpw?job=build-executable
and should work all Linux distro with glibc 2.17 or newer.
...
...
@@ -47,10 +47,8 @@ Usage as library
Although the CLI is of little use to anybody but me, you may find the Nagios
plugin handling useful and would want to use it. The package is not published to
PyPI so your best option is getting the `latest wheel package
<https://git.shore.co.il/shore/mnpw/-/jobs/artifacts/master/raw/dist/mnpw-0.1.0-py3-none-any.whl?job=build-wheel>`_
or if you want a specific build, get it from the `CI pipelines
<https://git.shore.co.il/shore/mnpw/-/pipelines>`_.
PyPI so your best option is getting a direct download of the wheel package from
the `releases pages <https://git.shore.co.il/shore/mnpw/-/releases>`_.
License
-------
...
...
This diff is collapsed.
Click to expand it.
mnpw/__init__.py
+
1
−
1
View file @
59caee6f
"""
My Nagios plugin wrapper.
"""
# pylint: disable=logging-fstring-interpolation
__version__
=
"
0.1.0
"
__version__
=
"
0.1.0
-dev
"
import
argparse
import
logging
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
1
View file @
59caee6f
[tool.poetry]
name
=
"mnpw"
version
=
"0.1.0"
version
=
"0.1.0
-dev
"
description
=
"My Nagios plugin wrapper"
authors
=
[
"Adar Nimrod <nimrod@shore.co.il>"
]
license
=
"MIT"
...
...
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