Skip to content

Commit ce49644

Browse files
authored
Update Jenkins_jfrog
1 parent 36c9ad3 commit ce49644

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

Jenkins_jfrog

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,23 @@ pipeline{
1818
}
1919
}
2020
}*/
21-
stage('Push artifacts into artifactory') {
21+
stage('Push to Artifactory') {
2222
steps {
23-
rtUpload (
24-
serverId: 'jfrog',
25-
spec: '''{
26-
"files": [
27-
{
28-
"pattern": "*.war",
29-
"target": "example-repo-local/build-files/"
30-
}
31-
]
32-
}'''
33-
)
34-
}
23+
script {
24+
// Configure Artifactory
25+
sh '''
26+
curl -fL https://getcli.jfrog.io | sh
27+
./jfrog rt config --url=http://13.228.72.253:8081/ --user=divya_admin --password=divyaadmin
28+
'''
29+
30+
// Upload the artifact
31+
sh '''
32+
./jfrog rt u "target/*.war" "maven/java_jfrog/"
33+
'''
34+
}
35+
}
3536
}
3637

38+
3739
}
3840
}

0 commit comments

Comments
 (0)