Exemplo n.º 1
0
 def __generate_halyard_docs(self):
     """Builds Halyard's CLI, which writes the new documentation locally to halyard/docs/commands.md"""
     check_run_quick(
         "git -C halyard rev-parse HEAD | xargs git -C halyard checkout ;"
     )
     cmds = ["make"]
     run_shell_and_log(cmds, "halyard-generate-docs.log", cwd="halyard/halyard-cli")
Exemplo n.º 2
0
    def __build_halyard(self):
        """Builds a Halyard debian with distribution as 'trusty-stable'.
    """
        jarRepo = self.__options.jar_repo
        parts = self.__options.bintray_repo.split('/')
        if len(parts) != 2:
            raise ValueError(
                'Expected --bintray_repo to be in the form <owner>/<repo>')
        org, packageRepo = parts[0], parts[1]
        bintray_key = os.environ['BINTRAY_KEY']
        bintray_user = os.environ['BINTRAY_USER']
        extra_args = [
            '--debug', '-Prelease.useLastTag=true',
            '-PbintrayPackageBuildNumber={number}'.format(
                number=self.__build_number),
            '-PbintrayOrg="{org}"'.format(org=org),
            '-PbintrayPackageRepo="{repo}"'.format(repo=packageRepo),
            '-PbintrayJarRepo="{jarRepo}"'.format(jarRepo=jarRepo),
            '-PbintrayKey="{key}"'.format(key=bintray_key),
            '-PbintrayUser="******"'.format(user=bintray_user),
            '-PbintrayPackageDebDistribution=trusty-stable'
        ]

        cmds = [
            './gradlew {extra} candidate'.format(extra=' '.join(extra_args))
        ]
        run_shell_and_log(cmds, 'halyard-debian-build.log', cwd='halyard')
Exemplo n.º 3
0
 def __do_build(self, artifact):
   cmds = [
     './build_google_component_image.sh --artifact {artifact} --account {account} '
     '--build_project {build_project} --install_script {install_script} '
     '--publish_project {publish_project} --publish_script {publish_script} '
     '--version {version} --zone {zone}'.format(
       artifact=artifact,
       account=self.__account,
       build_project=self.__build_project,
       install_script=self.__install_script,
       publish_project=self.__publish_project,
       publish_script=self.__publish_script,
       version=self.__version,
       zone=self.__zone
     )
   ]
   try:
     logfile = '{artifact}-vm-build.log'.format(artifact=artifact)
     run_shell_and_log(cmds, logfile, cwd=os.path.abspath(os.path.dirname(__file__)))
   except Exception as ex:
     self.__build_failures.append(BuildFailure(artifact, ex))