diff --git a/build.py b/build.py index f011445..7f1208b 100644 --- a/build.py +++ b/build.py @@ -22,6 +22,7 @@ def initialize(project): "release_primary_build_file": "project.clj", "release_secondary_build_files": [ "package.json", + "infrastructure/docker-jitsi-web/build.py" ], } diff --git a/doc/Releasing.md b/doc/Releasing.md deleted file mode 100644 index e3aa755..0000000 --- a/doc/Releasing.md +++ /dev/null @@ -1,14 +0,0 @@ -# stable release (should be done from master) - -``` -#adjust [version] -vi package.json - -lein release -git push --follow-tags - -# bump version - increase version and add -SNAPSHOT -vi package.json -git commit -am "version bump" -git push -``` \ No newline at end of file diff --git a/infrastructure/docker-jitsi-web/build.py b/infrastructure/docker-jitsi-web/build.py index 5d7c5db..785c7a0 100644 --- a/infrastructure/docker-jitsi-web/build.py +++ b/infrastructure/docker-jitsi-web/build.py @@ -1,32 +1,34 @@ from os import environ +from datetime import datetime from pybuilder.core import task, init from ddadevops import * -import logging -name = 'c4k-jitsi' -MODULE = 'docker' -PROJECT_ROOT_PATH = '../..' +name = "c4k-jitsi" +MODULE = "app" +PROJECT_ROOT_PATH = "../.." +version = "1.3.4-dev" -class MyBuild(DevopsDockerBuild): - pass - @init def initialize(project): - project.build_depends_on('ddadevops>=0.12.7') - stage = 'notused' - dockerhub_user = environ.get('DOCKERHUB_USER') - if not dockerhub_user: - dockerhub_user = gopass_field_from_path('meissa/web/docker.com', 'login') - dockerhub_password = environ.get('DOCKERHUB_PASSWORD') - if not dockerhub_password: - dockerhub_password = gopass_password_from_path('meissa/web/docker.com') - tag = environ.get('CI_COMMIT_TAG') - if not tag: - tag = get_tag_from_latest_commit() - config = create_devops_docker_build_config( - stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password, docker_publish_tag=tag) - build = MyBuild(project, config) + image_tag = version + if "dev" in image_tag: + image_tag += datetime.now().strftime("%Y-%m-%d-%H-%M-%S") + + input = { + "name": name, + "module": MODULE, + "stage": "notused", + "project_root_path": PROJECT_ROOT_PATH, + "build_types": ["IMAGE"], + "mixin_types": [], + "image_naming": "NAME_ONLY", + "image_tag": f"{image_tag}", + } + + project.build_depends_on("ddadevops>=4.0.0") + + build = DevopsImageBuild(project, input) build.initialize_build_dir() @@ -35,16 +37,19 @@ def image(project): build = get_devops_build(project) build.image() + @task def drun(project): build = get_devops_build(project) build.drun() + @task def test(project): build = get_devops_build(project) build.test() + @task def publish(project): build = get_devops_build(project)