zoukankan      html  css  js  c++  java
  • jenkins自动部署测试环境

    构建脚本如下:

    echo "当前目录":$(pwd)
    echo "当前时间":$(date +%Y-%m-%d_%H:%M)
    find ./ -type f -name 'application.yml' | xargs perl -pi -e 's|active: sit|active: uat|g'


    mkdir BOOT-INF
    mkdir BOOT-INF/classes

    cp -rf mall_seller_parent/mall_seller_web/src/main/resources/application.yml BOOT-INF/classes/
    jar -uf mall_seller_parent/mall_seller_web/target/mall_seller.jar BOOT-INF/classes/application.yml
    mall_seller=svn://192.168.1.252/doc/版本发布/商城/mall_seller/$(date +%Y-%m-%d)/$(date +%H-%M)/mall_seller.jar
    svn import /data/javaapp/test.txt svn://192.168.1.252/doc/版本发布/商城/mall_seller/$(date +%Y-%m-%d)/test$(date +%H-%M-%S).txt -m 用于创建目录
    svn delete svn://192.168.1.252/doc/版本发布/商城/mall_seller/$(date +%Y-%m-%d) -m "删除今日备份"
    svn import mall_seller_parent/mall_seller_web/target/mall_seller.jar $mall_seller -m 发布新版本测试包

    cp -rf mall_operation_parent/mall_operation_web/src/main/resources/application.yml BOOT-INF/classes/
    jar -uf mall_operation_parent/mall_operation_web/target/mall_operation.jar BOOT-INF/classes/application.yml
    mall_operation=svn://192.168.1.252/doc/版本发布/商城/mall_operation/$(date +%Y-%m-%d)/$(date +%H-%M)/mall_operation.jar
    svn import /data/javaapp/test.txt svn://192.168.1.252/doc/版本发布/商城/mall_operation/$(date +%Y-%m-%d)/test$(date +%H-%M-%S).txt -m 用于创建目录
    svn delete svn://192.168.1.252/doc/版本发布/商城/mall_operation/$(date +%Y-%m-%d) -m "删除今日备份"
    svn import mall_operation_parent/mall_operation_web/target/mall_operation.jar $mall_operation -m 发布新版本测试包

    cp -rf mall_supplier_parent/mall_supplier_web/src/main/resources/application.yml BOOT-INF/classes/
    jar -uf mall_supplier_parent/mall_supplier_web/target/mall_supplier.jar BOOT-INF/classes/application.yml
    mall_supplier=svn://192.168.1.252/doc/版本发布/商城/mall_supplier/$(date +%Y-%m-%d)/$(date +%H-%M)/mall_supplier.jar
    svn import /data/javaapp/test.txt svn://192.168.1.252/doc/版本发布/商城/mall_supplier/$(date +%Y-%m-%d)/test$(date +%H-%M-%S).txt -m 用于创建目录
    svn delete svn://192.168.1.252/doc/版本发布/商城/mall_supplier/$(date +%Y-%m-%d) -m "删除今日备份"
    svn import mall_supplier_parent/mall_supplier_web/target/mall_supplier.jar $mall_supplier -m 发布新版本测试包

    cp -rf mall_shoppingmall_parent/mall_shoppingmall_web/src/main/resources/application.yml BOOT-INF/classes/
    jar -uf mall_shoppingmall_parent/mall_shoppingmall_web/target/mall_shoppingmall.jar BOOT-INF/classes/application.yml
    mall_shoppingmall=svn://192.168.1.252/doc/版本发布/商城/H5mall_shoppingmall/$(date +%Y-%m-%d)/$(date +%H-%M)/mall_shoppingmall.jar
    svn import /data/javaapp/test.txt svn://192.168.1.252/doc/版本发布/商城/H5mall_shoppingmall/$(date +%Y-%m-%d)/test$(date +%H-%M-%S).txt -m 用于创建目录
    svn delete svn://192.168.1.252/doc/版本发布/商城/H5mall_shoppingmall/$(date +%Y-%m-%d) -m "删除今日备份"
    svn import mall_shoppingmall_parent/mall_shoppingmall_web/target/mall_shoppingmall.jar $mall_shoppingmall -m 发布新版本测试包


    echo -e "svn上传路径为:::↓↓↓↓↓↓↓↓↓↓↓↓ $mall_seller $mall_operation $mall_supplier $mall_shoppingmall"

  • 相关阅读:
    GDB调试汇编堆栈过程分析
    20145335郝昊 《信息安全系统设计基础》第11周学习总结
    20145335郝昊 《信息安全系统设计基础》第10周学习总结
    信息安全系统设计基础》实验五实验报告
    《信息安全系统设计基础》实验四实验报告
    《信息安全系统设计基础》实验二实验报告
    20145335郝昊 《信息安全系统设计基础》第9周学习总结
    20145335《信息安全系统设计基础》实验一实验报告
    20145335郝昊 《信息安全系统设计基础》期中总结
    20145334 《信息安全系统设计基础》第十二周学习总结
  • 原文地址:https://www.cnblogs.com/wulm/p/9854913.html
Copyright © 2011-2022 走看看