Плагин артефакта Jenkins server.upload (uploadSpec) ничего не делает, выходные данные не отображаются - PullRequest
0 голосов
/ 11 сентября 2018

Я не публикую информацию о сборке, так как есть проблемы с объектом. Если я пытаюсь добавить buildInfo, я получаю дальнейшие ошибки, предполагаю, что объект сборки или что-то не так: https://www.jfrog.com/confluence/display/RTF/Working+With+Pipeline+Jobs+in+Jenkins#WorkingWithPipelineJobsinJenkins-PublishingBuild-InfotoArtifactory.

//Define artifactory server
//Definition by node-id does not seem to be working? 403, Jenkins system config is fine
def artifactory_server = Artifactory.server('artifactory-node1')
def RPM_ROOT = env.WORKSPACE + "/rpm-repo/simba-hive-jdbc/RPMS"

// Define upload spec for RPM uploads
// Does not currently notify you if 0 artifacts were found (BUG?)"
// "props": "type=rpm"
echo "Defining upload spec"
def uploadSpec = """{
  "files": [
    {
      "pattern": "${RPM_ROOT}",
      "target": "rhel-7/",
      "recursive": "true"
    }
 ]
}"""

Загрузить:

    stage('Upload RPM to Artifactory') {
        echo "Verifying existance of file"
        env.RPMPKG = sh(returnStdout: true, script: "find ${RPM_ROOT} -name simba-hive-jdbc*.rpm").trim()
        if(fileExists(env.RPMPKG)) {
            echo "Verified RPM: " + env.RPMPKG
        } else {
            error("RPM File not found! Aborting")
        }
        echo "Uploading RPM package to Artifactory"
        // Set upload
        def buildinfo = artifactory_server.upload(uploadSpec)

`` `

Дженкинс:

+ find /opt/jenkins/workspace/operations-testing/simba-hive-jdbc/rpm-repo/simba-hive-jdbc/RPMS -name 'simba-hive-jdbc*.rpm'
[Pipeline] fileExists
[Pipeline] echo
Verified RPM: /opt/jenkins/workspace/operations-testing/simba-hive-jdbc/rpm-repo/simba-hive-jdbc/RPMS/x86_64/simba-hive-jdbc-4.1-1.el7.x86_64.rpm
[Pipeline] echo
Uploading RPM package to Artifactory
[Pipeline] newBuildInfo
[Pipeline] artifactoryUpload
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Cleanup)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...