def _build_conan_package(self, image, version, dry_run, keep_source, keep_build, conan_login, build_missing):
    major_version = utils.get_major_version(version)
    version_info = self.index.version_info(major_version)
    base_cmd = self._get_conan_base_cmd(version_info)
    if conan_login:
        self._run_in_docker(base_cmd, ['conan', 'user', '-p', '-r', self.build_info.docker_org], dry_run)
    self._run_in_docker(base_cmd, ['conan', 'config', 'set', f'general.default_profile={version_info.conan_profile}'], dry_run)
    full_version = version_info.package_versions.get((('ASWF_' + image.upper()) + '_VERSION'))
    conan_version = f'{image}/{full_version}@{self.build_info.docker_org}/{version_info.conan_profile}'
    build_cmd = ['conan', 'create', os.path.join(constants.CONAN_USER_HOME, 'recipes', image), conan_version]
    if keep_source:
        build_cmd.append('--keep-source')
    if keep_build:
        build_cmd.append('--keep-build')
    if build_missing:
        build_cmd.append('--build=missing')
    self._run_in_docker(base_cmd, build_cmd, dry_run)
    alias_version = f'{image}/latest@{self.build_info.docker_org}/{version_info.conan_profile}'
    self._run_in_docker(base_cmd, ['conan', 'alias', alias_version, conan_version], dry_run)
    if self.push:
        self._run_in_docker(base_cmd, ['conan', 'upload', '--all', '-r', self.build_info.docker_org, conan_version], dry_run)
        self._run_in_docker(base_cmd, ['conan', 'upload', '--all', '-r', self.build_info.docker_org, alias_version], dry_run)
def _build_conan_package(self, image, version, dry_run, keep_source, keep_build, conan_login, build_missing):
    major_version = utils.get_major_version(version)
    version_info = self.index.version_info(major_version)
    base_cmd = self._get_conan_base_cmd(version_info)
    if conan_login:
        self._run_in_docker(base_cmd, ['conan', 'user', '-p', '-r', self.build_info.docker_org], dry_run)
    self._run_in_docker(base_cmd, ['conan', 'config', 'set', f'general.default_profile={version_info.conan_profile}'], dry_run)
    full_version = version_info.package_versions.get((('ASWF_' + image.upper()) + '_VERSION'))
    conan_version = f'{image}/{full_version}@{self.build_info.docker_org}/{version_info.conan_profile}'
    build_cmd = ['conan', 'create', os.path.join(constants.CONAN_USER_HOME, 'recipes', image), conan_version]
    if keep_source:
        build_cmd.append('--keep-source')
    if keep_build:
        build_cmd.append('--keep-build')
    if build_missing:
        build_cmd.append('--build=missing')
    self._run_in_docker(base_cmd, build_cmd, dry_run)
    alias_version = f'{image}/latest@{self.build_info.docker_org}/{version_info.conan_profile}'
    self._run_in_docker(base_cmd, ['conan', 'alias', alias_version, conan_version], dry_run)
    if self.push:
        self._run_in_docker(base_cmd, ['conan', 'upload', '--all', '-r', self.build_info.docker_org, conan_version], dry_run)
        self._run_in_docker(base_cmd, ['conan', 'upload', '--all', '-r', self.build_info.docker_org, alias_version], dry_run)