script:
- ./scripts/getfilepath.py --unstripped ${BUILD_NUM}
This part of gitlab-ci.yml file.
I want to save output of getfilepath.py in a variable and use it later.
I tried doing this:
script:
- VER_PATH=`./scripts/getfilepath.py --unstripped ${BUILD_NUM}`
But this saves the output of any print statements inside the file.
Is there a way to just get the result of the return value from the script?
Here is the content of getfilepath.py
def get_pdf():
html_file = os.path.join(dirname, 'html_doc.html')
pdf_file = os.path.join(dirname, 'pdf_doc.pdf')
fill_html(sys.argv[1])
convert_to_pdf(html_file, pdf_file)
cleanup()
return pdf_file