From 1a857a762267a81b4ec365fe4f127e782a4a44cb Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Fri, 17 May 2024 12:16:16 -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 dc53b0a082ea..b4bf1a4620b7 100644 --- a/bedrock-devnet/devnet/__init__.py +++ b/bedrock-devnet/devnet/__init__.py @@ -273,9 +273,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)