@Mojo(name="install") public class InstallReleaseMojo extends AbstractMutatingReleaseMojo
| Constructor and Description |
|---|
InstallReleaseMojo(MavenProject project,
MavenSession session)
Creates a new
InstallReleaseMojo. |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractChartLoader<URL> |
createChartLoader()
Creates and returns an
AbstractChartLoader capable of
loading a Helm chart from a URL. |
protected void |
execute(Callable<ReleaseManager> releaseManagerCallable)
|
URL |
getChartUrl()
Returns a
URL identifying a Helm chart that can be read
by the AbstractChartLoader produced by the createChartLoader() method. |
String |
getReleaseNamespace()
Returns the namespace
into which the release will be installed.
|
boolean |
getReuseReleaseName()
Returns
true if the supplied release name should be reused across installations. |
String |
getValuesYaml()
Returns a YAML
String representing the values to use to
customize the installation. |
URI |
getValuesYamlUri()
Returns a
URI identifying a YAML document containing the
values to use to customize the installation. |
boolean |
isLenient()
Returns
true if this InstallReleaseMojo is
lenient; if true, a missing or unresolvable
chartUrl parameter will result in
execution being skipped rather than a MojoExecutionException being thrown. |
void |
setChartUrl(URL chartUrl)
Sets the
URL identifying a Helm chart that can be read
by the AbstractChartLoader produced by the createChartLoader() method. |
void |
setLenient(boolean lenient)
Sets whether this
InstallReleaseMojo is lenient;
if true is supplied, a missing or unresolvable chartUrl parameter will result in execution being
skipped rather than a MojoExecutionException being
thrown. |
void |
setReleaseNamespace(String releaseNamespace)
Sets the namespace
into which the release will be installed.
|
void |
setReuseReleaseName(boolean reuseReleaseName)
Sets whether the supplied release
name should be reused across installations.
|
void |
setValuesYaml(String valuesYaml)
Installs a YAML
String representing the values to use to
customize the installation. |
void |
setValuesYamlUri(URI valuesYamlUri)
Sets the
URI identifying a YAML document containing the
values to use to customize the installation. |
protected void |
validateReleaseName(String name)
Validates the supplied
name as a Helm release
name. |
getDisableHooks, getDryRun, getTimeout, getWait, setDisableHooks, setDryRun, setTimeout, setWaitgetReleaseName, setReleaseNamecreateClient, createReleaseManager, createTiller, execute, getClientConfiguration, getSkip, getTillerLabels, getTillerNamespace, getTillerPort, setClientConfiguration, setSkip, setTillerLabels, setTillerNamespace, setTillerPort, validateNamespacegetLog, getPluginContext, setLog, setPluginContext@Inject public InstallReleaseMojo(MavenProject project, MavenSession session)
InstallReleaseMojo.project - the MavenProject in effect; must not be
nullsession - the MavenSession in effect; must not be
nullNullPointerException - if either project or
session is nullprotected void execute(Callable<ReleaseManager> releaseManagerCallable) throws Exception
ReleaseManager
available from the supplied Callable.
This implementation installs the chart residing at the indicated URL and thus creates a release.
execute in class AbstractReleaseMojoreleaseManagerCallable - the Callable that will
provide a ReleaseManager; must not be nullException - if an error occursprotected AbstractChartLoader<URL> createChartLoader()
AbstractChartLoader capable of
loading a Helm chart from a URL.
This method never returns null.
Overrides of this method must not return null.
This implementation returns a new URLChartLoader.
AbstractChartLoader implementation; never
nullpublic URL getChartUrl()
URL identifying a Helm chart that can be read
by the AbstractChartLoader produced by the createChartLoader() method.
This method may return null.
URL to a Helm chart, or nullsetChartUrl(URL)public void setChartUrl(URL chartUrl)
URL identifying a Helm chart that can be read
by the AbstractChartLoader produced by the createChartLoader() method.chartUrl - the URL identifying a Helm chart that can
be read by the AbstractChartLoader produced by the createChartLoader() method; may be nullpublic boolean isLenient()
true if this InstallReleaseMojo is
lenient; if true, a missing or unresolvable
chartUrl parameter will result in
execution being skipped rather than a MojoExecutionException being thrown.true if this InstallReleaseMojo is
lenient; false otherwisepublic void setLenient(boolean lenient)
InstallReleaseMojo is lenient;
if true is supplied, a missing or unresolvable chartUrl parameter will result in execution being
skipped rather than a MojoExecutionException being
thrown.lenient - whether this InstallReleaseMojo is
lenient; if true, a missing or unresolvable
chartUrl parameter will result in
execution being skipped rather than a MojoExecutionException being thrownpublic String getReleaseNamespace()
This method may return null.
nullsetReleaseNamespace(String)public void setReleaseNamespace(String releaseNamespace)
releaseNamespace - the namespace
into which the release will be installed; may be nullgetReleaseNamespace()public boolean getReuseReleaseName()
true if the supplied release name should be reused across installations.true if the supplied release name should be reused across installations;
false otherwisesetReuseReleaseName(boolean)public void setReuseReleaseName(boolean reuseReleaseName)
reuseReleaseName - whether the supplied release name should be reused across installationsgetReuseReleaseName()public String getValuesYaml()
String representing the values to use to
customize the installation.
This method may return null.
Overrides of this method may return null.
String representing the values to use to
customize the installation, or nullsetValuesYaml(String)public void setValuesYaml(String valuesYaml)
String representing the values to use to
customize the installation.valuesYaml - the YAML String representing the values to use to
customize the installation; may be nullgetValuesYaml()public URI getValuesYamlUri()
URI identifying a YAML document containing the
values to use to customize the installation.
This method may return null.
Overrides of this method may return null.
URI identifying a YAML document containing the
values to use to customize the installation, or nullsetValuesYamlUri(URI)public void setValuesYamlUri(URI valuesYamlUri)
URI identifying a YAML document containing the
values to use to customize the installation.valuesYamlUri - the URI identifying a YAML document
containing the values to use to customize the installation; may
be nullgetValuesYamlUri()protected void validateReleaseName(String name)
name as a Helm release
name.
This implementation checks to see if the supplied name
is non-null, not empty, and
matches the value of the ReleaseManager.DNS_SUBDOMAIN_PATTERN field.
This implementation allows the supplied name to be
null or empty.
validateReleaseName in class AbstractSingleReleaseMojoname - the release name to validate; must not be nullCopyright © 2017–2018, microBean. All rights reserved.