Skip to content

Commit

Permalink
Change buildAgent name and version for conan_build_info and add type …
Browse files Browse the repository at this point in the history
…conan (#8433)

* change name and version

* update tests

* add conan type

* update tests
  • Loading branch information
czoido committed Feb 3, 2021
1 parent c5abf1a commit 13c85f3
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 180 deletions.
8 changes: 6 additions & 2 deletions conans/build_info/build_info.py
Expand Up @@ -14,6 +14,7 @@
from conans.paths import ARTIFACTS_PROPERTIES_PUT_PREFIX
from conans.paths import get_conan_user_home
from conans.util.files import save
from conans import __version__


class Artifact(namedtuple('Artifact', ["sha1", "md5", "name", "id"])):
Expand Down Expand Up @@ -152,7 +153,10 @@ def _get_package_artifacts(self, ref, pid, prev, is_dependency):
return arts

def process_lockfile(self):
modules = defaultdict(lambda: {"id": None, "artifacts": set(), "dependencies": set()})
modules = defaultdict(lambda: {"type": "conan",
"id": None,
"artifacts": set(),
"dependencies": set()})

def _gather_transitive_recipes(nid, contents):
n = contents["graph_lock"]["nodes"][nid]
Expand Down Expand Up @@ -223,7 +227,7 @@ def create(self):
"number": properties[ARTIFACTS_PROPERTIES_PUT_PREFIX + "build.number"],
"type": "GENERIC",
"started": datetime.datetime.utcnow().isoformat().split(".")[0] + ".000Z",
"buildAgent": {"name": "Conan Client", "version": "1.X"},
"buildAgent": {"name": "conan", "version": "{}".format(__version__)},
"modules": list(modules.values())}

def dump_custom_types(obj):
Expand Down

0 comments on commit 13c85f3

Please sign in to comment.