|
|
@ -1,7 +1,13 @@
|
|
|
|
from pybuilder.core import task, init
|
|
|
|
from pybuilder.core import task, init
|
|
|
|
from ddadevops import *
|
|
|
|
from ddadevops import *
|
|
|
|
from version import *
|
|
|
|
from version import *
|
|
|
|
|
|
|
|
from release_mixin import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CONFIG_FILE = ''
|
|
|
|
|
|
|
|
COMMIT_ID = ''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MyBuild(ReleaseMixin):
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
init_project()
|
|
|
|
init_project()
|
|
|
@ -9,23 +15,24 @@ def main():
|
|
|
|
@init
|
|
|
|
@init
|
|
|
|
def initialize(project):
|
|
|
|
def initialize(project):
|
|
|
|
project.build_depends_on('ddadevops>=3.1.2')
|
|
|
|
project.build_depends_on('ddadevops>=3.1.2')
|
|
|
|
# build = get_devops_build()
|
|
|
|
|
|
|
|
# build.init()
|
|
|
|
|
|
|
|
init_project()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@task
|
|
|
|
if COMMIT_ID == '':
|
|
|
|
def release(project):
|
|
|
|
COMMIT_ID = 'HEAD'
|
|
|
|
# build = get_devops_build(project)
|
|
|
|
|
|
|
|
# build.prepare_release() # mit config file
|
|
|
|
config = create_release_mixin_config(CONFIG_FILE, COMMIT_ID)
|
|
|
|
prepare_release()
|
|
|
|
|
|
|
|
# build()
|
|
|
|
build = MyBuild(project, config)
|
|
|
|
# build.publish()
|
|
|
|
|
|
|
|
# build.release_in_git()
|
|
|
|
build.init()
|
|
|
|
# release_in_git()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@task
|
|
|
|
@task
|
|
|
|
def build(project):
|
|
|
|
def prepare(project):
|
|
|
|
build = get_devops_build(project)
|
|
|
|
build = get_devops_build(project)
|
|
|
|
# ToDo: Implement for project
|
|
|
|
build.prepare_release()
|
|
|
|
|
|
|
|
|
|
|
|
main()
|
|
|
|
@task
|
|
|
|
|
|
|
|
def tag_and_push(project):
|
|
|
|
|
|
|
|
build = get_devops_build(project)
|
|
|
|
|
|
|
|
build.tag_and_push()
|
|
|
|
|
|
|
|
|
|
|
|