-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
53 lines (45 loc) · 1.24 KB
/
Taskfile.yml
File metadata and controls
53 lines (45 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
version: "3"
vars:
NODE_PKG_MANAGER: bun
GRADLE: ./gradlew
DOCKER_USER: joalvarezdev
tasks:
node:
desc: install node dependencies
preconditions:
- sh: 'command -v {{.NODE_PKG_MANAGER}}'
msg: "{{.NODE_PKG_MANAGER}} is not installed. Install it or change NODE_PKG_MANAGER in the Taskfile."
cmds:
- "{{.NODE_PKG_MANAGER}} install"
entity:
desc: create class hbs
deps: [node]
cmds:
- "{{.NODE_PKG_MANAGER}} run plop"
build:
desc: build application
cmds:
- "{{.GRADLE}} clean build"
docker-build:
desc: build docker image
deps: [build]
preconditions:
- sh: '[ -n "{{.APP_NAME}}" ]'
msg: "APP_NAME is not configured"
cmds:
- docker build -t {{.DOCKER_USER}}/{{.APP_NAME}}:latest --build-arg ARTIFACT_NAME={{.APP_NAME}}.jar .
docker-push:
desc: push docker image to registry
deps: [docker-build]
preconditions:
- sh: '[ -n "{{.APP_NAME}}" ]'
msg: "APP_NAME is not configured"
cmds:
- docker push {{.DOCKER_USER}}/{{.APP_NAME}}:latest
docker-deploy:
desc: build and push docker image
deps: [docker-push]
preconditions:
- sh: '[ -n "{{.APP_NAME}}" ]'
msg: "APP_NAME is not configured"