diff options
author | Tibor Frank <tifrank@cisco.com> | 2018-11-26 16:01:13 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2018-11-27 09:22:15 +0000 |
commit | 35eb88d75056f833bd1d70a92ff1b6725034ff3c (patch) | |
tree | ad164d6beb4bb28c2d3d62bf4a8e5a2ca86a51d1 /resources/tools | |
parent | d168739651562106d374719b89738b1ac2273c80 (diff) |
Report: versioning
Change-Id: I890d52b4b5b87cd1b3952b3d4bb3cbbff069a9c7
Signed-off-by: Tibor Frank <tifrank@cisco.com>
(cherry picked from commit 1077b448dd6c9397cfa5a3c2773ea4b8863f3016)
Diffstat (limited to 'resources/tools')
-rw-r--r-- | resources/tools/presentation/conf.py | 6 | ||||
-rw-r--r-- | resources/tools/presentation/generator_report.py | 20 | ||||
-rw-r--r-- | resources/tools/presentation/pal.py | 8 | ||||
-rwxr-xr-x | resources/tools/presentation/run_report.sh | 2 | ||||
-rw-r--r-- | resources/tools/presentation/specification.yaml | 4 |
5 files changed, 19 insertions, 21 deletions
diff --git a/resources/tools/presentation/conf.py b/resources/tools/presentation/conf.py index 8ba22b57ef..5a60833d59 100644 --- a/resources/tools/presentation/conf.py +++ b/resources/tools/presentation/conf.py @@ -45,7 +45,7 @@ source_suffix = ['.rst', '.md'] master_doc = 'index' # General information about the project. -project = u'FD.io CSIT-18.10.w48' +project = u'FD.io CSIT-1810.48' copyright = u'2018, FD.io' author = u'FD.io CSIT' @@ -70,7 +70,7 @@ rst_epilog = """ .. |virl-image-ubuntu| replace:: {csit_ubuntu_ver} .. |virl-image-centos| replace:: {csit_centos_ver} -.. _pdf version of this report: https://docs.fd.io/csit/{release}/report/_static/archive/csit_{release}_{report_version}.pdf +.. _pdf version of this report: https://docs.fd.io/csit/{release}/report/_static/archive/csit_{release}.{report_week}.pdf .. _tag documentation rst file: https://git.fd.io/csit/tree/docs/tag_documentation.rst?h={release} .. _TRex intallation: https://git.fd.io/csit/tree/resources/tools/trex/trex_installer.sh?h={release} .. _TRex driver: https://git.fd.io/csit/tree/resources/tools/trex/trex_stateless_profile.py?h={release} @@ -105,7 +105,7 @@ rst_epilog = """ .. _CSIT Testbed Setup: https://git.fd.io/csit/tree/resources/tools/testbed-setup/README.md?h={release} .. _K8s configuration files: https://github.com/FDio/csit/tree/{release}/resources/templates/kubernetes """.format(release='rls1810', - report_version='w48', + report_week='48', prev_release='rls1807', srelease='1810', csitrelease='18.10', diff --git a/resources/tools/presentation/generator_report.py b/resources/tools/presentation/generator_report.py index a7b2d64af0..13ca75c1b9 100644 --- a/resources/tools/presentation/generator_report.py +++ b/resources/tools/presentation/generator_report.py @@ -105,15 +105,15 @@ PDF_BUILDER = 'sphinx-build -v -c . -a ' \ '{build_dir}' -def generate_report(release, spec, report_version): +def generate_report(release, spec, report_week): """Generate all formats and versions of the report. :param release: Release string of the product. :param spec: Specification read from the specification file. - :param report_version: Version of the report. + :param report_week: Calendar week when the report is published. :type release: str :type spec: Specification - :type report_version: str + :type report_week: str """ logging.info("Generating the report ...") @@ -124,7 +124,7 @@ def generate_report(release, spec, report_version): } for report_format, versions in spec.output["format"].items(): - report[report_format](release, spec, versions, report_version) + report[report_format](release, spec, versions, report_week) archive_input_data(spec) @@ -155,7 +155,6 @@ def generate_html_report(release, spec, versions, report_version): cmd = HTML_BUILDER.format( release=release, - report_version=report_version, date=datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC'), working_dir=working_dir, build_dir=spec.environment["paths"]["DIR[BUILD,HTML]"]) @@ -172,17 +171,17 @@ def generate_html_report(release, spec, versions, report_version): logging.info(" Done.") -def generate_pdf_report(release, spec, versions, report_version): +def generate_pdf_report(release, spec, versions, report_week): """Generate html format of the report. :param release: Release string of the product. :param spec: Specification read from the specification file. :param versions: List of versions to generate. Not implemented yet. - :param report_version: Version of the report. + :param report_week: Calendar week when the report is published. :type release: str :type spec: Specification :type versions: list - :type report_version: str + :type report_week: str """ logging.info(" Generating the pdf report, give me a few minutes, please " @@ -210,7 +209,6 @@ def generate_pdf_report(release, spec, versions, report_version): build_dir = spec.environment["paths"]["DIR[BUILD,LATEX]"] cmd = PDF_BUILDER.format( release=release, - report_version=report_version, date=datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC'), working_dir=working_dir, build_dir=build_dir) @@ -226,12 +224,12 @@ def generate_pdf_report(release, spec, versions, report_version): 'pdflatex -interaction nonstopmode csit.tex || true'. format(build_dir=build_dir), 'cd {build_dir} && ' - 'cp csit.pdf ../{archive_dir}/csit_{release}_{report_version}.pdf &&' + 'cp csit.pdf ../{archive_dir}/csit_{release}.{week}.pdf &&' 'cp csit.pdf ../{archive_dir}/csit_{release}.pdf'. format(build_dir=build_dir, archive_dir=archive_dir, release=release, - report_version=report_version) + week=report_week) ] for cmd in cmds: diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py index 72493cb0d3..5e419210aa 100644 --- a/resources/tools/presentation/pal.py +++ b/resources/tools/presentation/pal.py @@ -49,10 +49,10 @@ def parse_args(): default="master", type=str, help="Release string of the product.") - parser.add_argument("-v", "--version", - default="0.1", + parser.add_argument("-w", "--week", + default="1", type=str, - help="Version of the product.") + help="Calendar week when the report is published.") parser.add_argument("-l", "--logging", choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], @@ -108,7 +108,7 @@ def main(): generate_files(spec, data) if spec.output["output"] == "report": - generate_report(args.release, spec, args.version) + generate_report(args.release, spec, args.week) logging.info("Successfully finished.") elif spec.output["output"] == "CPTA": sys.stdout.write(generate_cpta(spec, data)) diff --git a/resources/tools/presentation/run_report.sh b/resources/tools/presentation/run_report.sh index 077d74b8d6..fbc06dacb3 100755 --- a/resources/tools/presentation/run_report.sh +++ b/resources/tools/presentation/run_report.sh @@ -38,7 +38,7 @@ export PYTHONPATH=`pwd` python pal.py \ --specification specification.yaml \ --release ${RELEASE} \ - --version "w48" \ + --week "48" \ --logging INFO \ --force diff --git a/resources/tools/presentation/specification.yaml b/resources/tools/presentation/specification.yaml index 96733d28ee..ea8cb5c777 100644 --- a/resources/tools/presentation/specification.yaml +++ b/resources/tools/presentation/specification.yaml @@ -75,8 +75,8 @@ urls: URL[JENKINS,CSIT]: "https://jenkins.fd.io/view/csit/job" URL[JENKINS,HC]: "https://jenkins.fd.io/view/hc2vpp/job" - # URL[VIRL,DNV]: "http://10.30.51.28/download/denverton/1810/robot-plugin.zip" - URL[VIRL,DNV]: "http://download.it/from/nexus" + URL[VIRL,DNV]: "http://10.30.51.28/download/denverton/1810/robot-plugin.zip" + # URL[VIRL,DNV]: "http://download.it/from/nexus" URL[NEXUS]: "https://docs.fd.io/csit" DIR[NEXUS]: "report/_static/archive" |