I'm trying to support multi-branch builds in my CI process.
For this goal, I need to create per-branch repositories in Artifactory, in order to store the build artifacts and yet avoid mixing artifacts and to keep things clean and maintainable.
I've looked into the artifactory rest api, and found that there's an application.wadl file which lists rest endpoints. The WADL file is available at the following URL: http://server:port/artifactory/api/application.wadl this file contains admin/repositories section:
<resource path="admin/repositories">
<method id="createRepository" name="POST">
<request>
<representation mediaType="application/json"/>
</request>
<response>
<representation mediaType="application/json"/>
</response>
</method>
trying to work with this api always results in error 500 for me, possibly because i don't know the proper json format.
i tried to use the json format from the non-admin api:
Create or Replace Repository Configuration
Description: Creates a new repository in Artifactory with the provided configuration or replaces the configuration of an existing repository. Supported by local, remote and virtual repositories.
A position may be specified using the pos parameter. If the map size is shorter than pos the repository is the last one (the default behavior).
Since: 2.3.0
Notes: Requires Artifactory Pro
An existing repository with the same key are removed from the configuration and its content is removed!
Missing values are set to the default values as defined by the consumed type spec.
Security: Requires an admin user
Usage: PUT /api/repositories/{repoKey}[?pos=position]
Consumes: application/vnd.org.jfrog.artifactory.repositories.LocalRepositoryConfiguration+json, application/vnd.org.jfrog.artifactory.repositories.RemoteRepositoryConfiguration+json,
application/vnd.org.jfrog.artifactory.repositories.VirtualRepositoryConfiguration+json
Sample Usage:
PUT /api/repositories/libs-release-local?pos=2
{
repository-config.json
}
https://www.jfrog.com/confluence/display/RTF/Repository+Configuration+JSON
to no avail, format probably doesn't match as well.
finally, the non-admin api only appears to exist in artifactory-pro, which i don't have, and if i did have would be more difficult to test anyway.
any thoughts?
