Skip to content

Commit c563b6b

Browse files
committed
Mavenize helm chart
1 parent 77a6c11 commit c563b6b

File tree

5 files changed

+143
-0
lines changed

5 files changed

+143
-0
lines changed

frontend/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,28 @@
139139
</execution>
140140
</executions>
141141
</plugin>
142+
<plugin>
143+
<groupId>com.google.code.maven-replacer-plugin</groupId>
144+
<artifactId>replacer</artifactId>
145+
<configuration>
146+
<filesToInclude>
147+
${project.basedir}/package.json,${project.basedir}/package-lock.json
148+
</filesToInclude>
149+
<replacements>
150+
<replacement>
151+
<!-- This version should not contain `-SNAPSHOT` -->
152+
<token>("name": "frontend",\n\s*"version":\s").*(",$)</token>
153+
<value>
154+
<!-- Added <![CDATA[]]> to prevent formatting be IDE -->
155+
<![CDATA[$1${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}$2]]>
156+
</value>
157+
</replacement>
158+
</replacements>
159+
<regexFlags>
160+
<regexFlag>MULTILINE</regexFlag>
161+
</regexFlags>
162+
</configuration>
163+
</plugin>
142164
</plugins>
143165
</build>
144166
</project>

helm/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
24+
/target

helm/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121
.idea/
2222
*.tmproj
2323
.vscode/
24+
25+
/target
26+
pom.xml

helm/pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>com.wirehall</groupId>
8+
<artifactId>commandhunt</artifactId>
9+
<version>1.0.0-SNAPSHOT</version>
10+
</parent>
11+
12+
<packaging>helm</packaging>
13+
14+
<groupId>com.wirehall.commandhunt</groupId>
15+
<artifactId>commandhunt-helm</artifactId>
16+
17+
<name>commandhunt-helm</name>
18+
<description>CommandHunt Helm</description>
19+
20+
<build>
21+
<plugins>
22+
<plugin>
23+
<groupId>com.kiwigrid</groupId>
24+
<artifactId>helm-maven-plugin</artifactId>
25+
<version>5.7</version>
26+
<!-- Mandatory when you use a custom lifecycle -->
27+
<extensions>true</extensions>
28+
<configuration>
29+
<chartDirectory>${project.basedir}</chartDirectory>
30+
<chartVersion>${project.version}</chartVersion>
31+
<skipUpload>true</skipUpload><!-- Skip upload till oci support is added to plugin -->
32+
</configuration>
33+
</plugin>
34+
<plugin>
35+
<groupId>com.google.code.maven-replacer-plugin</groupId>
36+
<artifactId>replacer</artifactId>
37+
<configuration>
38+
<file>${project.basedir}/Chart.yaml</file>
39+
<replacements>
40+
<replacement>
41+
<!-- This version should not contain `-SNAPSHOT` -->
42+
<token>(^version:)\s(.*)</token>
43+
<value>
44+
<!-- Added <![CDATA[]]> to prevent formatting be IDE -->
45+
<![CDATA[$1 ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}]]>
46+
</value>
47+
</replacement>
48+
<replacement>
49+
<token>(^appVersion:)\s(.*)</token>
50+
<value><![CDATA[$1 ${project.version}]]></value>
51+
</replacement>
52+
</replacements>
53+
<regexFlags>
54+
<regexFlag>MULTILINE</regexFlag>
55+
</regexFlags>
56+
</configuration>
57+
</plugin>
58+
</plugins>
59+
</build>
60+
</project>

pom.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<modules>
1717
<module>frontend</module>
1818
<module>backend</module>
19+
<module>helm</module>
1920
</modules>
2021

2122
<packaging>pom</packaging>
@@ -49,8 +50,41 @@
4950
<artifactId>frontend-maven-plugin</artifactId>
5051
<version>${frontend.maven.plugin.version}</version>
5152
</plugin>
53+
<plugin>
54+
<groupId>org.codehaus.mojo</groupId>
55+
<artifactId>build-helper-maven-plugin</artifactId>
56+
<version>1.8</version>
57+
<executions>
58+
<execution>
59+
<id>parse-version</id>
60+
<goals>
61+
<goal>parse-version</goal>
62+
</goals>
63+
</execution>
64+
</executions>
65+
</plugin>
66+
<plugin>
67+
<groupId>com.google.code.maven-replacer-plugin</groupId>
68+
<artifactId>replacer</artifactId>
69+
<version>1.5.3</version>
70+
<executions>
71+
<execution>
72+
<id>replace-initialize</id>
73+
<phase>initialize</phase>
74+
<goals>
75+
<goal>replace</goal>
76+
</goals>
77+
</execution>
78+
</executions>
79+
</plugin>
5280
</plugins>
5381
</pluginManagement>
82+
<plugins>
83+
<plugin>
84+
<groupId>org.codehaus.mojo</groupId>
85+
<artifactId>build-helper-maven-plugin</artifactId>
86+
</plugin>
87+
</plugins>
5488
</build>
5589

5690
<distributionManagement>

0 commit comments

Comments
 (0)