mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Docker CI Updates (#5909)
* Update docker image - base python version - Also, build docker image on PR if any docker-related files have changed * Update setuptools * Update base level packages for docker image * Reduce version * Include docker workflow in filter * Revert to python 3.10 * Remove call to upgrade setuptools * Try newer version of setuptools * Remove reliance on "minimal" * Fix package URL * Whoops. Fix typo
This commit is contained in:
parent
2ccddd8f2e
commit
15b2437392
30
.github/workflows/docker.yaml
vendored
30
.github/workflows/docker.yaml
vendored
@ -20,15 +20,38 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
# pull_request:
|
pull_request:
|
||||||
# branches:
|
branches:
|
||||||
# - 'master'
|
- 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
paths-filter:
|
||||||
|
name: Filter
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
docker: ${{ steps.filter.outputs.docker }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
|
||||||
|
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # pin@v2.11.1
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
docker:
|
||||||
|
- .github/workflows/docker.yaml
|
||||||
|
- docker/**
|
||||||
|
- docker-compose.yml
|
||||||
|
- docker.dev.env
|
||||||
|
- Dockerfile
|
||||||
|
|
||||||
|
|
||||||
# Build the docker image
|
# Build the docker image
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: paths-filter
|
||||||
|
if: needs.paths-filter.outputs.docker == 'true' || github.event_name == 'release' || github.event_name == 'push'
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
@ -59,7 +82,6 @@ jobs:
|
|||||||
docker-compose run inventree-dev-server invoke update
|
docker-compose run inventree-dev-server invoke update
|
||||||
docker-compose run inventree-dev-server invoke setup-dev
|
docker-compose run inventree-dev-server invoke setup-dev
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
docker-compose run inventree-dev-server pip install setuptools==68.1.2
|
|
||||||
docker-compose run inventree-dev-server invoke wait
|
docker-compose run inventree-dev-server invoke wait
|
||||||
- name: Check Data Directory
|
- name: Check Data Directory
|
||||||
# The following file structure should have been created by the docker image
|
# The following file structure should have been created by the docker image
|
||||||
|
@ -23,8 +23,8 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
|
|||||||
"""Setup for all tests."""
|
"""Setup for all tests."""
|
||||||
self.MSG_NO_PKG = 'Either packagename of URL must be provided'
|
self.MSG_NO_PKG = 'Either packagename of URL must be provided'
|
||||||
|
|
||||||
self.PKG_NAME = 'minimal'
|
self.PKG_NAME = 'inventree-brother-plugin'
|
||||||
self.PKG_URL = 'git+https://github.com/geoffrey-a-reed/minimal'
|
self.PKG_URL = 'git+https://github.com/inventree/inventree-brother-plugin'
|
||||||
super().setUp()
|
super().setUp()
|
||||||
|
|
||||||
def test_plugin_install(self):
|
def test_plugin_install(self):
|
||||||
@ -71,7 +71,7 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
|
|||||||
{
|
{
|
||||||
'confirm': True,
|
'confirm': True,
|
||||||
'url': self.PKG_URL,
|
'url': self.PKG_URL,
|
||||||
'packagename': 'minimal',
|
'packagename': self.PKG_NAME,
|
||||||
},
|
},
|
||||||
expected_code=201,
|
expected_code=201,
|
||||||
).data
|
).data
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
# Base python requirements for docker containers
|
# Base python requirements for docker containers
|
||||||
|
|
||||||
# Basic package requirements
|
# Basic package requirements
|
||||||
invoke>=1.4.0 # Invoke build tool
|
invoke>=2.2.0 # Invoke build tool
|
||||||
pyyaml>=6.0.1
|
pyyaml>=6.0.1
|
||||||
setuptools==65.6.3
|
setuptools>=69.0.0
|
||||||
wheel>=0.37.0
|
wheel>=0.41.0
|
||||||
|
|
||||||
# Database links
|
# Database links
|
||||||
psycopg2>=2.9.1
|
psycopg2>=2.9.9
|
||||||
mysqlclient>=2.0.3,<=2.1.1
|
mysqlclient>=2.2.0
|
||||||
pgcli>=3.1.0
|
pgcli>=3.1.0
|
||||||
mariadb>=1.0.7,<1.1.0
|
mariadb>=1.1.8
|
||||||
|
|
||||||
# gunicorn web server
|
# gunicorn web server
|
||||||
gunicorn>=20.1.0
|
gunicorn>=21.2.0
|
||||||
|
|
||||||
# LDAP required packages
|
# LDAP required packages
|
||||||
django-auth-ldap # Django integration for ldap auth
|
django-auth-ldap # Django integration for ldap auth
|
||||||
|
1
tasks.py
1
tasks.py
@ -168,6 +168,7 @@ def install(c):
|
|||||||
|
|
||||||
# Install required Python packages with PIP
|
# Install required Python packages with PIP
|
||||||
c.run('pip3 install --upgrade pip')
|
c.run('pip3 install --upgrade pip')
|
||||||
|
c.run('pip3 install --upgrade setuptools')
|
||||||
c.run('pip3 install --no-cache-dir --disable-pip-version-check -U -r requirements.txt')
|
c.run('pip3 install --no-cache-dir --disable-pip-version-check -U -r requirements.txt')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user