diff --git a/docker/build.gradle b/docker/build.gradle index 088217b6f0..59abb7aaca 100644 --- a/docker/build.gradle +++ b/docker/build.gradle @@ -55,6 +55,18 @@ ext { DATAHUB_LOCAL_ACTIONS_ENV: "${rootProject.project(':smoke-test').projectDir}/test_resources/actions/actions.env" ] ], + 'quickstartCypress': [ + profile: 'debug', + modules: python_services_modules + backend_profile_modules + [':datahub-frontend', ':datahub-actions'], + isDebug: true, + additionalEnv: [ + DATAHUB_LOCAL_ACTIONS_ENV: "${rootProject.project(':smoke-test').projectDir}/test_resources/actions/actions.env" + ], + // Override project name for cypress dev environment + additionalConfig: [ + projectName: 'dh-cypress' + ] + ], 'quickstartDebugMin': [ profile: 'debug-min', modules: backend_profile_modules + [':datahub-frontend'], diff --git a/docker/profiles/README.md b/docker/profiles/README.md index 14ff8b8af5..a9c24b6419 100644 --- a/docker/profiles/README.md +++ b/docker/profiles/README.md @@ -14,6 +14,15 @@ $ cd docker/profiles $ docker compose --profile up ``` +Alternatively, you can use the gradle tasks defined in `docker/build.gradle`: + +```bash +# Run from the project root +./gradlew quickstart # Uses the 'quickstart' profile +./gradlew quickstartDebug # Uses the 'debug' profile +./gradlew quickstartCypress # Uses the 'debug' profile with custom project name 'dh-cypress' +``` + Use Control-c (`^c`) to terminate the running system. This will automatically stop all running containers. To remove the containers use the following: @@ -93,6 +102,18 @@ Run everything except for the `frontend` component. Useful for running just a lo Runs everything except for the GMS. Useful for running just a local (non-docker) GMS instance. +### `quickstartCypress` + +Runs the same configuration as `debug` but uses a custom project name (`dh-cypress`) instead of the default `datahub` project name. This is useful for Cypress testing scenarios where you need to isolate the docker compose project from other running instances. + +To load test data for Cypress testing, you can use the `:smoke-test:cypressData` gradle task: + +```bash +./gradlew :smoke-test:cypressData +``` + +This will populate the running DataHub instance with sample data suitable for Cypress testing scenarios. + ### Development Profiles Table | Profile Name | MySQL | Postgres | Cassandra | Neo4j | Frontend | GMS | Actions | SystemUpdate | MAE | MCE | Kafka | OpenSearch | Elasticsearch | Localstack (AWS) |