Skip to content

Commit

Permalink
Merge pull request #11 from danihodovic/add-taskfile
Browse files Browse the repository at this point in the history
Add Taskfile to build binary & docker image
  • Loading branch information
danihodovic authored Feb 13, 2021
2 parents 5892433 + 5c875a4 commit 88d5911
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 1 deletion.
44 changes: 44 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# yamllint disable rule:line-length
version: '3'

tasks:
build-image:
desc: Builds a docker image
cmds:
- docker build . -t danihodovic/celery-exporter

build-binary:
desc: Creates a cross platform binary
cmds:
- pyinstaller cli.py -y
--onefile
--name celery-exporter
- staticx ./dist/celery-exporter ./dist/celery-exporter

release:
desc: Creates a Github release
deps: [build]
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 ./dist/celery-exporter
- docker push danihodovic/celery-exporter
127 changes: 126 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ pylint = {git = "https://github.com/PyCQA/pylint.git"}
pytest-cov = "^2.11.1"
ptpython = "^3.0.13"
pytest-mock = "^3.5.1"
pyinstaller = "v4.0"
staticx = "^0.12.1"

[build-system]
requires = ["poetry-core>=1.0.0a5"]
Expand Down

0 comments on commit 88d5911

Please sign in to comment.