mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	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:
		
							
								
								
									
										1
									
								
								.github/workflows/docker.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/docker.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -46,6 +46,7 @@ jobs: | ||||
|               - docker.dev.env | ||||
|               - Dockerfile | ||||
|               - requirements.txt | ||||
|               - tasks.py | ||||
|  | ||||
|  | ||||
|   # Build the docker image | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
							
								
								
									
										9
									
								
								tasks.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								tasks.py
									
									
									
									
									
								
							| @@ -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'} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user