|
23 | 23 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
24 | 24 | <java.version>1.8</java.version> |
25 | 25 | <spring-cloud.version>Greenwich.M3</spring-cloud.version> |
| 26 | + <download-maven-plugin.version>1.4.1</download-maven-plugin.version> |
| 27 | + |
| 28 | + <!-- Stackdriver Agent --> |
| 29 | + <jib.agent.directory>${project.build.directory}/jib-agents</jib.agent.directory> |
| 30 | + <stackdriver.debugger.url>https://storage.googleapis.com/cloud-debugger/compute-java/debian-wheezy/cdbg_java_agent_gce.tar.gz</stackdriver.debugger.url> |
| 31 | + <stackdriver.debugger.directory>/opt/debugger</stackdriver.debugger.directory> |
| 32 | + <stackdriver.profiler.url>https://storage.googleapis.com/cloud-profiler/java/latest/profiler_java_agent.tar.gz</stackdriver.profiler.url> |
| 33 | + <stackdriver.profiler.directory>/opt/profiler</stackdriver.profiler.directory> |
26 | 34 |
|
27 | 35 | <!-- TODO change the following to your Docker registry prefix --> |
28 | 36 | <docker.image.prefix>gcr.io/wise-coyote-827</docker.image.prefix> |
|
36 | 44 | <artifactId>jib-maven-plugin</artifactId> |
37 | 45 | <version>0.10.1</version> |
38 | 46 | <configuration> |
| 47 | + <from> |
| 48 | + <image>adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jdk8u192-b12_openj9-0.11.0-slim</image> |
| 49 | + </from> |
39 | 50 | <to> |
40 | 51 | <image>${docker.image.prefix}/bootiful-${project.artifactId}</image> |
41 | 52 | </to> |
| 53 | + <extraDirectory>${jib.agent.directory}</extraDirectory> |
| 54 | + <container> |
| 55 | + <jvmFlags> |
| 56 | + <jvmFlag>-XX:+ContainerSupport</jvmFlag> |
| 57 | + <jvmFlag>-agentpath:/opt/profiler/profiler_java_agent.so=-cprof_service=${project.artifactId},-cprof_service_version=${project.version}</jvmFlag> |
| 58 | + <jvmFlag>-agentpath:${stackdriver.debugger.directory}/cdbg_java_agent.so=--logtostderr=1</jvmFlag> |
| 59 | + <jvmFlag>-Dcom.google.cdbg.module=${project.artifactId}</jvmFlag> |
| 60 | + <jvmFlag>-Dcom.google.cdbg.version=${project.version}</jvmFlag> |
| 61 | + </jvmFlags> |
| 62 | + </container> |
42 | 63 | </configuration> |
43 | 64 | </plugin> |
44 | 65 | <plugin> |
|
56 | 77 | <dotGitDirectory>${project.basedir}/.git</dotGitDirectory> |
57 | 78 | </configuration> |
58 | 79 | </plugin> |
| 80 | + <plugin> |
| 81 | + <groupId>com.googlecode.maven-download-plugin</groupId> |
| 82 | + <artifactId>download-maven-plugin</artifactId> |
| 83 | + <version>${download-maven-plugin.version}</version> |
| 84 | + <executions> |
| 85 | + <execution> |
| 86 | + <id>install-stackdriver-debugger</id> |
| 87 | + <phase>prepare-package</phase> |
| 88 | + <goals> |
| 89 | + <goal>wget</goal> |
| 90 | + </goals> |
| 91 | + <configuration> |
| 92 | + <url>${stackdriver.debugger.url}</url> |
| 93 | + <unpack>true</unpack> |
| 94 | + <outputDirectory>${jib.agent.directory}/${stackdriver.debugger.directory}</outputDirectory> |
| 95 | + </configuration> |
| 96 | + </execution> |
| 97 | + <execution> |
| 98 | + <id>install-stackdriver-profiler</id> |
| 99 | + <phase>prepare-package</phase> |
| 100 | + <goals> |
| 101 | + <goal>wget</goal> |
| 102 | + </goals> |
| 103 | + <configuration> |
| 104 | + <url>${stackdriver.profiler.url}</url> |
| 105 | + <unpack>true</unpack> |
| 106 | + <outputDirectory>${jib.agent.directory}/${stackdriver.profiler.directory}</outputDirectory> |
| 107 | + </configuration> |
| 108 | + </execution> |
| 109 | + </executions> |
| 110 | + </plugin> |
59 | 111 | </plugins> |
60 | 112 | </pluginManagement> |
61 | 113 | </build> |
|
0 commit comments