Skip to content

Commit

Permalink
Merge branch 'release/2.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pvorb committed Dec 21, 2020
2 parents ce2aa29 + 1dcbfd1 commit 42922b7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
= Changelog

== Version 2.8.0

* Support configuring the URL to the incubator repository via `incubatorRepoUrl` and allow to disable the incubator repository via `addIncubatorRepo`

== Version 2.7.1

* Fix inverted status check which _fails_ for any 2xx HTTP status
Expand Down
8 changes: 5 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Add the following to your `pom.xml`
<plugin>
<groupId>com.deviceinsight.helm</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>2.1.0</version>
<version>2.8.0</version>
<configuration>
<chartName>my-chart</chartName>
<chartRepoUrl>https://kubernetes-charts.storage.googleapis.com/</chartRepoUrl>
<helmVersion>2.13.0</helmVersion>
<helmVersion>3.4.2</helmVersion>
<strictLint>true</strictLint>
<valuesFile>src/test/helm/my-chart/values.yaml</valuesFile>
</configuration>
Expand Down Expand Up @@ -79,7 +79,9 @@ that the correct docker image is used. An example snippet:

|chartName |The Maven `artifactId` |The name of the chart
|chartVersion |`${project.model.version}` |The version of the chart
|chartRepoUrl |`"https://kubernetes-helm.storage.googleapis.com/"` |The URL of the Chart repository where dependencies are required from and where charts should be published to
|chartRepoUrl |`null` |The URL of the Chart repository where dependencies are required from and where charts should be published to
|incubatorRepoUrl |`https://charts.helm.sh/incubator` |The URL to the incubator Chart repository
|addIncubatorRepo |`true` |Whether the repository defined in `incubatorRepoUrl` should be added when running the package goal
|chartPublishUrl |`${chartRepoUrl}/api/charts` |The URL that will be used for publishing the chart. The default value will work if `chartRepoUrl` refers to a ChartMuseum.
|chartPublishMethod |"POST" |The HTTP method that will be used for publishing requests
|chartDeleteUrl |`${chartRepoUrl}/api/charts/${chartName}/${chartVersion}` |The URL that will be used for deleting a previous version of the chart. This is used for updating SNAPSHOT versions. The default value will work if `chartRepoUrl` refers to a ChartMuseum.
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

<groupId>com.deviceinsight.helm</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>2.7.1</version>
<version>2.8.0</version>
<packaging>maven-plugin</packaging>

<name>Helm Maven Plugin</name>
<description>A Maven Plugin for Helm Charts</description>
<url>https://github.com/deviceinsight/helm-maven-plugin</url>

<properties>
<kotlin.version>1.4.10</kotlin.version>
<kotlin.version>1.4.21</kotlin.version>
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand All @@ -22,16 +22,16 @@
<maven-project.version>2.2.1</maven-project.version>
<maven-artifact-transfer.version>0.12.0</maven-artifact-transfer.version>

<jackson.version>2.11.3</jackson.version>
<jackson.version>2.12.0</jackson.version>
<httpclient.version>4.5.13</httpclient.version>

<junit.jupiter.version>5.7.0</junit.jupiter.version>
<assertj-core.version>3.18.0</assertj-core.version>
<assertj-core.version>3.18.1</assertj-core.version>

<dokka-maven-plugin.version>1.4.10.2</dokka-maven-plugin.version>
<dokka-maven-plugin.version>1.4.20</dokka-maven-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<gitflow-maven-plugin.version>1.14.0</gitflow-maven-plugin.version>
<gitflow-maven-plugin.version>1.15.0</gitflow-maven-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
</properties>
Expand Down
12 changes: 9 additions & 3 deletions src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import java.io.File
class PackageMojo : AbstractHelmMojo() {

companion object {
private val PLACEHOLDER_REGEX = Regex("""\$\{(.*?)\}""")
private val PLACEHOLDER_REGEX = Regex("""\$\{(.*?)}""")
private val SUBSTITUTED_EXTENSIONS = setOf("json", "tpl", "yml", "yaml")
}

Expand All @@ -45,7 +45,11 @@ class PackageMojo : AbstractHelmMojo() {
@Parameter(property = "chartRepoPassword", required = false)
private var chartRepoPassword: String? = null

private val incubatorRepository = "https://charts.helm.sh/incubator"
@Parameter(property = "incubatorRepoUrl", defaultValue = "https://charts.helm.sh/incubator")
private var incubatorRepoUrl: String = "https://charts.helm.sh/incubator"

@Parameter(property = "addIncubatorRepo", defaultValue = "true")
private var addIncubatorRepo: Boolean = true

@Throws(MojoExecutionException::class)
override fun execute() {
Expand Down Expand Up @@ -79,7 +83,9 @@ class PackageMojo : AbstractHelmMojo() {
executeCmd("$helm init --client-only")
}

executeCmd("$helm repo add incubator $incubatorRepository")
if (addIncubatorRepo) {
executeCmd("$helm repo add incubator $incubatorRepoUrl")
}
if (chartRepoUrl != null) {
val authParams = if (chartRepoUsername != null && chartRepoPassword != null) {
" --username $chartRepoUsername --password $chartRepoPassword"
Expand Down

0 comments on commit 42922b7

Please sign in to comment.