Commit a3d5b85c authored by Agata Malgorzata Chadaj's avatar Agata Malgorzata Chadaj
Browse files


parent 46ed8fe4
Pipeline #3168179 canceled with stage
......@@ -21,9 +21,7 @@ pipeline {
stage('Send analysis results') {
steps {
sh 'python'
sh "./CI/ ${params.notebook} ${params.circuit_name} ${params.discharge_level} \"${params.start_time}\" \"${params.end_time}\" ${params.API_BRANCH} ${params.NB_BRANCH}"
"""This script is a workaround as we didn't manage to install papermill as script in the Jenkins pipeline"""
import papermill as pm
from pathlib import Path
import argparse
from nbformat.v4 import nbformat
from lhcsmnb import outputs, parameters
from outputs import CellOutputType
def _get_arg_parser():
"""Specifies script arguments. Returns parser.
......@@ -15,6 +19,17 @@ def _get_arg_parser():
return parser
def get_result():
result_path = Path("./output/result.ipynb")
result_nb =, as_version=4)
nb = outputs.NotebookOutput(result_nb)
result = nb.get_cell_by_tag('result')[0].get_cell_output(CellOutputType.STDOUT)[0]
except IndexError:
result = 'FAILED'
if __name__ == '__main__':
args = _get_arg_parser().parse_args()
parameters = {'circuit_name': args.circuit_name,
......@@ -22,4 +37,5 @@ if __name__ == '__main__':
'start_time': args.start_time,
'end_time': args.end_time
export API_BRANCH="$6"
export NB_BRANCH="$7"
source ./CI/
python3 ./CI/ "$1" "$2" "$3" "$4" "$5"
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