-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpuff.yml
More file actions
58 lines (48 loc) · 1.32 KB
/
puff.yml
File metadata and controls
58 lines (48 loc) · 1.32 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
54
55
56
57
58
data:
projectName: smokkkin's rust service builder
authors: ["smokingplaya"]
description: Manage your service more conveniently
configuration:
default: dev
variables:
service: server
tasks:
# Build image
build:
description: Builds service's container image
commands:
- docker build -t ${service}-service .
# Restart backend
restart:
description: Restarts backend
commands:
- cd ../backend && sudo puff
# Build image and restart backend
buildx:
description: Builds a service and restarts backend
commands:
- puff build && puff restart
# Build image and push it to the registry
deploy:
description: Builds a image, and push it to the registry
commands:
- puff build && puff tagimage && puff pushimage
# Push builded image to the registry
pushimage:
description: Pushes the image to the registry
commands:
- docker push "${HARBOR_SERVER}/riverfall/${service}-service:latest"
# Tag an builded image
tagimage:
description: Tags a image
commands:
- docker tag ${service}-service:latest ${HARBOR_SERVER}/riverfall/${service}-service:latest
# Run test
test:
description: Runs tests
commands:
- cargo test -- --nocapture
dev:
description: Rebuild service on file changes
commands:
- cargo watch -x 'run'