PythonScriptRunTime as part adding new step
pending feedback
R
Relaxed Mollusk
Right now Harness allows only shell script to run on runtime. is it possible to add python script also to run at runtime in similar way like shell script?
Please find attached screen shot
Log In
s
shivkumar.loka
marked this post as
pending feedback
s
shivkumar.loka
Hey Gaurav
If you're running your builds on Harness Cloud, the machiens are pre-installed with Python and you can use a run step for python scripts. Please see an example snippet below:
python3 -c "
import logging
logging.basicConfig(level=logging.INFO, format='%(name)s - %(levelname)s - %(message)s')
from pathlib import Path
print('=== Testing Actual BM25 Per-Repo Caching ===')
print()
# 1. Clean up any existing cache
from context_engine.search.bm25 import (
invalidate_all_caches,
get_bm25_index,
_get_indexed_repos,
_get_repo_cache_path,
CACHE_SUBDIR,
)
Thank you
Regards
Shivkumar Loka
Harness Product Team