terraformDummyRepo/build.py

44 lines
769 B
Python
Raw Normal View History

2023-02-08 09:33:39 +00:00
from pybuilder.core import task, init
from ddadevops import *
2023-02-16 13:21:27 +00:00
from version import *
2023-02-16 14:59:38 +00:00
from release_mixin import *
2023-02-08 09:57:40 +00:00
2023-02-16 14:59:38 +00:00
CONFIG_FILE = ''
COMMIT_ID = ''
class MyBuild(ReleaseMixin):
pass
2023-02-08 09:57:40 +00:00
def main():
init_project()
2023-02-08 09:33:39 +00:00
@init
def initialize(project):
2023-02-08 09:57:40 +00:00
project.build_depends_on('ddadevops>=3.1.2')
2023-02-08 09:33:39 +00:00
2023-02-16 14:59:38 +00:00
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()
2023-02-16 14:59:38 +00:00
2023-02-08 09:33:39 +00:00
@task
2023-02-16 14:59:38 +00:00
def prepare(project):
2023-02-08 09:33:39 +00:00
build = get_devops_build(project)
2023-02-16 14:59:38 +00:00
build.prepare_release()
2023-02-08 09:57:40 +00:00
2023-02-16 14:59:38 +00:00
@task
def tag_and_push(project):
build = get_devops_build(project)
build.tag_and_push()