~andrewjbeach/juju-ci-tools/make-local-patcher

« back to all changes in this revision

Viewing changes to build_juju.py

  • Committer: Andrew Beach
  • Date: 2016-12-02 14:23:41 UTC
  • mfrom: (1777.1.1 build-juju-ubuntu)
  • Revision ID: andrew.beach@canonical.com-20161202142341-f5d5pp7snw5ki2rw
Merged in support for the ubuntu-agent product in build_juju.py.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    os.path.join(__file__, '..', '..', 'juju-release-tools'))
24
24
 
25
25
 
26
 
def get_script(juju_release_tools=None):
 
26
ARTIFACT_GLOBS = [
 
27
    'juju-setup-*.exe', 'juju-*-win2012-amd64.tgz', 'juju-*-osx.tar.gz',
 
28
    'juju-*-centos7-amd64.tgz', 'juju-*-centos7.tar.gz',
 
29
    'juju-*-ubuntu-*.tgz',
 
30
    ]
 
31
 
 
32
 
 
33
def get_crossbuild_script(juju_release_tools=None):
27
34
    """Return the full path to the crossbuild script.
28
35
 
29
36
    The juju-release-tools dir is assumed to be a sibling of the juju-ci-tools
50
57
        credentials, BUILD_REVISION, build, 'juju-core_*.tar.gz',
51
58
        workspace_dir, archive=False, dry_run=dry_run, verbose=verbose)
52
59
    tar_artifact = artifacts[0]
53
 
    crossbuild = get_script(juju_release_tools)
 
60
    crossbuild = get_crossbuild_script(juju_release_tools)
54
61
    command = [
55
62
        crossbuild, product, '-b', '~/crossbuild', tar_artifact.file_name]
56
63
    run_command(command, dry_run=dry_run, verbose=verbose)
57
 
    globs = [
58
 
        'juju-setup-*.exe', 'juju-*-win2012-amd64.tgz', 'juju-*-osx.tar.gz',
59
 
        'juju-*-centos7-amd64.tgz', 'juju-*-centos7.tar.gz']
60
 
    add_artifacts(workspace_dir, globs, dry_run=dry_run, verbose=verbose)
 
64
    add_artifacts(workspace_dir, ARTIFACT_GLOBS, dry_run=dry_run,
 
65
                  verbose=verbose)
61
66
 
62
67
 
63
68
def parse_args(args=None):
77
82
        help='The path to the juju-release-tools dir, default: %s' %
78
83
              DEFAULT_JUJU_RELEASE_TOOLS)
79
84
    parser.add_argument(
80
 
        'product', choices=['win-client', 'win-agent', 'osx-client', 'centos'],
 
85
        'product', choices=['win-client', 'win-agent', 'osx-client', 'centos',
 
86
                            'ubuntu-agent'],
81
87
        help='the kind of juju to make and package.')
82
88
    parser.add_argument(
83
89
        'workspace',  help='The path to the workspace to build in.')