unify c4k prefixes
This commit is contained in:
parent
331b3bba6e
commit
72339f62cf
2 changed files with 25 additions and 25 deletions
|
@ -4,25 +4,25 @@
|
|||
classDiagram
|
||||
class Devops {
|
||||
<<AggregateRoot>>
|
||||
stage
|
||||
name
|
||||
project_root_path
|
||||
module
|
||||
stage
|
||||
build_dir_name
|
||||
project_root_path
|
||||
}
|
||||
|
||||
class Image {
|
||||
dockerhub_user
|
||||
dockerhub_password
|
||||
build_dir_name
|
||||
use_package_common_files
|
||||
build_commons_path
|
||||
docker_build_commons_dir_name
|
||||
docker_publish_tag
|
||||
image_dockerhub_user
|
||||
image_dockerhub_password
|
||||
image_publish_tag
|
||||
image_build_dir_name
|
||||
image_use_package_common_files
|
||||
image_build_commons_path
|
||||
image_build_commons_dir_name
|
||||
}
|
||||
|
||||
class C4k {
|
||||
executabel_name
|
||||
c4k_executabel_name
|
||||
c4k_mixin_config
|
||||
c4k_mixin_auth
|
||||
}
|
||||
|
@ -34,13 +34,13 @@ classDiagram
|
|||
}
|
||||
|
||||
class Release {
|
||||
main_branch
|
||||
config_file
|
||||
release_main_branch
|
||||
release_config_file
|
||||
}
|
||||
class ReleaseContext {
|
||||
release_type
|
||||
version
|
||||
current_branch
|
||||
release_version
|
||||
release_current_branch
|
||||
}
|
||||
|
||||
Devops *-- "0..1" Image: spcialized_builds
|
||||
|
|
|
@ -10,15 +10,15 @@ class C4k(Validateable):
|
|||
def __init__(self, input: dict):
|
||||
self.module = input.get("module")
|
||||
self.stage = input.get("stage")
|
||||
self.executabel_name = input.get("c4k_executabel_name", input.get("module"))
|
||||
self.c4k_executabel_name = input.get("c4k_executabel_name", input.get("module"))
|
||||
self.c4k_config = input.get("c4k_config", {})
|
||||
self.grafana_cloud_url = input.get(
|
||||
self.c4k_grafana_cloud_url = input.get(
|
||||
"c4k_grafana_cloud_url",
|
||||
"https://prometheus-prod-01-eu-west-0.grafana.net/api/prom/push",
|
||||
)
|
||||
self.c4k_auth = input.get("c4k_auth", {})
|
||||
self.grafana_cloud_user = input.get('c4k_grafana_cloud_user')
|
||||
self.grafana_cloud_password = input.get('c4k_grafana_cloud_password')
|
||||
self.c4k_grafana_cloud_user = input.get('c4k_grafana_cloud_user')
|
||||
self.c4k_grafana_cloud_password = input.get('c4k_grafana_cloud_password')
|
||||
self.dns_record: Optional[DnsRecord] = None
|
||||
|
||||
# TODO: these functions should be located at TerraformBuild later on.
|
||||
|
@ -29,9 +29,9 @@ class C4k(Validateable):
|
|||
result = []
|
||||
result += self.__validate_is_not_empty__("module")
|
||||
result += self.__validate_is_not_empty__("stage")
|
||||
result += self.__validate_is_not_empty__("executabel_name")
|
||||
result += self.__validate_is_not_empty__("grafana_cloud_user")
|
||||
result += self.__validate_is_not_empty__("grafana_cloud_password")
|
||||
result += self.__validate_is_not_empty__("c4k_executabel_name")
|
||||
result += self.__validate_is_not_empty__("c4k_grafana_cloud_user")
|
||||
result += self.__validate_is_not_empty__("c4k_grafana_cloud_password")
|
||||
if self.dns_record:
|
||||
result += self.dns_record.validate()
|
||||
return result
|
||||
|
@ -44,15 +44,15 @@ class C4k(Validateable):
|
|||
result["mon-cfg"] = {
|
||||
"cluster-name": self.module,
|
||||
"cluster-stage": self.stage,
|
||||
"grafana-cloud-url": self.grafana_cloud_url,
|
||||
"grafana-cloud-url": self.c4k_grafana_cloud_url,
|
||||
}
|
||||
return result
|
||||
|
||||
def auth(self):
|
||||
result = self.c4k_auth.copy()
|
||||
result["mon-auth"] = {
|
||||
"grafana-cloud-user": self.grafana_cloud_user,
|
||||
"grafana-cloud-password": self.grafana_cloud_password,
|
||||
"grafana-cloud-user": self.c4k_grafana_cloud_user,
|
||||
"grafana-cloud-password": self.c4k_grafana_cloud_password,
|
||||
}
|
||||
return result
|
||||
|
||||
|
@ -62,4 +62,4 @@ class C4k(Validateable):
|
|||
config_path = f"{build_path}/out_c4k_config.yaml"
|
||||
auth_path = f"{build_path}/out_c4k_auth.yaml"
|
||||
output_path = f"{build_path}/out_{module}.yaml"
|
||||
return f"c4k-{self.executabel_name}-standalone.jar {config_path} {auth_path} > {output_path}"
|
||||
return f"c4k-{self.c4k_executabel_name}-standalone.jar {config_path} {auth_path} > {output_path}"
|
||||
|
|
Loading…
Reference in a new issue