first bugfixes

merge-requests/12/head
Michael Jerger 1 year ago
parent 8aec1be4a5
commit 1ea4a5aa3f

@ -28,7 +28,7 @@ use_plugin("python.distutils")
default_task = "publish"
name = "ddadevops"
version = "4.0.0-dev16"
version = "4.0.0-dev19"
summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud"
description = __doc__
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]

@ -9,32 +9,36 @@ PROJECT_ROOT_PATH = "../.."
@init
def initialize(project):
project.build_depends_on("ddadevops>=4.0.0-dev")
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()
input = {
"name": name,
"module": MODULE,
"stage": "notused",
"project_root_path": PROJECT_ROOT_PATH,
"build_types": ["IMAGE"],
"mixin_types": [],
"image_dockerhub_user": "dockerhub_user",
"image_dockerhub_password": "dockerhub_password",
"image_tag": tag,
"credentials_mappings": [
{
"gopass_path": "meissa/web/docker.com",
"gopass_field": "login",
"name": "image_dockerhub_user"
},
{
"gopass_path": "meissa/web/docker.com",
"name": "image_dockerhub_password"
},
],
}
devops = Devops(
stage=stage,
project_root_path=PROJECT_ROOT_PATH,
module=MODULE,
name=name,
)
image = Image(
dockerhub_user=dockerhub_user,
dockerhub_password=dockerhub_password,
docker_publish_tag=tag,
devops=devops,
)
build = DevopsImageBuild(project, image=image)
project.build_depends_on("ddadevops>=4.0.0-dev")
build = DevopsImageBuild(project, input)
build.initialize_build_dir()

@ -19,6 +19,5 @@ from .devops_terraform_build import DevopsTerraformBuild, create_devops_terrafor
from .devops_build import DevopsBuild, create_devops_build_config, get_devops_build
from .credential import gopass_password_from_path, gopass_field_from_path
from .release_mixin import ReleaseMixin
from .domain import Validateable, DnsRecord, Devops, Image, Release, Version
__version__ = "${version}"

@ -1,5 +1,5 @@
from src.main.python.ddadevops.domain import Image, Devops, BuildType
from src.main.python.ddadevops.infrastructure import FileApi, ResourceApi, ImageApi
from ..domain import Image, Devops, BuildType
from ..infrastructure import FileApi, ResourceApi, ImageApi
class ImageBuildService:

@ -1,6 +1,6 @@
from typing import Optional, List
from src.main.python.ddadevops.infrastructure import GitApi, BuildFileRepository
from src.main.python.ddadevops.domain import Version, Release
from ..infrastructure import GitApi, BuildFileRepository
from ..domain import Version, Release
class ReleaseService:

@ -2,7 +2,7 @@ from pathlib import Path
from .common import Devops, MixinType
from .devops_factory import DevopsFactory
from .version import Version
from src.main.python.ddadevops.infrastructure import (
from .infrastructure import (
BuildFileRepository
)

@ -5,7 +5,7 @@ from .credentials import Credentials, GopassType
from .devops_factory import DevopsFactory
from .version import Version
from .release import ReleaseType
from src.main.python.ddadevops.infrastructure import (
from ..infrastructure import (
BuildFileRepository,
CredentialsApi,
EnvironmentApi,

@ -1,7 +1,7 @@
from pybuilder.core import Project
from src.main.python.ddadevops.devops_build import DevopsBuild
from src.main.python.ddadevops.application import ReleaseService
from src.main.python.ddadevops.domain import MixinType
from .devops_build import DevopsBuild
from .application import ReleaseService
from .domain import MixinType
class ReleaseMixin(DevopsBuild):

Loading…
Cancel
Save