From d851f28913048fd21872ecf9bf72d6d1d150e5e6 Mon Sep 17 00:00:00 2001 From: thde Date: Thu, 28 Jun 2018 09:28:07 +0200 Subject: [PATCH 1/4] fix deprecated value --- initializers/custom_fields.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initializers/custom_fields.yml b/initializers/custom_fields.yml index 1409167..e70d6e5 100644 --- a/initializers/custom_fields.yml +++ b/initializers/custom_fields.yml @@ -43,7 +43,7 @@ # type: selection # label: Choose between items # required: false -# filterable: true +# filter_logic: loose # weight: 30 # on_objects: # - dcim.models.Device From cc160198ef5663b7f12bb1db117597d46e5e414e Mon Sep 17 00:00:00 2001 From: thde Date: Thu, 28 Jun 2018 09:28:23 +0200 Subject: [PATCH 2/4] fix import constant --- startup_scripts/20_custom_fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup_scripts/20_custom_fields.py b/startup_scripts/20_custom_fields.py index 1346869..2c9e649 100644 --- a/startup_scripts/20_custom_fields.py +++ b/startup_scripts/20_custom_fields.py @@ -1,4 +1,4 @@ -from extras.constants import CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE, CF_TYPE_URL, CF_TYPE_SELECT +from extras.constants import CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE, CF_TYPE_URL, CF_TYPE_SELECT, CF_FILTER_CHOICES from extras.models import CustomField, CustomFieldChoice from ruamel.yaml import YAML From 0d8e719675a69a2637e25b71920d98827df211d7 Mon Sep 17 00:00:00 2001 From: thde Date: Thu, 28 Jun 2018 09:44:07 +0200 Subject: [PATCH 3/4] add initializers to specs --- docker-compose.test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.test.yml b/docker-compose.test.yml index a2ad9b5..37dca3f 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -10,6 +10,8 @@ services: - postgres env_file: netbox.env volumes: + - ./startup_scripts:/opt/netbox/startup_scripts:ro + - ./initializers:/opt/netbox/initializers:ro - ./configuration:/etc/netbox/config:ro command: - ./manage.py From 5e0b0a608b2346b30fdbbbd05f35c558cfc22317 Mon Sep 17 00:00:00 2001 From: thde Date: Thu, 28 Jun 2018 09:59:59 +0200 Subject: [PATCH 4/4] use docker-compose.yml instead of docker-compose.test.yml --- .travis.yml | 8 ++++---- README.md | 4 ++-- docker-compose.test.yml | 26 -------------------------- 3 files changed, 6 insertions(+), 32 deletions(-) delete mode 100644 docker-compose.test.yml diff --git a/.travis.yml b/.travis.yml index 2dac8f3..99c5b53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,14 +14,14 @@ services: - docker install: - - docker-compose -f docker-compose.test.yml pull --parallel - - docker-compose -f docker-compose.test.yml build + - docker-compose pull --parallel + - docker-compose build script: - - docker-compose -f docker-compose.test.yml run app + - docker-compose run netbox ./manage.py test after_script: - - docker-compose -f docker-compose.test.yml down + - docker-compose down after_success: - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" diff --git a/README.md b/README.md index 29688ec..1b821d5 100644 --- a/README.md +++ b/README.md @@ -306,10 +306,10 @@ You can use the following ENV variables to customize the build: ## Tests -To run the test coming with NetBox, use the `docker-compose.test.yml` file as such: +To run the test coming with NetBox, use the `docker-compose.yml` file as such: ``` -$ docker-compose -f docker-compose.test.yml run --rm app +$ docker-compose run netbox ./manage.py test ``` ## About diff --git a/docker-compose.test.yml b/docker-compose.test.yml deleted file mode 100644 index 37dca3f..0000000 --- a/docker-compose.test.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: '3' -services: - app: - build: - context: . - args: - - BRANCH=${BRANCH-master} - image: ninech/netbox:${BRANCH-latest} - depends_on: - - postgres - env_file: netbox.env - volumes: - - ./startup_scripts:/opt/netbox/startup_scripts:ro - - ./initializers:/opt/netbox/initializers:ro - - ./configuration:/etc/netbox/config:ro - command: - - ./manage.py - - test - postgres: - image: postgres:10.2-alpine - env_file: postgres.env -volumes: - netbox-static-files: - driver: local - netbox-nginx-config: - driver: local