Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis Update to support auto-deploy #32

Merged
merged 7 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ env:
# travis encrypt PYPI_TOKEN=<value> --add env.global --com
# Might need to update it once the repo is publish (travis-ci.org vs travis-ci.com)
global:
secure: dpSnHW9xP++k8AOfguX6poI3HdK0fxaWq4aHZCqxbSrNXzokcWf8y5PRMsDLdrbWMXG2JOmFl32bgsYXzcyHoopJwIsetOK97Sjq/Nd/Ycqne/bfXUyvqvF/wcpM9OHd+baHOk+yBVIoEe0fLZVo5gP7abP8ZFyjtyXRxP6zapq0cnxI0H6EPdNRiWJIa8gZT/RKFEeQHN6PIiF5dRNv1Bw0Gp43VT48t0MwhvnH8bT7a6SAZp/4aCNN6+yMPXcUTFyN+Pm+rFwoi7xVafpdFoZb4tOcVoTPQWRS7kcf4y+kvTuUWizumt7Oo5J2MyprAZsdWhp/4RGcwzdr371Bj9RyjH4lm+yf3uGw+k5SmQbbvg/5JXzCwHZxZCKl8w289iqWd024AprrkR20o3awxsTlobkE2+T8TU4w3pL/Rponu3B9VyI+I5WZshbM19nvhQHXmyWoNdtCFGri0dL9XYpLHqpiE+zD1ZsVMth4d+YZkI2Mj6eMiBVuVR5568TGqZ/qHE2dX3h0vkWIYFU0XFwx/P46kCxf89FfRD9GShahoBH2P+EFIiz1TcnnLbw/kyXleYVMWYIXYDoUT+f3Xs265nMqCXHdTA6GUlS8A79rttgouWN99KEo6EkF0o2ECiwSJfU/mq3Z5KWoHL97KlC6C9G+DxPCrLsvbOPCcm4=
secure: gE/KrxVCPfDItdRa0FV+49MQ0kfsEOMFdCd8Z6oETq6dqTPa7PpaCpQ2jJc72F3TYIVtV15ziCqF3m63fs+13kpbicvlBasXTjom8PV0n+mrLuMm+ejyFuXvRrIsS5GcLkf2THqJBfQRZEdJECiqwGQTbC0rH3icmbxk+KtlsDELGMmxPBdp+o9jxWrP+duKqlOi1kg/Q97gpwRo3fZCJZVtBWed/2Ha0+2Vc6nMFixzayab78gKocz//rx+xB+ODzqZBNUks9A0I2Nqw7Ano6/xVMWYPRMx/mhoyRe6tTMUA3AhkxHZAu89eJmW/fNPvC42Qos8V8aQzJnv0X8HWQl5QdypZZdHoOwVmi3CBVWAkUvazIj9PHX5hxsY3Svjnkq62Rmp1iF1Le87Uh8+N9rPWyZVtFwTqFD+ddT+/KHpdifD5y7dRwMiS5pbEZ01H6zIf3WvxvWUMI7Gm0SscZXWmV/s483Rlzz1wU1QgVF06SjrzcDsu/G6oR5JnZXk5L8mzrkslrRz5/DoP59i6gNpLrWTNnDTTgVxfC3RqumS3MtjM2Ap66WkZeqmxijsoqV8qZ//yKq2+wF6ZcQdSirUj1lUKDOUhWX33ls4pWt3zZIEAHni0yOecfiEJv6+vSWhPEgBHK+1sD/K6ilhHmN4NqJNkUEiLOw/+HU4AQs=
services:
- docker
# --------------------------------------------------------------------------
# Tests
# --------------------------------------------------------------------------
before_script:
- pip install invoke docker-compose poetry
- pip install invoke docker-compose
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > /tmp/get-poetry.py
- python /tmp/get-poetry.py -y --version 1.0.2
- source $HOME/.poetry/env

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the issue or requirement driving this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into some Poetry bugs related to how it's managing and finding Pypi credentials
In this issue, python-poetry/poetry#1843 someone suggested to downgrade to 1.0.2
To be honest I'm not 100% sure that was the root cause but I believe it should work as it.
My plan is to do more testing later this week.
as usual doing things in Travis is very complicated :(

script:
- invoke build --python-ver $TRAVIS_PYTHON_VERSION
- invoke tests --python-ver $TRAVIS_PYTHON_VERSION
Expand All @@ -30,9 +34,10 @@ script:
# --------------------------------------------------------------------------
deploy:
provider: script
script: poetry publish --build -u __token__ -p $PYPI_TOKEN
script: poetry config pypi-token.pypi $PYPI_TOKEN && poetry publish --build
skip_cleanup: true
on:
tags: true
branch: master
condition: $NETBOX_VER = master
python: 3.7
python: 3.7
2 changes: 1 addition & 1 deletion netbox_onboarding/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
limitations under the License.
"""

__version__ = "0.9.2"
__version__ = "0.9.3"

from extras.plugins import PluginConfig

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ntc-netbox-plugin-onboarding"
version = "0.9.2"
version = "0.9.3"
description = "A plugin for NetBox to easily onboard new devices."
authors = ["Info <info@networktocode.com>"]
license = "Apache-2.0"
Expand Down