diff --git a/README.md b/README.md index c32f9a7..e1f7cbb 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,10 @@ Sample scripts currently include: * post-code-update.tmpl: Template for post-code-update hook scripts. * post-db-copy.tmpl: Template for post-db-copy hook scripts. * post-files-copy.tmpl: Template for post-files-copy hook scripts. +* pre-site-wipe.tmpl: Template for pre-site-wipe hook scripts. +* post-site-wipe.tmpl: Template for post-site-wipe hook scripts. +* post-site-instance-duplicate.tmpl: Template for post-site-instance-duplicate hook scripts. +* post-site-associate.tmpl: Template for post-site-associate hook scripts. * update-db.sh: Run drush updatedb to perform database updates. * db-scrub.sh: Scrub important information from a Drupal database. * drupal-tests.sh: Run Drupal simpletests. @@ -156,3 +160,41 @@ Usage: post-files-copy site target-env source-env Example: When you use the Workflow page to drag files from Prod to Dev, the files-copy hook will be run like: post-files-copy mysite prod dev + +### pre-site-wipe + +The pre-site-wipe hook is run before a site's database and files are wiped from an environment. This allows you to perform backups or other preparatory actions before the site data is removed. + +Usage: pre-site-wipe app-name stage + +* app-name: The application name for the site. +* stage: The environment stage (dev, test, or prod) from which the site will be wiped. + +### post-site-wipe + +The post-site-wipe hook is run after a site's database and files have been wiped from an environment. This allows you to perform cleanup, notifications, or initialization of a fresh environment. + +Usage: post-site-wipe app-name stage + +* app-name: The application name for the site. +* stage: The environment stage (dev, test, or prod) from which the site was wiped. + +### post-site-instance-duplicate + +The post-site-instance-duplicate hook is run after a site instance has been duplicated to create a new environment. This allows you to perform post-duplication configuration, data scrubbing, or environment-specific setup. + +Usage: post-site-instance-duplicate app-name stage source-site-name + +* app-name: The application name for the target site. +* stage: The environment stage (dev, test, or prod) of the target environment. +* source-site-name: The name of the source site that was duplicated. + +### post-site-associate + +The post-site-associate hook is run after a site has been associated with an environment. This allows you to perform initialization tasks, configure environment-specific settings, or set up integrations. + +Usage: post-site-associate app-name stage site-name + +* app-name: The application name for the site. +* stage: The environment stage (dev, test, or prod) with which the site was associated. +* site-name: The name of the site that was associated. diff --git a/samples/post-site-associate.tmpl b/samples/post-site-associate.tmpl new file mode 100755 index 0000000..4d9d6e7 --- /dev/null +++ b/samples/post-site-associate.tmpl @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Cloud Hook: post-site-associate +# +# The post-site-associate hook is run after a site has been associated with +# an environment. This allows you to perform initialization tasks, configure +# environment-specific settings, or set up integrations. +# +# Usage: post-site-associate app-name stage site-name + +app_name="$1" +stage="$2" +site_name="$3" + +echo "$app_name.$stage: Site $site_name associated with environment." diff --git a/samples/post-site-instance-duplicate.tmpl b/samples/post-site-instance-duplicate.tmpl new file mode 100755 index 0000000..d5b54a8 --- /dev/null +++ b/samples/post-site-instance-duplicate.tmpl @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Cloud Hook: post-site-instance-duplicate +# +# The post-site-instance-duplicate hook is run after a site instance has been +# duplicated to create a new environment. This allows you to perform +# post-duplication configuration, data scrubbing, or environment-specific setup. +# +# Usage: post-site-instance-duplicate app-name stage source-site-name + +app_name="$1" +stage="$2" +source_site_name="$3" + +echo "$app_name.$stage: Site instance duplicated from $source_site_name." diff --git a/samples/post-site-wipe.tmpl b/samples/post-site-wipe.tmpl new file mode 100755 index 0000000..dd0a81a --- /dev/null +++ b/samples/post-site-wipe.tmpl @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Cloud Hook: post-site-wipe +# +# The post-site-wipe hook is run after a site's database and files have been +# wiped from an environment. This allows you to perform cleanup, notifications, +# or initialization of a fresh environment. +# +# Usage: post-site-wipe app-name stage + +app_name="$1" +stage="$2" + +echo "$app_name.$stage: Site wipe completed." diff --git a/samples/pre-site-wipe.tmpl b/samples/pre-site-wipe.tmpl new file mode 100755 index 0000000..7cbdcd3 --- /dev/null +++ b/samples/pre-site-wipe.tmpl @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Cloud Hook: pre-site-wipe +# +# The pre-site-wipe hook is run before a site's database and files are wiped +# from an environment. This allows you to perform backups or other preparatory +# actions before the site data is removed. +# +# Usage: pre-site-wipe app-name stage + +app_name="$1" +stage="$2" + +echo "$app_name.$stage: Preparing for site wipe."