The New artifactory-build-info Repository and How to Configure Permissions to It
The defaultartifactory-build-info repositorywas introduced in Artifactory version 6.6. It replaced the old mechanism for storingbuild-infofiles as blobs in the Artifactory database. The artifactory-build-info repository stores all build info files uploaded to Artifactory by the different CI server plugins, including theArtifactory Jenkins PluginandJFrog CLI, or directly through theBuild Upload REST APIorArtifactory UI.Build information is available using the REST API and the Builds page in the Artifactory UI.
The artifactory-build-info repository introduced a new set ofuser/group permissionsthat define access to thebuild-infofiles. These are equivalent to managing permissions on repositories with include/exclude patterns onbuild-info JSON pathsin thebuild-inforepository. Permissions can be automated using theCreate or Replace Permission TargetREST API call, which now uses theV2 JSONformat, which contains a new section for build-info permissions.
For example, the followingcURLandbuild-info-permission.jsondefine a new permission target calledjava开发人员,for a build calledtest-maven:
cURL command:
curl -uadmin:password -XPUT "http://localhost:8081/artifactory/api/v2/security/permissions/java-developers" -H "Content-type: application/json" -T build-info-permission.json
build-info-permission.json:
{ "name": "java-developers", "repo": { "include-patterns": ["**"] (default), "exclude-patterns": [""] (default), "repositories": ["generic-local"], "actions": { "users" : { "test1": ["read","write","manage"], "test2" : ["write","annotate", "read"] }, "groups" : { "group1" : ["manage","read","annotate"], "readers" : ["read"] } } }, "build": { "include-patterns": ["test-maven/**"] (default), "exclude-patterns": [""] (default), "repositories": ["artifactory-build-info"] (default, can't be changed), "actions": { "users" : { "test1": ["read","manage"], "test2" : ["write"] }, "groups" : { "group1" : ["manage","read","write","annotate","delete"], "readers" : ["read"] } } } }
NOTE:When upgrading Artifactory to version 6.6 or above, a migration process will start to move all of yourbuild-infofiles from the database to the newartifactory-build-inforepository. You can control the migration process through the use of a fewsystem properties, which can be added to theartifactory.system.propertiesfile located in$ARTIFACTORY_HOME/etc.
