diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index ba3acf3..a9ea3b3 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -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 diff --git a/README.adoc b/README.adoc index 230ec9a..ac6c654 100644 --- a/README.adoc +++ b/README.adoc @@ -20,11 +20,11 @@ Add the following to your `pom.xml` com.deviceinsight.helm helm-maven-plugin - 2.1.0 + 2.8.0 my-chart https://kubernetes-charts.storage.googleapis.com/ - 2.13.0 + 3.4.2 true src/test/helm/my-chart/values.yaml @@ -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. diff --git a/pom.xml b/pom.xml index 13a1d68..82cc13e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.deviceinsight.helm helm-maven-plugin - 2.7.1 + 2.8.0 maven-plugin Helm Maven Plugin @@ -12,7 +12,7 @@ https://github.com/deviceinsight/helm-maven-plugin - 1.4.10 + 1.4.21 1.8 1.8 1.8 @@ -22,16 +22,16 @@ 2.2.1 0.12.0 - 2.11.3 + 2.12.0 4.5.13 5.7.0 - 3.18.0 + 3.18.1 - 1.4.10.2 + 1.4.20 3.8.1 3.2.1 - 1.14.0 + 1.15.0 1.6.8 1.6 diff --git a/src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt b/src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt index a0d50b0..7642276 100644 --- a/src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt +++ b/src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt @@ -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") } @@ -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() { @@ -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"