add a patch flow
This commit is contained in:
parent
2ef93a5972
commit
f0f4f46f46
1 changed files with 26 additions and 0 deletions
26
build.py
26
build.py
|
@ -14,6 +14,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from os import environ
|
from os import environ
|
||||||
|
from subprocess import run
|
||||||
from pybuilder.core import init, task, use_plugin, Author
|
from pybuilder.core import init, task, use_plugin, Author
|
||||||
from ddadevops import *
|
from ddadevops import *
|
||||||
|
|
||||||
|
@ -92,6 +93,31 @@ def initialize(project):
|
||||||
build = ReleaseMixin(project, input)
|
build = ReleaseMixin(project, input)
|
||||||
build.initialize_build_dir()
|
build.initialize_build_dir()
|
||||||
|
|
||||||
|
@task
|
||||||
|
def test(project):
|
||||||
|
run("pytest")
|
||||||
|
|
||||||
|
@task
|
||||||
|
def lint(project):
|
||||||
|
run("flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 "+
|
||||||
|
"--show-source --statistics src/main/python/ddadevops/", shell=True)
|
||||||
|
run("flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 "+
|
||||||
|
"--per-file-ignores=\"__init__.py:F401\" "+
|
||||||
|
"--ignore=E722,W503 --statistics src/main/python/ddadevops/", shell=True)
|
||||||
|
run("python -m mypy src/main/python/ddadevops/ --ignore-missing-imports "+
|
||||||
|
"--disable-error-code=attr-defined --disable-error-code=union-attr", shell=True)
|
||||||
|
run("pylint -d W0511,R0903,C0301,W0614,C0114,C0115,C0116,similarities,W1203,W0702,W0702,"+
|
||||||
|
"R0913,R0902,R0914,R1732,R1705,W0707,C0123,W0703,C0103 src/main/python/ddadevops/", shell=True)
|
||||||
|
|
||||||
|
@task
|
||||||
|
def patch(project):
|
||||||
|
build = get_devops_build(project)
|
||||||
|
build.update_release_type("PATCH")
|
||||||
|
#build.prepare_release()
|
||||||
|
test(project)
|
||||||
|
lint(project)
|
||||||
|
#build.tag_bump_and_push_release()
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def nothing(project):
|
def nothing(project):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue