terraformDummyRepo/build.py
2023-02-22 14:10:19 +01:00

45 lines
1 KiB
Python

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