-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
436009a
commit b4caa16
Showing
9 changed files
with
170 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from pydantic import BaseModel | ||
from typing import Optional, Dict | ||
|
||
|
||
class StructActionsBase(BaseModel): | ||
name: str | ||
stack_name: str | ||
branch: str | ||
environment: str | ||
squad: str | ||
iac_type: Optional[str] = "terraform" | ||
version: str | ||
secreto: Dict | ||
variables_file: Optional[str] | ||
project_path: Optional[str] | ||
task_id: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from typing import Type | ||
from abc import ABC, abstractmethod | ||
from src.worker.domain.services.command import command | ||
from src.worker.domain.entities.actions import StructActionsBase | ||
|
||
|
||
class Actions(ABC): | ||
def __init__(self, params: StructActionsBase, command: Type[command] = command) -> None: | ||
self.name = params.name | ||
self.stack_name = params.stack_name | ||
self.branch = params.branch | ||
self.environment = params.environment | ||
self.squad = params.squad | ||
self.iac_type = params.iac_type | ||
self.version = params.version | ||
self.secreto = params.secreto | ||
self.variables_file = params.variables_file | ||
self.project_path = params.project_path | ||
self.task_id = params.task_id | ||
self.command = command | ||
|
||
@abstractmethod | ||
def execute_deployer_command(self, action: str) -> dict: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from abc import ABC, abstractmethod | ||
from abc import ABC | ||
|
||
|
||
class IProviderArtifactRequirements(ABC): | ||
@staticmethod | ||
def artifact_download(name, stack_name, environment, squad, git_repo, branch, project_path): | ||
# logic to download artifact | ||
pass | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters