美文网首页Jenkins社区
玩转Jenkins - 插件:FTP publisher plu

玩转Jenkins - 插件:FTP publisher plu

作者: 小发条 | 来源:发表于2017-03-23 15:43 被阅读108次

    title: 玩转Jenkins - 插件:FTP publisher plugin
    date: 2016-09-02
    tags:

    • Jenkins
    • 软件测试
    • 持续集成
      categories: 持续集成
      keywords: 持续集成,jenkins,ci,自动部署,android,自动化测试,FTP publisher plugin

    在Jenkins使用过程中,遇到这样一个场景:Java的代码打包完成后,除了部署环境以外,需要把包上传到Ftp上,这个需求可以通过FTP publisher plugin插件来实现

    依赖插件:FTP publisher plugin

    系统配置

    在系统配置中对Ftp服务器进行配置,具体参数参考如下:

    FTP repository hosts
    Profile Name: deploy_ftp
    hostname: 192.168.1.100
    Port: 21
    TimeOut: 60
    Root Repository Path: /
    User Name: qa
    Password: ******
    
    

    任务配置

    1. 进入Job的编辑页面, 增加构建后操作步骤中选中 Publish artifacts to ftp
    2. 内容设置参考下方
    ftp site: deploy_ftp
    files to upload:
      source:target/*.war
      destination:package  # 这个值是ftp,上传附件的所在文件夹
    use timestamps    不勾选  # 这个选项是使用时间戳,如果选中,则会新建一个时间戳文件夹,然后把附件放在文件夹中
    Flatten files    勾选
    Skip publishing  不勾选
    

    完成以上配置后基本就可以正常使用上传附件到ftp的功能了

    原文地址:http://fatiao.site/jenkins_cj4ftp.html

    相关文章

      网友评论

        本文标题:玩转Jenkins - 插件:FTP publisher plu

        本文链接:https://www.haomeiwen.com/subject/eizznttx.html