fixed last missing pieces
This commit is contained in:
parent
0103080bbd
commit
b0b3f1bf55
5 changed files with 6 additions and 9 deletions
|
@ -18,7 +18,7 @@ flake8:
|
||||||
script:
|
script:
|
||||||
- pip install -r dev_requirements.txt
|
- pip install -r dev_requirements.txt
|
||||||
- flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics src/main/python/ddadevops/
|
- flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics src/main/python/ddadevops/
|
||||||
- flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics src/main/python/ddadevops/
|
- flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --per-file-ignores="__init__.py:F401" --ignore=E722,W503 --statistics src/main/python/ddadevops/
|
||||||
|
|
||||||
mypy:
|
mypy:
|
||||||
stage: lint&test
|
stage: lint&test
|
||||||
|
|
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-dev66"
|
version = "4.0.0-dev67"
|
||||||
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")]
|
||||||
|
|
|
@ -76,9 +76,7 @@ class TerraformService:
|
||||||
|
|
||||||
# TODO: internal?
|
# TODO: internal?
|
||||||
def init_client(self, devops: Devops):
|
def init_client(self, devops: Devops):
|
||||||
terraform_domain = devops.specialized_builds[
|
terraform_domain = devops.specialized_builds[BuildType.TERRAFORM]
|
||||||
BuildType.TERRAFORM
|
|
||||||
]
|
|
||||||
terraform = Terraform(
|
terraform = Terraform(
|
||||||
working_dir=devops.build_path(),
|
working_dir=devops.build_path(),
|
||||||
terraform_semantic_version=terraform_domain.tf_terraform_semantic_version,
|
terraform_semantic_version=terraform_domain.tf_terraform_semantic_version,
|
||||||
|
|
|
@ -15,8 +15,7 @@ class Hetzner(Validateable, CredentialMappingDefault):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def backend_config(self) -> Dict[str, Any]:
|
def backend_config(self) -> Dict[str, Any]:
|
||||||
result = {}
|
return {}
|
||||||
return result
|
|
||||||
|
|
||||||
def resources_from_package(self) -> Set[str]:
|
def resources_from_package(self) -> Set[str]:
|
||||||
return {"provider_registry.tf", "hetzner_provider.tf", "hetzner_mixin_vars.tf"}
|
return {"provider_registry.tf", "hetzner_provider.tf", "hetzner_mixin_vars.tf"}
|
||||||
|
|
|
@ -114,11 +114,11 @@ class ExecutionApi:
|
||||||
output = output.rstrip()
|
output = output.rstrip()
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def execute_live(self, command, dry_run=False):
|
def execute_live(self, command, dry_run=False, shell=True):
|
||||||
if dry_run:
|
if dry_run:
|
||||||
print(command)
|
print(command)
|
||||||
else:
|
else:
|
||||||
process = Popen(command, stdout=PIPE)
|
process = Popen(command, stdout=PIPE, shell=shell)
|
||||||
for line in iter(process.stdout.readline, b""):
|
for line in iter(process.stdout.readline, b""):
|
||||||
print(line.decode("utf-8"), end="")
|
print(line.decode("utf-8"), end="")
|
||||||
process.stdout.close()
|
process.stdout.close()
|
||||||
|
|
Loading…
Reference in a new issue