Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sanecz committed Feb 5, 2022
1 parent 57a4e56 commit d1ceb6f
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 16 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Create a release and upload Python Package
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release netbox-ipmi-ovh-${{ github.ref }}
body: Release ${{ github.ref }}
draft: false
prerelease: false
deploy:
runs-on: ubuntu-latest
environment: deploy
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Lisa Bekdache

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include README.md
include LICENSE
recursive-include netbox_ipmi_ovh/templates *
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,3 @@ You can create custom fields to store required informations for the plugin to wo

![](docs/example_fields.png)


# TODO LIST

- [x] gestion d'erreur si l'access ipmi demandé n'est pas dispo coté ovh
- [x] default value si ssh_key / ip pas set
- [x] gestion d'erreur si OVH renvoie erreur
- [x] better documentation
- [x] support derniere version netbox
- [ ] test en python 3.7 (dev en 3.9)
- [ ] pip package
- [x] docstrings
- [x] test if ovh_server_name retrieived via getattr and return proper error if not
2 changes: 1 addition & 1 deletion netbox_ipmi_ovh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class NetboxIpmiOvhConfig(PluginConfig):
name = 'netbox_ipmi_ovh'
verbose_name = 'Netbox ipmi ovh'
description = 'A plugin used to add a button in the dcim.device to allow easier access to the IPMI for OVH managed bare metal servers.'
version = '0.0.1'
version = '1.0.2'
author = 'Lisa Bekdache'
author_email = '[email protected]'
base_url = 'netbox_ipmi_ovh'
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

setup(
name='netbox_ipmi_ovh',
version='0.0.1',
url='https://github.com/sanecz/nextbox-ipmi-ovh',
download_url='https://github.com/sanecz/nextbox-ipmi-ovh/archive/v0.0.1.tar.gz',
version='1.0.2',
url='https://github.com/sanecz/netbox-ipmi-ovh',
download_url='https://github.com/sanecz/netbox-ipmi-ovh/archive/v1.0.2.tar.gz',
description='A tool to launch ipmi for ovh servers without going through the manager',
long_description=long_description,
long_description_content_type='text/markdown',
Expand All @@ -27,5 +27,6 @@
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)

0 comments on commit d1ceb6f

Please sign in to comment.