build_test_env.sh 933 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # 构建 PowerJob 测试环境
  3. echo "================== 关闭全部服务 =================="
  4. docker-compose down
  5. echo "================== 构建 jar =================="
  6. cd `dirname $0`/../.. || exit
  7. # mvn clean package -Pdev -DskipTests -U -e -pl powerjob-server,powerjob-worker-agent -am
  8. # -U:强制检查snapshot库 -pl:指定需要构建的模块,多模块逗号分割 -am:同时构建依赖模块,一般与pl连用 -Pxxx:指定使用的配置文件
  9. mvn clean package -Pdev -DskipTests
  10. echo "================== 拷贝 jar =================="
  11. /bin/cp -rf powerjob-server/powerjob-server-starter/target/*.jar powerjob-server/docker/powerjob-server.jar
  12. /bin/cp -rf powerjob-worker-agent/target/*.jar powerjob-worker-agent/powerjob-agent.jar
  13. ls -l powerjob-server/docker/powerjob-server.jar
  14. ls -l powerjob-worker-agent/powerjob-agent.jar
  15. cd others/dev
  16. docker-compose build
  17. docker-compose --compatibility up