Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
proactive-boy opened this issue Jul 23, 2024 · 0 comments
Labels
Bug Help Wanted We will be glad if somebody proposes a solution via PR

Comments

@proactive-boy
Copy link

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

@allburov allburov added Bug Help Wanted We will be glad if somebody proposes a solution via PR labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Help Wanted We will be glad if somebody proposes a solution via PR
Development

No branches or pull requests

2 participants