Skip to content

Commit

Permalink
gradle example
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
  • Loading branch information
jeromy-cannon committed Oct 6, 2023
1 parent fa47674 commit 43ae501
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions fullstack-examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import com.hedera.fullstack.gradle.plugin.HelmInstallChartTask
import com.hedera.fullstack.gradle.plugin.HelmListReleasesTask
import com.hedera.fullstack.gradle.plugin.HelmReleaseExistsTask
import com.hedera.fullstack.gradle.plugin.HelmUninstallChartTask

plugins {
Expand Down Expand Up @@ -53,9 +53,14 @@ tasks.register<HelmUninstallChartTask>("helmUninstallNginxChart") {
release.set("nginx-release")
}

tasks.register<HelmListReleasesTask>("helmListRelease") { namespace.set("nginx-ns") }
tasks.register<HelmReleaseExistsTask>("helmNginxExists") {
allNamespaces.set(true)
namespace.set("nginx-ns")
release.set("nginx-release")
}

tasks.check {
dependsOn("helmInstallNginxChart")
dependsOn("helmNginxExists")
dependsOn("helmUninstallNginxChart")
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ void releaseExists() {
}

if (releaseItem == null) {
throw new RuntimeException("HelmReleaseExistsTask.releaseExists(): Release "
+ getRelease().get() + " does not exist");
final String errorMessage = "HelmReleaseExistsTask.releaseExists(): Release "
+ getRelease().get() + " does not exist";
this.getProject().getLogger().error(errorMessage);
throw new RuntimeException(errorMessage);
}
}
}

0 comments on commit 43ae501

Please sign in to comment.