-
Notifications
You must be signed in to change notification settings - Fork 96
/
Taskfile.yml
48 lines (44 loc) · 1.32 KB
/
Taskfile.yml
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
---
# yamllint disable rule:line-length
version: '3'
tasks:
build-image:
desc: Builds a docker image
cmds:
- docker build . -t danihodovic/celery-exporter
trivy-scan:
desc: Scans the docker image for vulnerabilities
cmds:
- trivy image --severity CRITICAL,HIGH --ignore-unfixed danihodovic/celery-exporter:latest
build-binary:
desc: Creates a binary
cmds:
- docker build . -t celery-exporter-builder -f Dockerfile.pyinstaller --build-arg PYTHON_VERSION=$(cat .python-version)
- >
container=$(docker run --rm -d celery-exporter-builder sleep 5) &&
docker cp $container:/app/dist/celery-exporter celery-exporter
release:
desc: Creates a Github release
deps: [build-binary]
cmds:
- git tag --delete latest
- git tag -a latest -m 'Latest build'
- >
github-release delete
--user danihodovic
--repo celery-exporter
--tag latest
- >
github-release release
--user danihodovic
--repo celery-exporter
--tag latest
--name celery-exporter
--description "Celery exporter for Prometheus"
- >
github-release upload
--user danihodovic
--repo celery-exporter
--tag latest
--name celery-exporter
--file ./celery-exporter