Skip to content

Commit

Permalink
feat: switch to an array of stages
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Mar 21, 2024
1 parent 4fd9be9 commit 46535c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def run(plan, args):
args["is_cdk"] = True

## STAGE 1: Deploy L1
if args["stage"] <= DEPLOYMENT_STAGE.deploy_l1:
if DEPLOYMENT_STAGE.deploy_l1 in args["stage"]:
# Deploy L1 chain.
# For now we'll stick with most of the defaults
ethereum_package.run(
Expand All @@ -53,7 +53,7 @@ def run(plan, args):
# From this point, we assume the L1 chain has been deployed.

## STAGE 2: Configure L1 (fund accounts, deploy cdk contracts and create config files)
if args["stage"] <= DEPLOYMENT_STAGE.configure_l1:
if DEPLOYMENT_STAGE.configure_l1 in args["stage"]:
# Create deploy parameters
deploy_parameters_template = read_file(src="./templates/deploy_parameters.json")
deploy_parameters_artifact = plan.render_templates(
Expand Down Expand Up @@ -203,7 +203,7 @@ def run(plan, args):
)

## STAGE 3: Deploy trusted / central environment
if args["stage"] <= DEPLOYMENT_STAGE.deploy_central_environment:
if DEPLOYMENT_STAGE.deploy_central_environment in args["stage"]:
# Start databases
event_db_init_script = plan.upload_files(
src="./templates/databases/event-db-init.sql",
Expand Down Expand Up @@ -234,7 +234,7 @@ def run(plan, args):
pass

## STAGE 4: Deploy CDK/Bridge infra
if args["stage"] <= DEPLOYMENT_STAGE.deploy_cdk_bridge_infra:
if DEPLOYMENT_STAGE.deploy_cdk_bridge_infra in args["stage"]:
# Start bridge
plan.add_service(
name="zkevm-bridge-service" + args["deployment_suffix"],
Expand Down Expand Up @@ -309,7 +309,7 @@ def run(plan, args):
pass

## STAGE 5: Deploy permissionless node
if args["stage"] <= DEPLOYMENT_STAGE.deploy_permissionless_node:
if DEPLOYMENT_STAGE.deploy_permissionless_node in args["stage"]:
# Note that an additional suffix will be added to the services.
permissionless_args = args
permissionless_args["deployment_suffix"] = "-pless" + args["deployment_suffix"]
Expand Down
8 changes: 4 additions & 4 deletions params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# Note: It should be a string.
deployment_suffix: "-001"

# The deployment process is divided into different stages.
# The `stage` parameter indicates the specific stage from which you wish the deployment to commence.
# By default, we start at the first stage.
stage: 1
# The deployment process is divided into various stages.
# The `stages` parameter indicates the specific stages you wish the deployment to proceed through.
# By default, it will execute all the stages.
stages: [1, 2, 3, 4, 5]

# Docker images and repositories used to spin up services.
zkevm_prover_image: hermeznetwork/zkevm-prover:v5.0.7
Expand Down

0 comments on commit 46535c3

Please sign in to comment.