[RTFACT-16969] CLONE Distributing a docker build to Bintray fails with REST API Created: 18/Jun/18 Updated: 22/Jun/18 Resolved: 22/Jun/18
|Project:||Artifactory Binary Repository|
Distributing a docker build to Bintray fails with REST API (or using the jenkins DSL) has issues:
Steps to reproduce:
-create distribution repo, use default rules
-create a docker build
-try to use https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-DistributeBuild or https://www.jfrog.com/confluence/display/RTF/Working+With+Pipeline+Jobs+in+Jenkins#WorkingWithPipelineJobsinJenkins-DistributingBuildArtifacts for the build.
-see that the API errors out (see curl.txt and jenkins.txt). The curl request seems to distribute to Bintray with a partial success (you see the image in the bintray repo), however using the Jenkins API completely fails.
-Workaround: add docker.repoName and docker.manifest properties to all layers of the artifacts in the build
|Comment by Matthew Wang [ 22/Jun/18 ]|
Retrying on Artifactory 6.0 results in a different error. With below pipeline script:
def buildInfo = Artifactory.newBuildInfo()
def artifactoryServer = Artifactory.server "Artifactory1"
// but let's make sure we are definitely logged into artifactory's DTR using those same credentials through withCredentials
sh 'docker login docker-local.artifactory.test -u admin -p password'
def artServer = Artifactory.server "Artifactory1"
def dockerDistrib = distribStr +
def distributionConfig = [
ERROR: Distribution failed. View Artifactory logs for more details: HTTP/1.1 409 Conflict
Using REST API instead of docker pipeline dsl results in similar errors: