alessandro trinca tornidor commited on
Commit
37d9063
1 Parent(s): 5e5ed73

[ci] add debug logs about folders creation, add missing pnpm build step in baremetal_entrypoint.sh

Browse files
scripts/baremetal_entrypoint.sh CHANGED
@@ -31,6 +31,7 @@ python ${WORKDIR}/scripts/create_folders_and_variables_if_not_exists.py
31
  cd ${WORKDIR}/static
32
  npm install -g npm pnpm
33
  pnpm install
 
34
  pnpm tailwindcss -i ${WORKDIR}/static/src/input.css -o ${WORKDIR}/static/dist/output.css
35
  cd ${WORKDIR}
36
 
 
31
  cd ${WORKDIR}/static
32
  npm install -g npm pnpm
33
  pnpm install
34
+ pnpm build
35
  pnpm tailwindcss -i ${WORKDIR}/static/src/input.css -o ${WORKDIR}/static/dist/output.css
36
  cd ${WORKDIR}
37
 
scripts/create_folders_and_variables_if_not_exists.py CHANGED
@@ -33,10 +33,19 @@ def create_folder_if_not_exists(pathname: Path | str):
33
 
34
  if __name__ == '__main__':
35
  folders_string = os.getenv("FOLDERS_MAP")
36
- folders_dict = json.loads(folders_string)
37
- for folder_env_ref, folder_env_path in folders_dict.items():
38
- print(f"folder_env_ref:{folder_env_ref}, folder_env_path:{folder_env_path}.")
39
- logging.info(f"folder_env_ref:{folder_env_ref}, folder_env_path:{folder_env_path}.")
40
- create_folder_if_not_exists(folder_env_path)
41
- print("========")
42
- assert os.getenv(folder_env_ref) == folder_env_path
 
 
 
 
 
 
 
 
 
 
33
 
34
  if __name__ == '__main__':
35
  folders_string = os.getenv("FOLDERS_MAP")
36
+ try:
37
+ folders_dict = json.loads(folders_string)
38
+ for folder_env_ref, folder_env_path in folders_dict.items():
39
+ print(f"folder_env_ref:{folder_env_ref}, folder_env_path:{folder_env_path}.")
40
+ logging.info(f"folder_env_ref:{folder_env_ref}, folder_env_path:{folder_env_path}.")
41
+ create_folder_if_not_exists(folder_env_path)
42
+ print("========")
43
+ assert os.getenv(folder_env_ref) == folder_env_path
44
+ except json.JSONDecodeError as jde:
45
+ print(f"jde:{jde}.")
46
+ logging.error(f"jde:{jde}.")
47
+ print("double check your variables, e.g. for mispelling like 'FOLDER_MAP'...")
48
+ logging.info("double check your variables, e.g. for mispelling like 'FOLDER_MAP' instead than 'FOLDERS_MAP'...")
49
+ for k_env, v_env in dict(os.environ).items():
50
+ print(f"k_env:{k_env}, v_env:{v_env}.")
51
+ logging.info(f"k_env:{k_env}, v_env:{v_env}.")