jfrog artifactory jenkins pipeline 集成

1. 预备环境
artifactory ( 开源版本 )
maven  
jenkins 
jenkins artifactory plugin (在插件管理安装即可)
2. 配置artifactory 
 
a. maven local 仓库
 
 
b. jenkins 配置(添加 artifactory 账户信息)
 
 
3.  jenkins  pipeline 配置(实例使用github 实例)
 
   jenkinsfile 内容如下:
node("docker-64") {
    def server = Artifactory.newServer url: "http://xxxxxx:8081/artifactory", credentialsId: 'jfrog-artifactory'
    def rtMaven = Artifactory.newMavenBuild()
    def buildInfo

    stage ('Clone') {
        git url: 'https://github.com/jfrogdev/project-examples.git'
    }

    stage ('Artifactory configuration') {
        rtMaven.tool = '64maven' // Tool name from Jenkins configuration
        rtMaven.deployer releaseRepo: 'aliyun', snapshotRepo: 'aliyun', server: server
        buildInfo = Artifactory.newBuildInfo()
    }

    stage ('Exec Maven') {
        rtMaven.run pom: 'maven-example/pom.xml', goals: 'clean install', buildInfo: buildInfo
    }

    stage ('Publish build info') {
        server.publishBuildInfo buildInfo
    }
}
4. jenkins 构建效果
 
 
5. artifactory 效果
 
 
 
 
 
6. 总结
总的来说还是比较好用的,结合jenkins pipeline 可能方便的进行信息的查看,同时jfrog artifactory 的功能也是比较强大的,可以方便我们进行历史构建信息的查询
7. 参考资料
https://wiki.jenkins.io/display/JENKINS/Artifactory+Plugin
http://www.jfrogchina.com/open-source

posted on   荣锋亮  阅读(11588)  评论(3编辑  收藏  举报

编辑推荐:
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
阅读排行:
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· 上周热点回顾(2.17-2.23)
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)
· spring官宣接入deepseek,真的太香了~
历史上的今天:
2016-11-09 分布式id 实现方式
2013-11-09 警情处理软件设计的技术初步规划

导航

< 2025年2月 >
26 27 28 29 30 31 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 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示