Changeset View
Changeset View
Standalone View
Standalone View
.buildkite/dagster-buildkite/dagster_buildkite/steps/dagster.py
Show All 28 Lines | return [ | ||||
"postgres", | "postgres", | ||||
"test-postgres-db-airflow", | "test-postgres-db-airflow", | ||||
"POSTGRES_TEST_DB_HOST", | "POSTGRES_TEST_DB_HOST", | ||||
), | ), | ||||
"popd", | "popd", | ||||
] | ] | ||||
def airline_demo_extra_cmds_fn(_): | |||||
return [ | |||||
"pushd examples/airline_demo", | |||||
# Run the postgres db. We are in docker running docker | |||||
# so this will be a sibling container. | |||||
"docker-compose up -d --remove-orphans", # clean up in hooks/pre-exit | |||||
# Can't use host networking on buildkite and communicate via localhost | |||||
# between these sibling containers, so pass along the ip. | |||||
network_buildkite_container("postgres"), | |||||
connect_sibling_docker_container( | |||||
"postgres", "test-postgres-db-airline", "POSTGRES_TEST_DB_HOST" | |||||
), | |||||
"popd", | |||||
] | |||||
def dbt_example_extra_cmds_fn(_): | def dbt_example_extra_cmds_fn(_): | ||||
return [ | return [ | ||||
"pushd examples/dbt_example", | "pushd examples/dbt_example", | ||||
# Run the postgres db. We are in docker running docker | # Run the postgres db. We are in docker running docker | ||||
# so this will be a sibling container. | # so this will be a sibling container. | ||||
"docker-compose up -d --remove-orphans", # clean up in hooks/pre-exit | "docker-compose up -d --remove-orphans", # clean up in hooks/pre-exit | ||||
# Can't use host networking on buildkite and communicate via localhost | # Can't use host networking on buildkite and communicate via localhost | ||||
# between these sibling containers, so pass along the ip. | # between these sibling containers, so pass along the ip. | ||||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | return [ | ||||
), | ), | ||||
"popd", | "popd", | ||||
] | ] | ||||
# Some Dagster packages have more involved test configs or support only certain Python version; | # Some Dagster packages have more involved test configs or support only certain Python version; | ||||
# special-case those here | # special-case those here | ||||
DAGSTER_PACKAGES_WITH_CUSTOM_TESTS = [ | DAGSTER_PACKAGES_WITH_CUSTOM_TESTS = [ | ||||
# Examples: Airline Demo | |||||
ModuleBuildSpec( | |||||
"examples/airline_demo", | |||||
extra_cmds_fn=airline_demo_extra_cmds_fn, | |||||
buildkite_label="airline-demo", | |||||
), | |||||
ModuleBuildSpec( | ModuleBuildSpec( | ||||
"examples/dbt_example", | "examples/dbt_example", | ||||
extra_cmds_fn=dbt_example_extra_cmds_fn, | extra_cmds_fn=dbt_example_extra_cmds_fn, | ||||
buildkite_label="dbt_example", | buildkite_label="dbt_example", | ||||
upload_coverage=False, | upload_coverage=False, | ||||
), | ), | ||||
ModuleBuildSpec( | ModuleBuildSpec( | ||||
"examples/deploy_docker", | "examples/deploy_docker", | ||||
▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | |||||
def examples_tests(): | def examples_tests(): | ||||
"""Auto-discover and test all new examples""" | """Auto-discover and test all new examples""" | ||||
skip_examples = [ | skip_examples = [ | ||||
# Skip these folders because they need custom build config | # Skip these folders because they need custom build config | ||||
"docs_snippets", | "docs_snippets", | ||||
"legacy_examples", | "legacy_examples", | ||||
"airline_demo", | |||||
"dbt_example", | "dbt_example", | ||||
"deploy_docker", | "deploy_docker", | ||||
] | ] | ||||
examples_root = os.path.join(GIT_REPO_ROOT, "examples") | examples_root = os.path.join(GIT_REPO_ROOT, "examples") | ||||
examples_packages = [ | examples_packages = [ | ||||
os.path.join("examples", example) | os.path.join("examples", example) | ||||
▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines |