commit
48accce8e6
@ -14,14 +14,14 @@ services:
|
|||||||
- docker
|
- docker
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- docker-compose -f docker-compose.test.yml pull --parallel
|
- docker-compose pull --parallel
|
||||||
- docker-compose -f docker-compose.test.yml build
|
- docker-compose build
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- docker-compose -f docker-compose.test.yml run app
|
- docker-compose run netbox ./manage.py test
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- docker-compose -f docker-compose.test.yml down
|
- docker-compose down
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
||||||
|
@ -306,10 +306,10 @@ You can use the following ENV variables to customize the build:
|
|||||||
|
|
||||||
## Tests
|
## 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
|
## About
|
||||||
|
@ -1,24 +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:
|
|
||||||
- ./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
|
|
@ -43,7 +43,7 @@
|
|||||||
# type: selection
|
# type: selection
|
||||||
# label: Choose between items
|
# label: Choose between items
|
||||||
# required: false
|
# required: false
|
||||||
# filterable: true
|
# filter_logic: loose
|
||||||
# weight: 30
|
# weight: 30
|
||||||
# on_objects:
|
# on_objects:
|
||||||
# - dcim.models.Device
|
# - dcim.models.Device
|
||||||
|
@ -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 extras.models import CustomField, CustomFieldChoice
|
||||||
|
|
||||||
from ruamel.yaml import YAML
|
from ruamel.yaml import YAML
|
||||||
|
Loading…
Reference in New Issue
Block a user