forked from Youssef-Choura/BookApp
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathJenkinsfile_downjcli
More file actions
31 lines (27 loc) · 997 Bytes
/
Jenkinsfile_downjcli
File metadata and controls
31 lines (27 loc) · 997 Bytes
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
27
28
29
30
31
pipeline {
agent any
tools {
jfrog 'jfrogcli' // only works if jfrogcli tool installed in Jenkins
}
stages {
stage('Configure JFrog') {
steps {
withCredentials([usernamePassword(credentialsId: 'e6d8c3b4-c1c4-4012-b0ce-aba6bf5b83ae',
usernameVariable: 'JF_USER',
passwordVariable: 'JF_PASS')]) {
bat '''
jf.exe config edit art --url=https://mohanrajdevops.jfrog.io/ --user=%JF_USER% --password=%JF_PASS% --interactive=false
'''
}
}
}
stage('Download WAR File') {
steps {
bat '''
if not exist downloads mkdir downloads
jf.exe rt dl "petclinic-maven_local/com/BookApp/BookApp/3.0/BookApp-3.0.war" "downloads/"
'''
}
}
}
}