[RTFACT-7576] Push build to bintray with build.json should support creating new repository Created: 14/Jun/15  Updated: 21/Jun/15  Resolved: 18/Jun/15

Status: Resolved
Project: Artifactory Binary Repository
Component/s: Bintray Integration
Affects Version/s: None
Fix Version/s: 3.9.0

Type: Improvement Priority: Normal
Reporter: Roy Zanbel (Inactive) Assignee: Dan Feldman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Product Backlog: 3.9.0


Add optional repo block to the build.json enabling user to create new repository in the process of pushing the build.
Artifactory new API
-“repo”: {
-“updateExisited”: false, (default false)
+"name": "my-repo",
-“type”: “generic” (default generic),
-"private": false, (default false)
-"premium": false, (default false)
-"desc": "This repo...",
-"labels":["lable1", "label2"]
"package": {
"name": "auto-upload",
"repo": "test", // if exist and repo block doesn’t exist will attempt to push to existing repo
"subject": "myBintrayUser",
"desc": "I was pushed completely automatically",
"website_url": "www.jfrog.com",
"issue_tracker_url": "https://github.com/bintray/bintray-client-java/issues",
"vcs_url": "https://github.com/bintray/bintray-client-java.git",
"licenses": ["MIT"],
"labels": ["cool", "awesome", "gorilla"],
"public_download_numbers": false,
"public_stats": false,
"attributes": [

{"name": "att1", "values" : ["val1"], "type": "string"}


{"name": "att2", "values" : [1, 2.2, 4], "type": "number"}


{"name": "att5", "values" : ["2014-12-28T19:43:37+0100"], "type": "date"}

"version": {
"name": "0.5",
"desc": "This is a version",
"released": "2015-01-04",
"vcs_tag": "0.5",
"attributes": [

{"name": "VerAtt1", "values" : ["VerVal1"], "type": "string"}


{"name": "VerAtt2", "values" : [1, 3.3, 5], "type": "number"}


{"name": "VerAtt3", "values" : ["2015-01-01T19:43:37+0100"], "type": "date"}

"gpgSign": false
"applyToFiles": ["repo1/org/jfrog/*.*", "repo2/org/jfrog/test/module*/*.jar", "repo3/org/jfrog/test/**/*.*", "repo2/org/jfrog/test/**/art.?ar"],
"applyToRepoFiles": ["/org/jfrog/*.*, jfrog/test/**/*.*"],
"applyToProps": [

{"upload.prop1": ["val1", "val2"]}


{"upload.prop2": ["*"]}


{"*": ["valueRegardlessOfProperty"]}

"publish": true

Comment by Dan Feldman [ 16/Jun/15 ]

the bintray upload info json file can now optionally contain another clause:

  "repo": {
    "name": "newRepo",
    "type": "generic",
    "private": false,
    "premium": false,
    "desc": "Newly created repo",
    "labels": ["label1", "label2" ],
    "updateExisting": true

Artifactory will create a new repository based on this clause if it doesn't exist.
Artifactory will update an existing repository with the same name if the "updateExisting" flag is set to true.

The push operation will fail if there's a mismatch between the "name" field and the "repo" field under the package clause or if the repository already exists and the "updateExisting" flag is set to false

Generated at Tue Oct 15 13:53:42 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.