diff --git a/.circleci/config.yml b/.circleci/config.yml index 8f3a6ba3..e6f48814 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,17 +36,12 @@ jobs: if ./ops/verify-geth-endpoint.sh "<< pipeline.parameters.l1_sepolia_rpc_url >>" && \ ops/verify-geth-endpoint.sh "<< pipeline.parameters.l2_sepolia_rpc_url >>"; then echo "Both RPC endpoints are up to date and not syncing." - echo "<< pipeline.parameters.l1_sepolia_rpc_url >>" > /tmp/l1_sepolia_rpc_url - echo "<< pipeline.parameters.l2_sepolia_rpc_url >>" > /tmp/l2_sepolia_rpc_url + echo "L1_RPC_SEPOLIA=<< pipeline.parameters.l1_sepolia_rpc_url >>" >> $BASH_ENV + echo "L2_RPC_SEPOLIA=<< pipeline.parameters.l2_sepolia_rpc_url >>" >> $BASH_ENV else echo "One or both of the RPC endpoints failed the checks." exit 1 fi - - persist_to_workspace: - root: /tmp - paths: - - l1_sepolia_rpc_url - - l2_sepolia_rpc_url check_goerli_rpc_endpoints: circleci_ip_ranges: true docker: @@ -59,17 +54,12 @@ jobs: if ./ops/verify-geth-endpoint.sh "<< pipeline.parameters.l1_goerli_rpc_url >>" && \ ./ops/verify-geth-endpoint.sh "<< pipeline.parameters.l2_goerli_rpc_url >>"; then echo "Both RPC endpoints are up to date and not syncing." - echo "<< pipeline.parameters.l1_goerli_rpc_url >>" > /tmp/l1_goerli_rpc_url - echo "<< pipeline.parameters.l2_goerli_rpc_url >>" > /tmp/l2_goerli_rpc_url + echo "L1_RPC_GOERLI=<< pipeline.parameters.l1_goerli_rpc_url >>" >> $BASH_ENV + echo "L2_RPC_GOERLI=<< pipeline.parameters.l2_goerli_rpc_url >>" >> $BASH_ENV else echo "One or both of the RPC endpoints failed the checks." exit 1 fi - - persist_to_workspace: - root: /tmp - paths: - - l1_goerli_rpc_url - - l2_goerli_rpc_url check_mainnet_rpc_endpoints: circleci_ip_ranges: true docker: @@ -82,17 +72,12 @@ jobs: if ops/verify-geth-endpoint.sh "<< pipeline.parameters.l1_mainnet_rpc_url >>" && \ ops/verify-geth-endpoint.sh "<< pipeline.parameters.l2_mainnet_rpc_url >>"; then echo "Both RPC endpoints are up to date and not syncing." - echo "<< pipeline.parameters.l1_mainnet_rpc_url >>" > /tmp/l1_mainnet_rpc_url - echo "<< pipeline.parameters.l2_mainnet_rpc_url >>" > /tmp/l2_mainnet_rpc_url + echo "L1_RPC_MAINNET=<< pipeline.parameters.l1_mainnet_rpc_url >>" >> $BASH_ENV + echo "L2_RPC_MAINNET=<< pipeline.parameters.l2_mainnet_rpc_url >>" >> $BASH_ENV else echo "One or both of the RPC endpoints failed the checks." exit 1 fi - - persist_to_workspace: - root: /tmp - paths: - - l1_mainnet_rpc_url - - l2_mainnet_rpc_url # TODO: remove/replace when there are real consumers of the RPC URLs example_mainnet_job: circleci_ip_ranges: true @@ -104,16 +89,14 @@ jobs: - run: name: Use RPC URLs command: | - if [ -f /tmp/l1_mainnet_rpc_url ] && [ -f /tmp/l2_mainnet_rpc_url ]; then - L1_RPC_URL=$(cat /tmp/l1_mainnet_rpc_url) - L2_RPC_URL=$(cat /tmp/l2_mainnet_rpc_url) + if [ -z $L1_RPC_MAINNET ] || [ -z $L1_RPC_MAINNET ]; then + echo "Required RPC URLs are not available." + fi + L1_RPC_URL=$L1_RPC_MAINNET + L2_RPC_URL=$L2_RPC_MAINNET echo "L1 RPC URL: $L1_RPC_URL" echo "L2 RPC URL: $L2_RPC_URL" # Use L1_RPC_URL and L2_RPC_URL here. - else - echo "Required RPC URLs are not available." - exit 1 - fi workflows: version: 2