Skip to content

Commit

Permalink
Adapt to Radix CLI change where config item is required (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer authored Sep 27, 2024
1 parent 051cd79 commit 83dac74
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions webviz_config/_deployment/azure_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import requests
from tqdm.asyncio import tqdm


try:
from azure.identity import InteractiveBrowserCredential
from azure.core.exceptions import HttpResponseError
Expand Down
1 change: 1 addition & 0 deletions webviz_config/_deployment/radix.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def radix_initial_deployment(github_slug: str, build_directory: pathlib.Path) ->
webhook_secret = secrets.token_urlsafe()
public_key = radix_cli.create_application(
application_name=radix_config["application_name"],
configuration_item=radix_config["configuration_item"],
repository_url=repository_url,
shared_secret=webhook_secret,
context=radix_config["context"],
Expand Down
3 changes: 2 additions & 1 deletion webviz_config/_deployment/radix_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def application_exists(application_name: str, context: str) -> bool:

def create_application(
application_name: str,
configuration_item: str,
repository_url: str,
shared_secret: str,
context: str,
Expand All @@ -76,7 +77,7 @@ def create_application(
"--config-branch",
"main",
"--configuration-item",
"insert-value-here",
configuration_item,
"--repository",
repository_url,
"--shared-secret",
Expand Down
7 changes: 7 additions & 0 deletions webviz_config/_deployment/radix_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@ def radix_configuration() -> Dict[str, str]:
reuse_allowed=False,
)

interactive_terminal.terminal_title("Configuration item")
radix_configuration_item = interactive_terminal.user_input_from_stdin(
"WEBVIZ_RADIX_CONFIGURATION_ITEM",
"Configuration item",
)

return {
"context": radix_context,
"application_name": radix_application_name,
"configuration_item": radix_configuration_item,
"app_url": f"https://{radix_application_name}.app.{radix_subdomain}",
"webhook_receiver_url": f"https://webhook.{radix_subdomain}/events/github",
"ad_group": radix_ad_group,
Expand Down

0 comments on commit 83dac74

Please sign in to comment.