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_primary_build_file": "project.clj",
"release_secondary_build_files": [ "release_secondary_build_files": [
"package.json", "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 os import environ
from datetime import datetime
from pybuilder.core import task, init from pybuilder.core import task, init
from ddadevops import * from ddadevops import *
import logging
name = 'c4k-jitsi' name = "c4k-jitsi"
MODULE = 'docker' MODULE = "app"
PROJECT_ROOT_PATH = '../..' PROJECT_ROOT_PATH = "../.."
version = "1.3.4-dev"
class MyBuild(DevopsDockerBuild):
pass
@init @init
def initialize(project): def initialize(project):
project.build_depends_on('ddadevops>=0.12.7') image_tag = version
stage = 'notused' if "dev" in image_tag:
dockerhub_user = environ.get('DOCKERHUB_USER') image_tag += datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
if not dockerhub_user:
dockerhub_user = gopass_field_from_path('meissa/web/docker.com', 'login') input = {
dockerhub_password = environ.get('DOCKERHUB_PASSWORD') "name": name,
if not dockerhub_password: "module": MODULE,
dockerhub_password = gopass_password_from_path('meissa/web/docker.com') "stage": "notused",
tag = environ.get('CI_COMMIT_TAG') "project_root_path": PROJECT_ROOT_PATH,
if not tag: "build_types": ["IMAGE"],
tag = get_tag_from_latest_commit() "mixin_types": [],
config = create_devops_docker_build_config( "image_naming": "NAME_ONLY",
stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password, docker_publish_tag=tag) "image_tag": f"{image_tag}",
build = MyBuild(project, config) }
project.build_depends_on("ddadevops>=4.0.0")
build = DevopsImageBuild(project, input)
build.initialize_build_dir() build.initialize_build_dir()
@ -35,16 +37,19 @@ def image(project):
build = get_devops_build(project) build = get_devops_build(project)
build.image() build.image()
@task @task
def drun(project): def drun(project):
build = get_devops_build(project) build = get_devops_build(project)
build.drun() build.drun()
@task @task
def test(project): def test(project):
build = get_devops_build(project) build = get_devops_build(project)
build.test() build.test()
@task @task
def publish(project): def publish(project):
build = get_devops_build(project) build = get_devops_build(project)