Skip to content

Commit

Permalink
feat(devel): WIP: add more stuff to Taskfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoscode committed Jun 2, 2023
1 parent 8e40f3a commit 280f51c
Showing 1 changed file with 50 additions and 5 deletions.
55 changes: 50 additions & 5 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
- ./gradlew clean

0 comments on commit 280f51c

Please sign in to comment.