From ed2277f9dbf690fea1815e5f82832b4909727922 Mon Sep 17 00:00:00 2001 From: Peter Motzko Date: Fri, 2 Jun 2023 14:08:33 +0200 Subject: [PATCH] feat(devel): WIP: add more stuff to Taskfile --- Taskfile.yaml | 55 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index 787349e96..da070bf7f 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -4,14 +4,59 @@ dotenv: - 'dev.env' tasks: + unittest: + desc: Executes helm unittests + dir: charts/managed-identity-wallet + cmds: + - helm unittest . + + build: + desc: Build the whole app + cmds: + - ./gradlew build -PgithubToken=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 -x test -x jacocoTestCoverageVerification + + buildDocker: + desc: Build the app and the corresponding Docker image (tagged as "miw-test") + cmds: + - task: buildJar + - docker build -t local-miw --platform linux/amd64 . + runDevEnv: desc: Spin up local Docker environment dir: dev-assets/dev-containers + ignore_error: true + vars: + OPTIONS: '{{ default "" .OPTIONS }}' + CONTAINERS: '{{ default "local_postgres local_keycloak" .CONTAINERS }}' cmds: - - docker-compose up + - "docker-compose up {{ .OPTIONS }} {{ .CONTAINERS }}" - unittest: - desc: Executes helm unittests - dir: charts/managed-identity-wallet + stopDevEnv: + desc: Stop local Docker environment + dir: dev-assets/dev-containers + cmds: + - docker-compose down + + runDockerApp: + desc: Run the app in a container environment + cmds: + - task: runDevEnv + vars: + OPTIONS: "-d" + - task: buildDocker + - cmd: docker rm miw-app + ignore_error: true + - task: runDevEnv + vars: + CONTAINERS: "local_miw_app" + + stopDockerApp: + desc: Stop all running containers + cmds: + - docker stop miw-app + - task: stopDevEnv + + clean: + desc: Cleans everything... cmds: - - helm unittest . \ No newline at end of file + - ./gradlew clean \ No newline at end of file