first bugfixes
This commit is contained in:
parent
8aec1be4a5
commit
1ea4a5aa3f
8 changed files with 36 additions and 33 deletions
2
build.py
2
build.py
|
@ -28,7 +28,7 @@ use_plugin("python.distutils")
|
||||||
default_task = "publish"
|
default_task = "publish"
|
||||||
|
|
||||||
name = "ddadevops"
|
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"
|
summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud"
|
||||||
description = __doc__
|
description = __doc__
|
||||||
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]
|
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]
|
||||||
|
|
|
@ -9,32 +9,36 @@ PROJECT_ROOT_PATH = "../.."
|
||||||
|
|
||||||
@init
|
@init
|
||||||
def initialize(project):
|
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")
|
tag = environ.get("CI_COMMIT_TAG")
|
||||||
if not tag:
|
if not tag:
|
||||||
tag = get_tag_from_latest_commit()
|
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(
|
project.build_depends_on("ddadevops>=4.0.0-dev")
|
||||||
stage=stage,
|
|
||||||
project_root_path=PROJECT_ROOT_PATH,
|
build = DevopsImageBuild(project, input)
|
||||||
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)
|
|
||||||
build.initialize_build_dir()
|
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 .devops_build import DevopsBuild, create_devops_build_config, get_devops_build
|
||||||
from .credential import gopass_password_from_path, gopass_field_from_path
|
from .credential import gopass_password_from_path, gopass_field_from_path
|
||||||
from .release_mixin import ReleaseMixin
|
from .release_mixin import ReleaseMixin
|
||||||
from .domain import Validateable, DnsRecord, Devops, Image, Release, Version
|
|
||||||
|
|
||||||
__version__ = "${version}"
|
__version__ = "${version}"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from src.main.python.ddadevops.domain import Image, Devops, BuildType
|
from ..domain import Image, Devops, BuildType
|
||||||
from src.main.python.ddadevops.infrastructure import FileApi, ResourceApi, ImageApi
|
from ..infrastructure import FileApi, ResourceApi, ImageApi
|
||||||
|
|
||||||
|
|
||||||
class ImageBuildService:
|
class ImageBuildService:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
from src.main.python.ddadevops.infrastructure import GitApi, BuildFileRepository
|
from ..infrastructure import GitApi, BuildFileRepository
|
||||||
from src.main.python.ddadevops.domain import Version, Release
|
from ..domain import Version, Release
|
||||||
|
|
||||||
|
|
||||||
class ReleaseService:
|
class ReleaseService:
|
||||||
|
|
|
@ -2,7 +2,7 @@ from pathlib import Path
|
||||||
from .common import Devops, MixinType
|
from .common import Devops, MixinType
|
||||||
from .devops_factory import DevopsFactory
|
from .devops_factory import DevopsFactory
|
||||||
from .version import Version
|
from .version import Version
|
||||||
from src.main.python.ddadevops.infrastructure import (
|
from .infrastructure import (
|
||||||
BuildFileRepository
|
BuildFileRepository
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ from .credentials import Credentials, GopassType
|
||||||
from .devops_factory import DevopsFactory
|
from .devops_factory import DevopsFactory
|
||||||
from .version import Version
|
from .version import Version
|
||||||
from .release import ReleaseType
|
from .release import ReleaseType
|
||||||
from src.main.python.ddadevops.infrastructure import (
|
from ..infrastructure import (
|
||||||
BuildFileRepository,
|
BuildFileRepository,
|
||||||
CredentialsApi,
|
CredentialsApi,
|
||||||
EnvironmentApi,
|
EnvironmentApi,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from pybuilder.core import Project
|
from pybuilder.core import Project
|
||||||
from src.main.python.ddadevops.devops_build import DevopsBuild
|
from .devops_build import DevopsBuild
|
||||||
from src.main.python.ddadevops.application import ReleaseService
|
from .application import ReleaseService
|
||||||
from src.main.python.ddadevops.domain import MixinType
|
from .domain import MixinType
|
||||||
|
|
||||||
|
|
||||||
class ReleaseMixin(DevopsBuild):
|
class ReleaseMixin(DevopsBuild):
|
||||||
|
|
Loading…
Reference in a new issue