diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-07-17 10:03:54 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-07-17 10:03:54 +0300 |
commit | 0e13497c9cd05e19666af54047c125cf1142b242 (patch) | |
tree | 8005250c7f4131a5784efb30477aace09f7b38fa | |
parent | 65f591183c2550566637c8a599caedda1944f0cf (diff) | |
download | obnam-benchmarks-0e13497c9cd05e19666af54047c125cf1142b242.tar.gz |
Add publish_html to spec files
-rwxr-xr-x | obbench | 8 | ||||
-rw-r--r-- | production.yaml | 2 | ||||
-rw-r--r-- | test.yaml | 1 |
3 files changed, 11 insertions, 0 deletions
@@ -190,6 +190,7 @@ class ObnamBenchmarker(cliapp.Application): self.write_benchmark_page(spec, obj) self.write_summary_page(spec, objs) self.copy_css_file(spec) + self.publish_html(spec) def read_results_files(self, spec): objs = [] @@ -355,6 +356,13 @@ class ObnamBenchmarker(cliapp.Application): filename = os.path.join(spec['html_dir'], 'benchmark.css') shutil.copy('benchmark.css', filename) + def publish_html(self, spec): + if 'publish_html' in spec: + self.logger.msg('Publishing HTML') + cliapp.runcmd( + ['sh', '-euc', spec['publish_html']], + cwd=spec['html_dir']) + class BenchmarkResult(object): diff --git a/production.yaml b/production.yaml index 38d6ee7..550e717 100644 --- a/production.yaml +++ b/production.yaml @@ -18,3 +18,5 @@ benchmarks: - obnam: restore reports_dir: /home/liw/benchmark/reports html_dir: /home/liw/benchmark/html +publish_html: | + rsync -ahHSs --delete-after "$HOME/benchmark/." obbench@pieni.net:benchmark/. @@ -17,4 +17,5 @@ benchmarks: - obnam: backup reports_dir: /home/liw/obnam/benchmarks/reports html_dir: /home/liw/obnam/benchmarks/html +publish_html: echo PUBLISHING HTML HERE state: /home/liw/obnam/benchmarks/state.yaml |