Add hepc integration
This commit is contained in:
committed by
=Michael Hohn
parent
8e35b1605c
commit
fe026416c5
@@ -3,6 +3,7 @@
|
||||
#+BEGIN_SRC sh
|
||||
# Collect DBs from filesystem
|
||||
cd ~/work-gh/mrva/mrvahepc && rm -fR db-collection.tmp/
|
||||
export MRVA_HEPC_ENDPOINT=http://hepc
|
||||
./bin/mc-hepc-init --db_collection_dir db-collection.tmp \
|
||||
--starting_path ~/work-gh/mrva/mrva-open-source-download \
|
||||
--max_dbs 17
|
||||
@@ -10,6 +11,7 @@
|
||||
# Serve collected DBs plus metadata
|
||||
cd ~/work-gh/mrva/mrvahepc
|
||||
. venv/bin/activate
|
||||
|
||||
./bin/mc-hepc-serve --codeql-db-dir db-collection.tmp
|
||||
|
||||
# Test server
|
||||
|
||||
@@ -54,7 +54,12 @@ def process_db_file(zip_path, db_collection_dir):
|
||||
owner = source_location_prefix.parent.name
|
||||
cid = generate_cid(cli_version, creation_time, primary_language, sha)
|
||||
new_db_fname = f"{owner}-{repo}-ctsj-{cid}.zip"
|
||||
result_url = f"http://hepc/db/{db_collection_dir}/{new_db_fname}"
|
||||
hepc_endpoint = os.getenv("MRVA_HEPC_ENDPOINT")
|
||||
if hepc_endpoint is None:
|
||||
log("WARN", "Environment variable 'MRVA_HEPC_ENDPOINT' is not set."
|
||||
"Using default 'http://hepc'.")
|
||||
hepc_endpoint = "http://hepc"
|
||||
result_url = f"{hepc_endpoint}/db/{db_collection_dir}/{new_db_fname}"
|
||||
|
||||
metadata = {
|
||||
"git_branch" : "HEAD",
|
||||
|
||||
8
mrvahepc.code-workspace
Normal file
8
mrvahepc.code-workspace
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
Reference in New Issue
Block a user