dda-devops-build/build.py

43 lines
769 B
Python

from pybuilder.core import task, init
from ddadevops import *
from version import *
from release_mixin import *
CONFIG_FILE = ''
COMMIT_ID = ''
class MyBuild(ReleaseMixin):
pass
def main():
init_project()
@init
def initialize(project):
project.build_depends_on('ddadevops>=3.1.2')
if COMMIT_ID == '':
COMMIT_ID = 'HEAD'
config = create_release_mixin_config(CONFIG_FILE, COMMIT_ID)
build = MyBuild(project, config)
release_version, bump_version = build.init()
build.prepare()
build.tag_and_push()
@task
def prepare(project):
build = get_devops_build(project)
build.prepare_release()
@task
def tag_and_push(project):
build = get_devops_build(project)
build.tag_and_push()