Commit 173a2f6c authored by Agata Malgorzata Chadaj's avatar Agata Malgorzata Chadaj
Browse files


parent 46e2a8ba
Pipeline #3174712 passed with stage
in 28 seconds
......@@ -5,7 +5,7 @@ pipeline {
dockerfile {
label 'agent2'
dir 'CI'
args '--network host -v /cvmfs:/cvmfs:shared -v /root/.ssh/mpesoft_key:/root/.ssh/mpesoft_key:ro --privileged'
args '--network host -v /cvmfs:/cvmfs:shared -v /root/.ssh/mpesoft_key:/root/.ssh/mpesoft_key:ro -v /eos:/eos:shared --privileged'
"""This script is a workaround as we didn't manage to install papermill as script in the Jenkins pipeline"""
import json
from pathlib import Path
import pandas as pd
import argparse
import nbformat
......@@ -23,18 +24,21 @@ def get_result():
result_nb =, as_version=4)
nb = outputs.NotebookOutput(result_nb)
result = nb.get_cells_by_tag('result')[0].get_cell_output(outputs.CellOutputType.STDOUT)[0]
full_result = nb.get_cells_by_tag('result')[1].get_cell_output(outputs.CellOutputType.STDOUT)[0]
result_flag = nb.get_cells_by_tag('result')[0].get_cell_output(outputs.CellOutputType.STDOUT)[0]
except IndexError:
result = 'FAILED'
return 'FAILED', ''
return result_flag, json.load(full_result)
def save_json_to_file(args, flag, comment):
file_path = '/eos/project/l/lhcsm/hwc_dev/lhc-sm-hwc/test.csv'
df = pd.DataFrame.from_dict(comment)
if __name__ == '__main__':
args = _get_arg_parser().parse_args()
parameters = {'circuit_name': args.circuit_name,
'discharge_level': int(args.discharge_level),
'start_time': args.start_time,
'end_time': args.end_time
flag, text = get_result()
save_json_to_file(args, flag, text)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment