forked from jfrog/build-info
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDistribute.Jenkinsfile
26 lines (22 loc) · 1.29 KB
/
Distribute.Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
node('java') {
cleanWs()
def server = Artifactory.server('oss.jfrog.org')
stage('Distribute') {
withCredentials([usernamePassword(credentialsId: 'oss-deployer', usernameVariable: 'ARTIFACTORY_USER', passwordVariable: 'ARTIFACTORY_PASS')]) {
server.username = ARTIFACTORY_USER
server.password = ARTIFACTORY_PASS
def distributionConfig = [
// Mandatory parameters
'buildName' : P_BUILD_NAME,
'buildNumber' : P_BUILD_NUMBER,
'targetRepo' : 'jfrog-packages',
// Optional parameters
'publish' : false, // Default: true. If true, artifacts are published when deployed to Bintray.
'overrideExistingFiles' : true, // Default: false. If true, Artifactory overwrites builds already existing in the target path in Bintray.
'async' : false, // Default: false. If true, the build will be distributed asynchronously. Errors and warnings may be viewed in the Artifactory log.
'dryRun' : false, // Default: false. If true, distribution is only simulated. No files are actually moved.
]
server.distribute distributionConfig
}
}
}