Skip to content

Commit

Permalink
don't include devtools in jib images
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Aug 24, 2024
1 parent 56242f0 commit c3a8fa5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ plugins {
}

jib {
<%_ if (backendTypeSpringBoot) { _%>
configurationName = "productionRuntimeClasspath"
<%_ } _%>
from {
image = "<%- dockerContainers.javaJre %>"
platforms {
Expand Down
27 changes: 25 additions & 2 deletions generators/maven/generators/jib/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,31 @@ export default class JibGenerator extends BaseApplicationGenerator {
<mode>755</mode>
</permission>
</permissions>
</extraDirectories>
</configuration>`,
</extraDirectories>${
application.backendTypeSpringBoot
? `
<pluginExtensions>
<pluginExtension>
<implementation>com.google.cloud.tools.jib.maven.extension.springboot.JibSpringBootExtension</implementation>
</pluginExtension>
</pluginExtensions>
`
: ''
}
</configuration>${
application.backendTypeSpringBoot
? `
<dependencies>
<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-spring-boot-extension-maven</artifactId>
<version>${application.javaDependencies!['jib-spring-boot-extension-maven']}</version>
</dependency>
</dependencies>
`
: ''
}
`,
},
],
});
Expand Down
4 changes: 4 additions & 0 deletions generators/server/resources/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ neo4j-migrations-spring-boot-starter = { module = 'eu.michael-simons.neo4j:neo4j
# Cassandra
lz4-java = { module = 'org.lz4:lz4-java', version = '1.8.0' }

# jib
jib-maven-plugin = { module = 'com.google.cloud.tools:jib-maven-plugin', version = '3.4.3' }
jib-spring-boot-extension-maven = { module = 'com.google.cloud.tools:jib-spring-boot-extension-maven', version = '0.1.0' }

[plugins]
gradle-git-properties = { id = 'com.gorylenko.gradle-git-properties', version = '2.4.2' }

Expand Down
6 changes: 0 additions & 6 deletions generators/server/resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<frontend-maven-plugin.version>1.15.0</frontend-maven-plugin.version>
<gatling-maven-plugin.version>4.9.6</gatling-maven-plugin.version>
<git-commit-id-maven-plugin.version>9.0.1</git-commit-id-maven-plugin.version>
<jib-maven-plugin.version>3.4.3</jib-maven-plugin.version>
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
Expand Down Expand Up @@ -98,11 +97,6 @@
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
Expand Down

0 comments on commit c3a8fa5

Please sign in to comment.