Пример #1
0
from redhat import RPMPackager


if __name__ == '__main__':
    parser = OptionParser(description='Open vStorage packager')
    parser.add_option('-d', '--target', dest='target', default='unstable')
    parser.add_option('-r', '--revision', dest='revision', default=None)
    parser.add_option('-s', '--suffix', dest='suffix', default=None)
    options, args = parser.parse_args()

    target = options.target
    if target.startswith('release'):
        if not target.startswith('release,'):
            raise RuntimeError("In case a release target is specified, it should be of the format: 'release,<release branch>'")
        else:
            target = tuple(target.split(','))
    elif target.startswith('experimental,'):
        target = tuple(target.split(','))

    # 1. Collect sources
    source_metadata = SourceCollector.collect(target=target, revision=options.revision, suffix=options.suffix)

    if source_metadata is not None:
        # 2. Build & Upload packages
        #    - Debian
        DebianPackager.package(source_metadata)
        DebianPackager.upload(source_metadata)
        #    - RPM
        RPMPackager.package(source_metadata)
        RPMPackager.upload(source_metadata)
Пример #2
0
    parser.add_option('-s', '--suffix', dest='suffix', default=None)
    parser.add_option('--skip-sign', action='store_true', dest='skip_sign', default=False)
    parser.add_option('-k', dest='sign_key', default=None)
    parser.add_option('-S', '--source', action='store_true', dest='source_package', default=False)
    parser.add_option('--skip-upload', action='store_true', dest='skip_upload', default=False)
    options, args = parser.parse_args()

    target = options.target
    if target.startswith('release'):
        if not target.startswith('release,'):
            raise RuntimeError("In case a release target is specified, it should be of the format: 'release,<release branch>'")
        else:
            target = tuple(target.split(','))
    elif target.startswith('experimental,'):
        target = tuple(target.split(','))

    # 1. Collect sources
    source_metadata = SourceCollector.collect(target=target, revision=options.revision, suffix=options.suffix)

    if source_metadata is not None:
        # 2. Build & Upload packages
        #    - Debian
        DebianPackager.package(
            source_metadata,
            skip_sign=options.skip_sign,
            sign_key=options.sign_key,
            source_only=options.source_package
        )
        if not options.skip_upload:
            DebianPackager.upload(source_metadata)
Пример #3
0
from debian import DebianPackager

if __name__ == '__main__':
    parser = OptionParser(description='Open vStorage packager')
    parser.add_option('-d', '--target', dest='target', default='unstable')
    parser.add_option('-r', '--revision', dest='revision', default=None)
    parser.add_option('-s', '--suffix', dest='suffix', default=None)
    options, args = parser.parse_args()

    target = options.target
    if target.startswith('release'):
        if not target.startswith('release,'):
            raise RuntimeError(
                "In case a release target is specified, it should be of the format: 'release,<release branch>'"
            )
        else:
            target = tuple(target.split(','))
    if target.startswith('experimental,'):
        target = tuple(target.split(','))

    # 1. Collect sources
    source_metadata = SourceCollector.collect(target=target,
                                              revision=options.revision,
                                              suffix=options.suffix)

    if source_metadata is not None:
        # 2. Build & Upload packages
        #    - Debian
        DebianPackager.package(source_metadata)
        DebianPackager.upload(source_metadata)
Пример #4
0
from optparse import OptionParser
from sourcecollector import SourceCollector
from debian import DebianPackager
from redhat import RPMPackager


if __name__ == '__main__':
    parser = OptionParser(description='Open vStorage packager')
    parser.add_option('-p', '--product', dest='product')
    parser.add_option('-r', '--release', dest='release', default=None)
    parser.add_option('-e', '--revision', dest='revision', default=None)
    parser.add_option('-s', '--suffix', dest='suffix', default=None)
    parser.add_option('--no-rpm', dest='rpm', action='store_false', default=True)
    parser.add_option('--no-deb', dest='deb', action='store_false', default=True)
    options, args = parser.parse_args()

    # 1. Collect sources
    metadata = SourceCollector.collect(product=options.product,
                                       release=options.release,
                                       revision=options.revision,
                                       suffix=options.suffix)

    if metadata is not None:
        # 2. Build & Upload packages
        if options.deb is True:
            DebianPackager.package(metadata)
            DebianPackager.upload(metadata)
        if options.rpm is True:
            RPMPackager.package(metadata)
            RPMPackager.upload(metadata)
Пример #5
0
                      action='store_true',
                      dest='skip_upload',
                      default=False)
    options, args = parser.parse_args()

    target = options.target
    if target.startswith('release'):
        if not target.startswith('release,'):
            raise RuntimeError(
                "In case a release target is specified, it should be of the format: 'release,<release branch>'"
            )
        else:
            target = tuple(target.split(','))
    elif target.startswith('experimental,'):
        target = tuple(target.split(','))

    # 1. Collect sources
    source_metadata = SourceCollector.collect(target=target,
                                              revision=options.revision,
                                              suffix=options.suffix)

    if source_metadata is not None:
        # 2. Build & Upload packages
        #    - Debian
        DebianPackager.package(source_metadata,
                               skip_sign=options.skip_sign,
                               sign_key=options.sign_key,
                               source_only=options.source_package)
        if not options.skip_upload:
            DebianPackager.upload(source_metadata)