Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-69729

rtDockerPush, error, Properties value cannot be empty

XMLWordPrintable

      When using the rtDockerPush step from a declarative pipeline, we get an error "Properties value cannot be empty."

      Jenkinsfile

      pipeline {
          agent any
          stages {
              stage('Pull') {
                  steps {
                      script {
                          sh "docker pull traefik/whoami:latest"
                      }
                  }
              }
              stage('Tag') {
                  steps {
                      script {
                          sh "docker tag traefik/whoami:latest sas-test-docker-local.repo.vito.be/traefik-whoami:latest"
                      }
                  }
              }
              stage('Push') {
                  steps {
                      rtDockerPush(
                              serverId: 'VitoArtifactory',
                              targetRepo: "sas-test-docker-local",
                              image: "sas-test-docker-local.repo.vito.be/traefik-whoami:latest",
                      )
                  }
              }
          }
      }
      

      We captured the actual request, and the properties url parameter is indeed malformed

      Wireshark capture

      PUT /artifactory/api/storage/sas-test-docker-local/traefik-whoami/latest/manifest.json?properties=;build.timestamp=1664367980996;build.name=Test+%3A%3A+rtDockerPushTest;build.number=27 HTTP/1.1
      Content-Length: 0
      Host: repo.vito.be
      Connection: Keep-Alive
      User-Agent: ArtifactoryBuildClient/2.36.4
      Accept-Encoding: gzip,deflate
      Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      X-Forwarded-For: XXXXXXXXXXXXXXXXXXXXXX
      X-Forwarded-Proto: https
      X-Forwarded-Port: 443
      
      
      HTTP/1.1 400 Bad Request
      Content-Type: application/json
      Date: Wed, 28 Sep 2022 12:26:23 GMT
      X-Artifactory-Id: XXXXXXXXXXXXXXXXXXXX
      X-Artifactory-Node-Id: XXXXXXXXXXXXXXXXXXX
      X-Jfrog-Version: Artifactory/7.31.13 73113900
      Transfer-Encoding: chunked
      
      
      {
        "errors" : [ {
          "status" : 400,
          "message" : "Properties value cannot be empty."
        } ]
      }

            eyalbe Eyal Ben Moshe
            kndx Koen Dierckx
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: