build.gradle 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. group 'cn.tonyandmoney.tuon'
  2. version '0.0.1'
  3. dependencies {
  4. compile project(':tuon-core')
  5. compile project(':tuon-qywx')
  6. }
  7. task dockerBuilder(type: Docker) {
  8. registry='docker.tonyandmoney.cn'
  9. applicationName = 'tuonq-config'
  10. tagVersion = jar.getArchiveVersion()
  11. addFile("./${jar.getArchiveBaseName()}-${jar.getArchiveVersion()}.jar","app.jar")
  12. entryPoint(["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-Djava.security.egd=file:/dev/./urandom","-Duser.timezone=GMT+08","-jar",'app.jar'])
  13. exposePort(11000)
  14. doFirst {
  15. copy {
  16. from jar
  17. into stageDir
  18. }
  19. }
  20. push = true
  21. }
  22. task innerDockerBuilder(type: Docker){
  23. registry='registry.tuonq.cn:5000'
  24. applicationName = 'tuonq-config'
  25. tagVersion = jar.getArchiveVersion()
  26. addFile("./${jar.getArchiveBaseName()}-${jar.getArchiveVersion()}.jar","app.jar")
  27. entryPoint(["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-Djava.security.egd=file:/dev/./urandom","-Duser.timezone=GMT+08","-jar",'app.jar'])
  28. exposePort(11000)
  29. doFirst {
  30. copy {
  31. from jar
  32. into stageDir
  33. }
  34. }
  35. push = true
  36. }
  37. dockerBuilder.dependsOn(bootJar)
  38. innerDockerBuilder.dependsOn(bootJar)