Skip to content

Commit

Permalink
added the 2 new Alonzo node nightly builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dorin100 authored and dorin100 committed Jun 14, 2021
1 parent 4714251 commit 9bb2717
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
Binary file modified sync_tests/automated_tests_results.db
Binary file not shown.
8 changes: 6 additions & 2 deletions sync_tests/results_create_db.py
Expand Up @@ -38,7 +38,9 @@ def create_db_tables():
build_web_url text NOT NULL,
test_branch text,
node_branch text,
node_rev text
node_rev text,
cluster_era text NOT NULL,
tx_era text NOT NULL
); """

dbsync_nightly_table = """ CREATE TABLE IF NOT EXISTS dbsync_nightly (
Expand All @@ -53,7 +55,9 @@ def create_db_tables():
node_branch text NOT NULL,
node_rev text,
dbsync_branch text,
dbsync_rev text
dbsync_rev text,
cluster_era text NOT NULL,
tx_era text NOT NULL
); """

node_cli_table = """ CREATE TABLE IF NOT EXISTS node_cli (
Expand Down
20 changes: 18 additions & 2 deletions sync_tests/results_write_values_to_db.py
Expand Up @@ -12,7 +12,7 @@
DATABASE_NAME = r"automated_tests_results.db"
ORG_SLUG = "input-output-hk"
cli_envs = ["node_cli", "dbsync_cli"]
nightly_envs = ["node_nightly", "dbsync_nightly"]
nightly_envs = ["node_nightly", "node_nightly_alonzo_mary_tx", "node_nightly_alonzo_alonzo-tx", "dbsync_nightly"]


def get_buildkite_pipeline_builds(buildkite_token, pipeline_slug):
Expand Down Expand Up @@ -43,6 +43,10 @@ def get_buildkite_pipeline_slug(env):
pileline_slug = "cardano-node-tests-dbsync"
elif env == "dbsync_nightly":
pileline_slug = "cardano-node-tests-nightly-dbsync"
elif env == "node_nightly_alonzo_mary_tx":
pileline_slug = "cardano-node-tests-nightly-alonzo-mary-tx"
elif env == "node_nightly_alonzo_alonzo-tx":
pileline_slug = "cardano-node-tests-nightly-alonzo-alonzo-tx"
else:
print(f"!!! ERROR: env {env} not expected - use one of: {cli_envs + nightly_envs}")
exit(1)
Expand Down Expand Up @@ -111,6 +115,7 @@ def main():
for env in nightly_envs:
print(f" === env: {env}")
pileline_slug = get_buildkite_pipeline_slug(env)

pipeline_builds = get_buildkite_pipeline_builds(secret, pileline_slug)

print(f" - there are {len(pipeline_builds)} builds")
Expand All @@ -123,7 +128,10 @@ def main():
if build["state"] == "running":
print(f" ==== build no {build['number']} is still running; not adding it into the DB yet")
continue
if build["number"] not in get_column_values(database_path, env, "build_no"):
table_name = env
if "node_nightly" in env:
table_name = "node_nightly"
if build["number"] not in get_column_values(database_path, table_name, "build_no"):
build_results_dict["build_no"] = build["number"]
build_results_dict["build_id"] = build["id"]
build_results_dict["build_web_url"] = build["web_url"]
Expand All @@ -134,6 +142,14 @@ def main():
datetime.strptime(build_results_dict["build_finished_at"], "%Y-%m-%dT%H:%M:%S.%fZ"),
datetime.strptime(build_results_dict["build_started_at"], "%Y-%m-%dT%H:%M:%S.%fZ")))
build_results_dict["test_branch"] = build["branch"]

if "CLUSTER_ERA" in build["env"]:
build_results_dict["cluster_era"] = build["env"]["CLUSTER_ERA"]
build_results_dict["tx_era"] = build["env"]["TX_ERA"]
else:
build_results_dict["cluster_era"] = "mary"
build_results_dict["tx_era"] = "mary"

build_results_dict["node_branch"] = "master"
if "dbsync" in env:
build_results_dict["dbsync_branch"] = "master"
Expand Down

0 comments on commit 9bb2717

Please sign in to comment.