Is it possible to upload external test results for a package?

Salutations, another quick question about tox testing results: Given I have `results.json` file from a tox run, can I upload that to a devpi index without running the tests again? Background is that we build our packages in our CI system, test them without uploading them to an index, then if the tests succeed, we only upload the wheels to our devpi index. The way I have read the devpi documentation, displaying test results on the index always requires to upload a source distribution to that index (or optionally a "testing" index), then run the `devpi test` for that source distribution on that index, then (in case of the "testing" index) push the tested package to a production index if tests were successful and delete the package from the testing index. The two quarrels I have with that is, that it requires a source distribution on an inde and that faulty packages are on an index and need to be deleted or passing packages need to be pushed. So can I skip the testing part of `devpi test` and just upload the result from somewhere else along with the tested wheel? Regards, Christoph

On 19 Sep 2019, at 13:59, con-f-use@gmx.net wrote:
There is no direct support for it, but it should be relatively straight forward using curl or a similar tool to post the result. The trickiest bit is likely getting the correct URL for the package. You can get it either from the "devpi upload" output, or calculate it manually using sha256 from the package content and chopping up the digest. Regards, Florian Schulze

Okay thanks. That means I'll have to allow that kind of access to our devpi server, think a bit about "user management" and look how exactly devpi generates the url, but I can live with that. An example curl command would be appreciated, of course, but it sounds reasonably straight forward. If that functionality somehow found its way into the devpi-client via a stray pull request, would you object to that?

On 19 Sep 2019, at 15:28, con-f-use@gmx.net wrote:
You can create a plugin for devpi-client which adds a new command. You can take a look at https://github.com/fschulze/devpi-pr on how to do that. Once it's working out properly and is useful for others, I wouldn't mind adding it to devpi-client directly. Regards, Florian Schulze

On 19 Sep 2019, at 13:59, con-f-use@gmx.net wrote:
There is no direct support for it, but it should be relatively straight forward using curl or a similar tool to post the result. The trickiest bit is likely getting the correct URL for the package. You can get it either from the "devpi upload" output, or calculate it manually using sha256 from the package content and chopping up the digest. Regards, Florian Schulze

Okay thanks. That means I'll have to allow that kind of access to our devpi server, think a bit about "user management" and look how exactly devpi generates the url, but I can live with that. An example curl command would be appreciated, of course, but it sounds reasonably straight forward. If that functionality somehow found its way into the devpi-client via a stray pull request, would you object to that?

On 19 Sep 2019, at 15:28, con-f-use@gmx.net wrote:
You can create a plugin for devpi-client which adds a new command. You can take a look at https://github.com/fschulze/devpi-pr on how to do that. Once it's working out properly and is useful for others, I wouldn't mind adding it to devpi-client directly. Regards, Florian Schulze
participants (2)
-
con-f-use@gmx.net
-
Florian Schulze