Promote Builds in Artifactory - Declarative Pipeline Syntax

JFrog Integrations Documentation

Content Type
Integrations
ft:sourceType
Paligo

To promote a build between repositories in Artifactory, define the promotion parameters in the rtPromote closure For example:

rtPromote (
    // Mandatory parameter

    buildName: 'MK',
    buildNumber: '48',
    // Optional - Only if this build is associated with a project in Artifactory, set the project key as follows.
    project: 'my-project-key',
    // Artifactory server ID from Jenkins configuration, or from configuration in the pipeline script
    serverId: 'Artifactory-1',
    // Name of target repository in Artifactory 
    targetRepo: 'libs-release-local',

    // Optional parameters

    // Comment and Status to be displayed in the Build History tab in Artifactory
    comment: 'this is the promotion comment',
    status: 'Released',
    // Specifies the source repository for build artifacts. 
    sourceRepo: 'libs-snapshot-local',
    // Indicates whether to promote the build dependencies, in addition to the artifacts. False by default.
    includeDependencies: true,
    // Indicates whether to fail the promotion process in case of failing to move or copy one of the files. False by default
    failFast: true,
    // Indicates whether to copy the files. Move is the default.
    copy: true
)