From 269efda7e86cfceae3d00f5026c0b3dbc10b7f88 Mon Sep 17 00:00:00 2001 From: Pranav Salunke Date: Mon, 2 Feb 2015 14:36:48 +0100 Subject: [PATCH] Updates training labs jobs Adds a script for building windows scripts and creating tar/zip files for the labs section. Change-Id: I8a1fd7a9600aa85f6ecd67802d272755bd0ba9e5 --- tools/generatelabs | 10 ++++++++++ tox.ini | 10 ++++------ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100755 tools/generatelabs diff --git a/tools/generatelabs b/tools/generatelabs new file mode 100755 index 00000000..eb69b723 --- /dev/null +++ b/tools/generatelabs @@ -0,0 +1,10 @@ +#!/bin/bash +# Used by tox.ini when checking build and publishing docs to website + +# Create tarball of labs scripts for Linux/OS X users +bash -c "tar czf publish-docs/trunk/training-guides/labs-scripts.tgz labs" + +# Generate Windows batch scripts +bash -c "labs/osbash.sh -w cluster" +# Create zip file of labs scripts for Windows users +bash -c "zip -r publish-docs/trunk/training-guides/labs-scripts.zip labs" diff --git a/tox.ini b/tox.ini index 81bf65f5..20f707d6 100644 --- a/tox.ini +++ b/tox.ini @@ -37,9 +37,8 @@ commands = openstack-doc-test --check-deletions {posargs} commands = mkdir -p publish-docs/trunk/training-guides openstack-doc-test --check-build {posargs} - bash -c "tar czf publish-docs/trunk/training-guides/labs-scripts.tgz labs" - bash -c "labs/osbash.sh -w cluster" - bash -c "zip -r publish-docs/trunk/training-guides/labs-scripts.zip labs" + # Build labs scripts + bash {toxinidir}/tools/generatelabs [testenv:publishdocs] # Prepare all documents (except www subdir) so that they can get @@ -51,9 +50,8 @@ commands = mkdir -p publish-docs/trunk/training-guides # We only publish changed manuals. openstack-doc-test --check-build --publish - bash -c "tar czf publish-docs/trunk/training-guides/labs-scripts.tgz labs" - bash -c "labs/osbash.sh -w cluster" - bash -c "zip -r publish-docs/trunk/training-guides/labs-scripts.zip labs" + # Build and publish training labs scripts + bash {toxinidir}/tools/generatelabs [testenv:checklang] # Generatedocbook needs xml2po which cannot be installed