Skip to content
Snippets Groups Projects
Commit 5cb383e6 authored by Felix Gerking's avatar Felix Gerking
Browse files

alphaplan_fwr:manifest-CI: Cleanup

Remove alphaplan_fwr debug code and run black and pylint.
parent adddfca2
No related branches found
No related tags found
1 merge request!120package_release:manifest-CI: split alphaplan FWR generation and package_release
Pipeline #9137 passed with warnings with stages
in 4 minutes and 33 seconds
......@@ -10,8 +10,6 @@ from alphaplan_keys import ApKeys, ApSubKeys, get_ap_dict
def ap_send_json(jsonobj):
print("##### Currently in debug mode: No data is send to AlphaPlan webservice")
return
"""Sends the generated files to the Alphaplan webservice"""
url = os.environ.get("AP_WEBSERVICE_URL")
usr = os.environ.get("AP_WEBSERVICE_USR")
......@@ -289,9 +287,7 @@ def main():
args, _ = parser.parse_known_args()
if args.outputdir_upload is None or args.outputdir_local is None:
sys.exit(
"ERROR: outputdir-local and outputdir-upload needs to be specified."
)
sys.exit("ERROR: outputdir-local and outputdir-upload needs to be specified.")
# Get bitbake variables from testdata.json file
testdata_files = []
......@@ -323,12 +319,12 @@ def main():
# Get md5sums.txt
md5sums_file = os.path.join(output_dir, machine, "md5sums.txt")
md5sums = {}
with open(md5sums_file) as f:
with open(md5sums_file, encoding="utf-8") as f:
for line in f:
# Assuming line format: "<md5sum> <filename>\n"
name = line.split(" ")[1].rstrip()
sum = line.split(" ")[0]
md5sums[name] = sum
md5sum = line.split(" ")[0]
md5sums[name] = md5sum
# Generate alphaplan FWR articles
generate_fwr_articles(
......
......@@ -153,9 +153,7 @@ variables:
# Generate AlphaPlan FWR articles if release tag is set
apscript=".gitlab-ci/alphaplan_fwr.py"
#if [ -n "$CI_COMMIT_TAG" ] && \
echo "CI AP debug mode"
if true && \
if [ -n "$CI_COMMIT_TAG" ] && \
[ -d "${ARTIFACTS_IMAGE_PATH}" ] && \
[[ "${CI_PARAM_PACKAGE_FTP}" == "false" ]];then
# Check if alphaplan fwr script is available
......
......@@ -173,7 +173,9 @@ def main():
convertmd2html(f, fout)
html_files.append(fout)
doc_md5sums = copy_files(doc_files + html_files, "", "", output_dir, outlocal_dir)
doc_md5sums = copy_files(
doc_files + html_files, "", "", output_dir, outlocal_dir
)
write_md5sums_file(doc_md5sums, "", output_dir, outlocal_dir)
if args.images_dir is not None:
......@@ -224,8 +226,12 @@ def main():
# Handle SDK if available
if args.sdk_dir is not None:
sdkfiles = glob.glob(os.path.join(args.sdk_dir, sdkname + "*"))
sdk_md5sums = copy_files(sdkfiles, "", os.path.join(machine, "sdk"), None, outlocal_dir)
write_md5sums_file(sdk_md5sums, os.path.join(machine, "sdk"), None, outlocal_dir)
sdk_md5sums = copy_files(
sdkfiles, "", os.path.join(machine, "sdk"), None, outlocal_dir
)
write_md5sums_file(
sdk_md5sums, os.path.join(machine, "sdk"), None, outlocal_dir
)
# Store pathes and other stuff in environment variable file
with open("package.env", "w", encoding="utf-8") as env_file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment