fix image build

This commit is contained in:
Michael Jerger 2023-07-22 12:27:58 +02:00
parent c2822a58f5
commit 514384b6df
3 changed files with 27 additions and 35 deletions

View file

@ -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"
],
}

View file

@ -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
```

View file

@ -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)