Fix for tasks.py - docker (#6380)

* Instrument tasks.py

* Enforce no_frontend

* Run docker CI step if tasks.py changes
This commit is contained in:
Oliver 2024-02-01 12:25:24 +11:00 committed by GitHub
parent e85dd73f62
commit e1e63fa644
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View File

@ -46,6 +46,7 @@ jobs:
- docker.dev.env
- Dockerfile
- requirements.txt
- tasks.py
# Build the docker image

View File

@ -13,9 +13,9 @@ ARG base_image=python:3.10-alpine3.18
FROM ${base_image} as inventree_base
# Build arguments for this image
ARG commit_tag=""
ARG commit_hash=""
ARG commit_date=""
ARG commit_tag=""
ENV PYTHONUNBUFFERED 1
ENV PIP_DISABLE_PIP_VERSION_CHECK 1

View File

@ -422,8 +422,11 @@ def update(
# - INVENTREE_DOCKER is set (by the docker image eg.) and not overridden by `--frontend` flag
# - `--no-frontend` flag is set
if (os.environ.get('INVENTREE_DOCKER', False) and not frontend) or no_frontend:
pass
print('Skipping frontend update!')
frontend = False
no_frontend = True
else:
print('Updating frontend...')
# Decide if we should compile the frontend or try to download it
if node_available(bypass_yarn=True):
frontend_compile(c)
@ -947,6 +950,8 @@ def frontend_compile(c):
Args:
c: Context variable
"""
print('Compiling frontend code...')
frontend_install(c)
frontend_trans(c)
frontend_build(c)
@ -1037,6 +1042,8 @@ def frontend_download(
import requests
print('Downloading frontend...')
# globals
default_headers = {'Accept': 'application/vnd.github.v3+json'}