Skip to content

Commit

Permalink
da: use env auth token if set
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxcanfly committed May 22, 2024
1 parent c1e4df9 commit bd36ac6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit bd36ac6

Please sign in to comment.