From bd36ac6b212e8273602fc05a0f61666651ad4cab Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Mon, 13 May 2024 15:07:53 -0700 Subject: [PATCH] da: use env auth token if set --- bedrock-devnet/devnet/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bedrock-devnet/devnet/__init__.py b/bedrock-devnet/devnet/__init__.py index 3032df797e7f2..c0389349e7a3e 100644 --- a/bedrock-devnet/devnet/__init__.py +++ b/bedrock-devnet/devnet/__init__.py @@ -275,9 +275,11 @@ def devnet_deploy(paths): run_command(['docker', 'compose', 'up', '-d', 'da'], cwd=paths.ops_bedrock_dir, env=docker_env) wait_up(26658) time.sleep(15) - celestia_node_auth_token = run_command([ - 'docker', 'compose', 'exec', '--no-TTY', 'da', 'celestia', 'bridge', 'auth', 'admin', '--node.store', '/home/celestia/bridge' - ], cwd=paths.ops_bedrock_dir, env=docker_env, capture_output=True).stdout.decode().strip() + celestia_node_auth_token = os.getenv("CELESTIA_NODE_AUTH_TOKEN") + if not celestia_node_auth_token: + celestia_node_auth_token = run_command([ + 'docker', 'compose', 'exec', '--no-TTY', 'da', 'celestia', 'bridge', 'auth', 'admin', '--node.store', '/home/celestia/bridge' + ], cwd=paths.ops_bedrock_dir, env=docker_env, capture_output=True).stdout.decode().strip() docker_env['CELESTIA_NODE_AUTH_TOKEN'] = celestia_node_auth_token print('CELESTIA_NODE_AUTH_TOKEN: ', celestia_node_auth_token)