Revision 88e6558b ci/snf-ci

b/ci/snf-ci
8 8

  
9 9
CREATE_SERVER_CMD = "create"
10 10
BUILD_SYNNEFO_CMD = "build"
11
BUILD_DOCS_SYNNEFO_CMD = "docs"
11 12
DEPLOY_SYNNEFO_CMD = "deploy"
12 13
TEST_SYNNEFO_CMD = "test"
13 14
RUN_BURNIN_CMD = "burnin"
......
16 17
AVAILABLE_COMMANDS = [
17 18
    CREATE_SERVER_CMD,
18 19
    BUILD_SYNNEFO_CMD,
20
    BUILD_DOCS_SYNNEFO_CMD,
19 21
    DEPLOY_SYNNEFO_CMD,
20 22
    TEST_SYNNEFO_CMD,
21 23
    RUN_BURNIN_CMD,
......
28 30
command:
29 31
    * %s: Create the slave server
30 32
    * %s: Create debian packages for Synnefo in the created server
33
    * %s: Create documentation for Synnefo in the created server
31 34
    * %s: Deploy Synnefo in created server
32 35
    * %s: Run Synnefo unittests
33 36
    * %s: Run snf-burnin in the deployed Synnefo
......
35 38
    * %s: Run all the available commands
36 39
""" % tuple([CREATE_SERVER_CMD,
37 40
             BUILD_SYNNEFO_CMD,
41
             BUILD_DOCS_SYNNEFO_CMD,
38 42
             DEPLOY_SYNNEFO_CMD,
39 43
             TEST_SYNNEFO_CMD,
40 44
             RUN_BURNIN_CMD,
......
56 60
                      help="Download the debian packages that were created"
57 61
                           " during the '%s' step in this directory" %
58 62
                           BUILD_SYNNEFO_CMD)
63
    parser.add_option("--fetch-docs", dest="fetch_docs",
64
                      default=None,
65
                      help="Download the documentation that was created"
66
                           " during the '%s' step in this directory" %
67
                           BUILD_DOCS_SYNNEFO_CMD)
59 68
    parser.add_option("--schema", dest="schema", default=None,
60 69
                      help="Schema for snf-deploy.")
61 70

  
......
92 101
        synnefo_ci.clone_repo()
93 102
    if getattr(options, BUILD_SYNNEFO_CMD, False):
94 103
        synnefo_ci.build_synnefo()
95
    if options.fetch_packages:
96
        dest = os.path.abspath(options.fetch_packages)
97
        synnefo_ci.fetch_packages(dest=dest)
104
        if options.fetch_packages:
105
            dest = os.path.abspath(options.fetch_packages)
106
            synnefo_ci.fetch_packages(dest=dest)
107
    if getattr(options, BUILD_DOCS_SYNNEFO_CMD, False):
108
        synnefo_ci.build_documentation()
109
        if options.fetch_docs:
110
            dest = os.path.abspath(options.fetch_docs)
111
            synnefo_ci.fetch_documentation(dest=dest)
98 112
    if getattr(options, DEPLOY_SYNNEFO_CMD, False):
99 113
        synnefo_ci.deploy_synnefo(schema=options.schema)
100 114
    if getattr(options, TEST_SYNNEFO_CMD, False):

Also available in: Unified diff