Skip to content

ArtifactoryBuildManager: get_build_runs() and get_build_info() methods do not take the project name into account. #452

@proactive-boy

Description

@proactive-boy

These two methods do not add the project name in the built URL so the requests fail to get information when builds are related to a specific project.

As a workaround, I added some code in the _get_info method:

    def _get_info(self, build_name, build_number=""):
        # If a build name contains slash "/" it must be encoded,
        # otherwise the part after the slash will be treated as a build number
        # maven-demo/1-build-snapshot => maven-demo%2F1-build-snapshot
        url = requests.utils.quote(build_name, safe="")
        if build_number:
            url += f"/{build_number}"
        if self.project:
            url += f'?project={self.project}'
        return self._get_build_api_response(url)

Artifactory server version: Enterprise Plus 7.63.12 rev 76312900
OS: Windows 10 Enterprise

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugHelp WantedWe will be glad if somebody proposes a solution via PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions