Skip to content

Commit

Permalink
🔨 fix release monitoring cli (ITISFoundation#4811)
Browse files Browse the repository at this point in the history
  • Loading branch information
matusdrobuliak66 authored Oct 2, 2023
1 parent 945bf4b commit 61faf41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions scripts/release/monitor/monitor_release/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ class Action(str, Enum):


@app.command()
def main(deployment: Deployment, action: Action):
settings = get_settings(deployment)
def main(
deployment: Deployment,
action: Action,
env_file: str = typer.Option(".env", help="Path to .env file"),
):
settings = get_settings(env_file, deployment)
console.print(f"Deployment: {deployment}")
console.print(f"Action: {action}")

Expand Down
4 changes: 2 additions & 2 deletions scripts/release/monitor/monitor_release/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class Settings(BaseModel):
portainer_endpoint_version: int


def get_settings(deployment):
def get_settings(env_file, deployment):
# pylint: disable=too-many-return-statements
load_dotenv("/home/matus/Projects/osparc-simcore/scripts/release/monitor/.env")
load_dotenv(env_file)

if deployment == "master":
portainer_url = os.getenv("MASTER_PORTAINER_URL")
Expand Down

0 comments on commit 61faf41

Please sign in to comment.