diff --git a/template/hooks/README.md b/template/hooks/README.md index 6fbf52db3..c9141daf6 100644 --- a/template/hooks/README.md +++ b/template/hooks/README.md @@ -8,10 +8,12 @@ This directory contains [Acquia Cloud hooks](https://docs.acquia.com/cloud/manag ├── common - contains hooks that will be executed for _all_ environments. ├── dev - contains hooks that will be executed for _dev_ environment. ├── prod - contains hooks that will be executed for _prod_ environment. - ├── samples - contains example Cloud Hooks. - ├── templates - contains templates, which may be cloned and used as a starting point for creating your own custom cloud hook scripts. └── test - contains hooks that will be executed for _test_ environment. -### Documentation +### Default hooks -For detailed information on how to implement these hooks, read the [documentation on Acquia.com](https://docs.acquia.com/cloud/manage/cloud-hooks) or visit the [Cloud Hook repository](https://github.com/acquia/cloud-hooks). +By default, BLT provides a post-code-update and post-code-deploy hook that runs the `deploy:update` target in all environments following a code deployment or update. + +### Documentation and additional examples + +For detailed information on how to implement these hooks, read the [documentation on Acquia.com](https://docs.acquia.com/cloud/manage/cloud-hooks) and find sample hooks in the [Cloud Hook repository](https://github.com/acquia/cloud-hooks). diff --git a/template/hooks/samples/domain_access/domain-fix.sh b/template/hooks/samples/domain_access/domain-fix.sh deleted file mode 100755 index 6b695b038..000000000 --- a/template/hooks/samples/domain_access/domain-fix.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env php - - * - * This file should be placed in /hooks/common/post-db-copy - * and will allow domains in domain_access module to be updated - * following database copy. This ensures no manual updates to - * the domains configuration are necessary after copying a db - * between environments. - */ - -$site = $argv[1]; -$env = $argv[2]; -$db = $argv[3]; -$source = $argv[4]; - -// First ensure the domain module is installed. We do this by checking -// existence of the domain table in the appropriate database. -$domain=`echo "SHOW TABLES LIKE 'domain'" | drush @$site.$env ah-sql-cli --db=$db"`; - -if (!$domain) { - $returns[] = "Domain module not installed, aborting"; -} -else { - - // Build a list of domains that require changing after the db has copied. - // Each element of the $domains array should be keyed the machine name - // and have key/value pairs of environment => URL. - $domains = array( - 'foo_com' => array( - 'dev' => 'dev.foo.com', - 'test' => 'stg.foo.com', - 'prod' => 'foo.com', - ), - 'bar_com' => array( - 'dev' => 'dev.bar.com', - 'test' => 'stg.bar.com', - 'prod' => 'bar.com', - ), - 'example_com' => array( - 'dev' => 'dev.example.com', - 'test' => 'stg.example.com', - 'prod' => 'example.com', - ), - ); - - // Iterate through the domains and update the record to the URL specified. - // If the domain machine name does not exist, the record will be skipped. - foreach ($domains as $domain => $info) { - if (isset($info[$env])) { - $to = $info[$env]; - $returns[] = "Updating domain table to update $domain to $to"; - echo "UPDATE domain SET subdomain = "$to" where machine_name = "$domain" | drush @$site.$env ah-sql-cli --db=$db"; - } - } -} - -// This output will be visible from the insights dashboard to reveal -// which domains have been updated. -foreach ($returns as $output) { - print "$output\n"; -} - diff --git a/template/hooks/samples/domain_access/readme.md b/template/hooks/samples/domain_access/readme.md deleted file mode 100644 index 186f8461b..000000000 --- a/template/hooks/samples/domain_access/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# Domain Access Update - -Author: Adam Malone - -### Purpose - -This cloud hook allows domains in domain_access module to be updated following -database copy. This ensures no manual updates to the domains configuration are -necessary after copying a db between environments. - -### Example Scenario - -### Installation Steps - -1. Place file in `/hooks/common/post-db-copy` diff --git a/template/hooks/samples/hipchat/README.md b/template/hooks/samples/hipchat/README.md deleted file mode 100644 index c8bc75a90..000000000 --- a/template/hooks/samples/hipchat/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# HipChat Notification - -Author: Grant Gaudet - -### Purpose - -This cloud hook posts a notification to a HipChat room after a code deployment -has been performed on Acquia Cloud. - -### Example Scenario - -1. A new tag is deployed to the production environment. -2. A HipChat notification is posted indicating that a tag has been deployed. - -### Installation Steps - -Installation Steps (assumes HipChat subscription setup and Acquia Cloud Hooks installed in repo): - -* See the API documentation at https://www.hipchat.com/docs/apiv2 and https://www.hipchat.com/docs/apiv2/method/send_room_notification -* Visit https://YOURCOMPANY.hipchat.com/rooms/tokens/ROOM_ID create your notification token `AUTH_TOKEN`. -* Store the AUTH_TOKEN and the ROOM_ID in `$HOME/hipchat_settings` file on your Acquia Cloud Server (see hipchat_settings file). -* Set the execution bit to on e.g. `chmod a+x hipchat_settings` -* Add `hipchat.sh` to dev, test, prod or common __post-cody-deploy__ hook. - - diff --git a/template/hooks/samples/hipchat/hipchat.sh b/template/hooks/samples/hipchat/hipchat.sh deleted file mode 100755 index 9387df3e9..000000000 --- a/template/hooks/samples/hipchat/hipchat.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# Cloud Hook: post-code-deploy -# -# The post-code-deploy hook is run whenever you use the Workflow page to -# deploy new code to an environment, either via drag-drop or by selecting -# an existing branch or tag from the Code drop-down list. See -# ../README.md for details. -# -# Usage: post-code-deploy site target-env source-branch deployed-tag repo-url -# repo-type - -site="$1" -target_env="$2" -source_branch="$3" -deployed_tag="$4" -repo_url="$5" -repo_type="$6" - -# Load the HipChat webhook URL (which is not stored in this repo). -. $HOME/hipchat_settings - -# Post deployment notice to HipChat - -if [ "$source_branch" != "$deployed_tag" ]; then - curl --header "content-type: application/json" --header "Authorization: Bearer $AUTH_TOKEN" -X POST \ - -d "{\"message\":\"An updated deployment has been made to $site.$target_env using branch $source_branch as $deployed_tag.\"}" $HIPCHAT_WEBHOOK_URL -else - curl --header "content-type: application/json" --header "Authorization: Bearer $AUTH_TOKEN" -X POST \ - -d "{\"message\":\"An updated deployment has been made to $site.$target_env using tag $deployed_tag.\"}" $HIPCHAT_WEBHOOK_URL -fi - - diff --git a/template/hooks/samples/hipchat/hipchat_settings b/template/hooks/samples/hipchat/hipchat_settings deleted file mode 100644 index b01cd1914..000000000 --- a/template/hooks/samples/hipchat/hipchat_settings +++ /dev/null @@ -1,4 +0,0 @@ -ROOM_ID=AAABBBAAA -AUTH_TOKEN=XXXYYYXXX - -HIPCHAT_WEBHOOK_URL=https://api.hipchat.com/v2/room/$ROOM_ID/notification \ No newline at end of file diff --git a/template/hooks/samples/newrelic/README.md b/template/hooks/samples/newrelic/README.md deleted file mode 100644 index 4d2a534fd..000000000 --- a/template/hooks/samples/newrelic/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# New Relic Deployment Notification - -Author: Erik Webb - -### Purpose - -This will post a message to New Relic's API when a new code deployment has been made -to an Acquia environment. This allows New Relic to plot releases onto performance -graphs. - -### Example Scenario - -1. A new tag is deployed to the production environment. -2. A POST request is sent to New Relic indicating when the given tag was deployed. -3. Deployment information is available on New Relic's graphs and charts. - -### Installation Steps (assumes New Relic subscription setup and Acquia Cloud Hooks installed in repo) - -* Login to New Relic and goto https://rpm.newrelic.com/accounts/(UserID)/applications/(ApplicationID)/deployments/instructions -* From the instructions get your `application_id` and your `x-api-key`. Store these variables and a username you wish to send to New Relic in `$HOME/newrelic_settings` file on your Acquia Cloud Server (see example file). -* Set the execution bit to on i.e. `chmod a+x newrelic_settings` -* Add `newrelic.sh` to dev, test, prod or common __post-cody-deploy__ hook. - - diff --git a/template/hooks/samples/newrelic/newrelic.sh b/template/hooks/samples/newrelic/newrelic.sh deleted file mode 100755 index 587408fa6..000000000 --- a/template/hooks/samples/newrelic/newrelic.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# This sample a Cloud Hook script to update New Relic whenever there is a new code deployment - -site=$1 # The site name. This is the same as the Acquia Cloud username for the site. -targetenv=$2 # The environment to which code was just deployed. -sourcebranch=$3 # The code branch or tag being deployed. -deployedtag=$4 # The code branch or tag being deployed. -repourl=$5 # The URL of your code repository. -repotype=$6 # The version control system your site is using; "git" or "svn". - - -#Load the New Relic APPID and APPKEY variables. -. $HOME/newrelic_settings - -curl -s -H "x-api-key:$APIKEY" -d "deployment[application_id]=$APPID" -d "deployment[host]=localhost" -d "deployment[description]=$deployedtag deployed to $site:$targetenv" -d "deployment[revision]=$deployedtag" -d "deployment[changelog]=$deployedtag deployed to $site:$targetenv" -d "deployment[user]=$username" https://rpm.newrelic.com/deployments.xml diff --git a/template/hooks/samples/newrelic/newrelic_settings b/template/hooks/samples/newrelic/newrelic_settings deleted file mode 100755 index 4141152f3..000000000 --- a/template/hooks/samples/newrelic/newrelic_settings +++ /dev/null @@ -1,3 +0,0 @@ -APIKEY='123456abcdefgh1234567890abcdefgh1234567890abc1234567890' -APPID='123456' -username='myname@mydomain.com' diff --git a/template/hooks/samples/rollback/README.md b/template/hooks/samples/rollback/README.md deleted file mode 100644 index 8269e606c..000000000 --- a/template/hooks/samples/rollback/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Code Deploy Rollback - -Author: Erik Webb - -### Purpose - -This hook utilizes the simpletest module to test code base during deployment and automatically -rollback to the last deployed set of code on test failure. Since pre-code-deploy hooks don't exist -yet we store original code source in the origsource variable in the rollback settings file stored in -the $HOME dir. This file also lists drush test-run tests to be run and the number of attempts to make -before giving up. - -### Example Scenario - -### Installation Steps - - -Installation Steps (assumes ah cloud hooks installed in Version Control Software) - -* Copy rollback.sh into your dev, stage, prod, or common hooks directory. -* SCP or SFTP rollback_settings to your $HOME dir on your Acquia Host Server. -* $TEST settings are available SimpleTests (or core Testing module in D7+). You may use '--all' for all tests (very slow). See http://drupal.org/simpletest for details. -* Edit rollback_settings to your existing code base ($ORIGSOURCE), test setting ($TEST) and number of attempts ($ATTEMPTS). Ensure execute bits are set on both files. (i.e. chmod a+x rollback_settings and chmod a+x rollback.sh) - - - diff --git a/template/hooks/samples/rollback/rollback.sh b/template/hooks/samples/rollback/rollback.sh deleted file mode 100755 index 333bd0a78..000000000 --- a/template/hooks/samples/rollback/rollback.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# -# Cloud Hook: tests_rollback -# -# Run Drupal simpletests in the target environment using drush test-run. On failure, -# rollback to last deployed code set -# -# implements Cloud_hook post_code_deploy -# @todo needs to have pre_code_deploy for proper handling of files. -# - - -site="$1" -target_env="$2" -sourcebranch=$3 # The code branch or tag being deployed. -deployedtag=$4 # The code branch or tag being deployed. -repourl=$5 # The URL of your code repository. -repotype=$6 # The version control system your site is using; "git" or "svn". - -#load variable settings from $HOME/rollback_settings -#Check rollback_settings exists; if not alert and exit -if [ -x "$HOME/rollback_settings" ]; then - . $HOME/rollback_settings - else - echo "rollback_settings file not found in $HOME or not able to include (check execution bit)" - exit 1 -fi - -#check attempts variable has any number of tries left. To prevent infinite loops. -if [ "$ATTEMPTS" -le 0 ]; then - echo "Maximum Number of attempts exceeded! Exiting." - exit 1 -fi - -#now set the variable and append it into the settings file. -ORIGATTEMPTS=$ATTEMPTS -let "ATTEMPTS-=1" -sed -i "s/ATTEMPTS=$ORIGATTEMPTS/ATTEMPTS=$ATTEMPTS/" $HOME/rollback_settings - -#initialize exit code so we can exit with 0 after rollback -extcode=0 - -# Enable the simpletest module if it is not already enabled. -simpletest=`drush @$site.$target_env pm-info simpletest | perl -F'/[\s:]+/' -lane '/Status/ && print $F[2]'` -if [ "$simpletest" = "disabled" ]; then - echo "Temporarily enabling simpletest module." - drush @$site.$target_env pm-enable simpletest --yes -fi - -# Run the tests. -CMD=`drush @$site.$target_env test-run $TESTS` - -#test output from drush -if [ $? -ne 0 ]; then - - #sanity check to make sure we have a $origsource to fall back to. - if [ $ORIGSOURCE ]; then - #if simpletests fail tell the user and launch a new job rolling back to the original source - echo "Testing failed on deploy rolling back to $ORIGSOURCE" - echo "Executing: drush @$site.$target_env ac-code-path-deploy $ORIGSOURCE" - drush @$site.$target_env ac-code-path-deploy $ORIGSOURCE - else #something is very wrong should never get here, if we do notify and quit. - echo "Cannot rollback. No fallback source identified." - exit 1 - fi - #set exitcode to fail so this code base does not deploy - extcode=1 - -else - - #simpletests passed! Inform user then clear and set rollback_settings to new code base - echo "Testing passed on deploy of $deployedtag" - sed -i "s/ORIGSOURCE=$ORIGSOURCE/ORIGSOURCE=$deployedtag/" $HOME/rollback_settings - extcode=0 - -fi - -# If we enabled simpletest, disable it. -if [ "$simpletest" = "disabled" ]; then - echo "Disabling simpletest module." - drush @$site.$target_env pm-disable simpletest --yes -fi - -#cleanly exit -exit $extcode - - - - - - diff --git a/template/hooks/samples/rollback/rollback_settings b/template/hooks/samples/rollback/rollback_settings deleted file mode 100755 index c4b71f862..000000000 --- a/template/hooks/samples/rollback/rollback_settings +++ /dev/null @@ -1,3 +0,0 @@ -ORIGSOURCE="master" -TESTS="UserRegistrationTestCase" -ATTEMPTS=3 diff --git a/template/hooks/samples/scrub/db-scrub-s3.sh b/template/hooks/samples/scrub/db-scrub-s3.sh deleted file mode 100755 index cbf721939..000000000 --- a/template/hooks/samples/scrub/db-scrub-s3.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# db-copy Cloud hook: db-scrub-s3 -# -# 1. Scrub important information from a Drupal database on copy into dev -# 2. Backup file to user home directory -# 3. Upload sanitized db to Amazon s3 bucket id -# -# Usage: db-scrub-s3.sh site target-env db-name source-env db-name source_env - -site="$1" -target_env="$2" -db_name="$3" -source_env="$4" -file=~/upload.sql -bucket=psotest - -#env check -if [ $2 == "dev" ]; then - - echo "$site.$target_env: Scrubbing database $db_name" - drush @$site.$target_env sql-sanitize -y - - drush @$site.$target_env sql-dump > $file - gzip -qf ~/upload.sql - - file=~/upload.sql.gz - - echo "uploading scrubbed database $file.tgz to s3" - - s3Key=XXXXXXXXXXXXXXXXXXXXXX - s3Secret=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - file=~/upload.sql.gz - bucket=psotest - resource="/${bucket}/${file}" - contentType="application/gzip" - dateValue=`date -u +"%a, %d %b %Y %k:%M:%S +0000"` - stringToSign="PUT\n\n${contentType}\n${dateValue}\n${resource}" - signature=`echo -en ${stringToSign} | openssl sha1 -hmac ${s3Secret} -binary | base64` - curl -X PUT -T "${file}" \ - -H "Host: ${bucket}.s3.amazonaws.com" \ - -H "Date: ${dateValue}" \ - -H "Content-Type: ${contentType}" \ - -H "Authorization: AWS ${s3Key}:${signature}" \ - https://${bucket}.s3.amazonaws.com/${file} - -fi - diff --git a/template/hooks/samples/scrub/db-scrub.sh b/template/hooks/samples/scrub/db-scrub.sh deleted file mode 100755 index a176461e6..000000000 --- a/template/hooks/samples/scrub/db-scrub.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -# -# db-copy Cloud hook: db-scrub -# -# Scrub important information from a Drupal database. -# -# Usage: db-scrub.sh site target-env db-name source-env - -site="$1" -target_env="$2" -db_name="$3" -source_env="$4" - -echo "$site.$target_env: Scrubbing database $db_name" - -(cat < 0); - --- don't leave e-mail addresses, etc in comments table. --- UPDATE comments SET name='Anonymous', mail='', homepage='http://example.com' WHERE uid=0; - --- Scrub webform submissions. --- UPDATE webform_submitted_data set data='*scrubbed*'; - --- remove sensitive customer data from custom module --- TRUNCATE custom_customer_lead_data; - --- USER PASSWORDS --- These statements assume you want to preserve real passwords for developers. Change 'rid=3' to the --- developer or test role you want to preserve. - --- DRUPAL 6 --- Remove passwords unless users have 'developer role' --- UPDATE users SET pass=md5('devpassword') WHERE uid IN (SELECT uid FROM users_roles WHERE rid=3) AND uid > 0; - --- Admin user should not be same but not really well known --- UPDATE users SET pass = MD5('supersecret!') WHERE uid = 1; - --- DRUPAL 7 --- Drupal 7 requires sites to generate a hashed password specific to their site. A script in the --- docroot/scripts directory is provided for doing this. From your docroot run the following: --- --- scripts/password-hash.sh password --- --- this will generate a hash for the password "password". In the following statements replace --- $REPLACE THIS$ with your generated hash. - --- Remove passwords unless users have 'developer role' --- UPDATE users SET pass='$REPLACE THIS$' WHERE uid IN (SELECT uid FROM users_roles WHERE rid=3) AND uid > 0; - --- Admin user should not be same but not really well known --- UPDATE users SET pass='$REPLACE THIS$' WHERE uid = 1; - --- TRUNCATE accesslog; --- TRUNCATE access; --- TRUNCATE cache; --- TRUNCATE cache_filter; --- TRUNCATE cache_menu; --- TRUNCATE cache_page; --- TRUNCATE cache_views; --- TRUNCATE cache_views_data; --- TRUNCATE devel_queries; --- TRUNCATE devel_times; --- TRUNCATE flood; --- TRUNCATE history; --- TRUNCATE search_dataset; --- TRUNCATE search_index; --- TRUNCATE search_total; --- TRUNCATE sessions; --- TRUNCATE watchdog; - - -EOF -) | drush @$site.$target_env ah-sql-cli --db=$db_name diff --git a/template/hooks/samples/scrub/readme.md b/template/hooks/samples/scrub/readme.md deleted file mode 100644 index 99fef978d..000000000 --- a/template/hooks/samples/scrub/readme.md +++ /dev/null @@ -1,20 +0,0 @@ -# Database Scrub - -Author: Erik Webb - -### Purpose - -Scrubs important information from a Drupal database. E.g., - -1. Remove all email addresses. -2. Scrub url aliases for non-admins -3. Scrub webform submissions. -4. Remove passwords -5. Truncate cache tables. - -### Example Scenario - -### Installation Steps - -1. Copy `db-scrub.sh` to `post-db-copy` for a given environment. -2. Set the execution bit to on e.g., `chmod a+x db-scrub.sh` diff --git a/template/hooks/samples/slack/README.md b/template/hooks/samples/slack/README.md deleted file mode 100644 index a432f11ee..000000000 --- a/template/hooks/samples/slack/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Slack Notification - -Author: Grant Gaudet - -### Purpose - -This cloud hook posts a notification to Slack chat room after a code deployment -has been performed on Acquia Cloud. - -### Example Scenario - -1. A new tag is deployed to the production environment. -2. A slack notification is posted indicating that a tag has been deployed. - -### Installation Steps - -Installation Steps (assumes Slack subscription setup and Acquia Cloud Hooks installed in repo): - -* See the API documentation at https://api.slack.com/ get your `TOKEN`. -* Store this variable in `$HOME/slack_settings` file on your Acquia Cloud Server (see slack_settings file). -* Set the execution bit to on e.g. `chmod a+x slack_settings` -* Add `slack.sh` to dev, test, prod or common __post-cody-deploy__ hook. - - diff --git a/template/hooks/samples/slack/slack.sh b/template/hooks/samples/slack/slack.sh deleted file mode 100755 index a05b809fc..000000000 --- a/template/hooks/samples/slack/slack.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Cloud Hook: post-code-deploy -# -# The post-code-deploy hook is run whenever you use the Workflow page to -# deploy new code to an environment, either via drag-drop or by selecting -# an existing branch or tag from the Code drop-down list. See -# ../README.md for details. -# -# Usage: post-code-deploy site target-env source-branch deployed-tag repo-url -# repo-type - -site="$1" -target_env="$2" -source_branch="$3" -deployed_tag="$4" -repo_url="$5" -repo_type="$6" - -# Load the Slack webhook URL (which is not stored in this repo). -. $HOME/slack_settings - -# Post deployment notice to Slack - -if [ "$source_branch" != "$deployed_tag" ]; then - curl -X POST --data-urlencode "payload={\"channel\": \"#your_channel\", \"username\": \"Acquia Cloud\", \"text\": \"An updated deployment has been made to *$site.$target_env* using branch *$source_branch* as *$deployed_tag*.\", \"icon_emoji\": \":acquiacloud:\"}" $SLACK_WEBHOOK_URL -else - curl -X POST --data-urlencode "payload={\"channel\": \"#your_channel\", \"username\": \"Acquia Cloud\", \"text\": \"An updated deployment has been made to *$site.$target_env* using tag *$deployed_tag*.\", \"icon_emoji\": \":acquiacloud:\"}" $SLACK_WEBHOOK_URL -fi diff --git a/template/hooks/samples/slack/slack_settings b/template/hooks/samples/slack/slack_settings deleted file mode 100644 index a79563512..000000000 --- a/template/hooks/samples/slack/slack_settings +++ /dev/null @@ -1,2 +0,0 @@ -TOKEN=yourtoken -SLACK_WEBHOOK_URL=https://yoursite.slack.com/services/hooks/incoming-webhook?token=$TOKEN \ No newline at end of file diff --git a/template/hooks/samples/tests/drupal-tests.sh b/template/hooks/samples/tests/drupal-tests.sh deleted file mode 100755 index 06c285cad..000000000 --- a/template/hooks/samples/tests/drupal-tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Cloud Hook: drupal-tests -# -# Run Drupal simpletests in the target environment using drush test-run. - -site="$1" -target_env="$2" - -# Select the tests to run. Run "drush help test-run" for options. -TESTS="UserRegistrationTestCase" -# To run all tests (very slow!), uncomment this line. -TESTS="--all" - -# Enable the simpletest module if it is not already enabled. -simpletest=`drush @$site.$target_env pm-info simpletest | perl -F'/[\s:]+/' -lane '/Status/ && print $F[2]'` -if [ "$simpletest" = "disabled" ]; then - echo "Temporarily enabling simpletest module." - drush @$site.$target_env pm-enable simpletest --yes -fi - -# Run the tests. -drush @$site.$target_env test-run $TESTS - -# If we enabled simpletest, disable it. -if [ "$simpletest" = "disabled" ]; then - echo "Disabling simpletest module." - drush @$site.$target_env pm-disable simpletest --yes -fi diff --git a/template/hooks/samples/tests/readme.md b/template/hooks/samples/tests/readme.md deleted file mode 100644 index 2c918059e..000000000 --- a/template/hooks/samples/tests/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -### Purpose - -### Example Scenario - -### Installation Steps diff --git a/template/hooks/templates/post-code-deploy.tmpl b/template/hooks/templates/post-code-deploy.tmpl deleted file mode 100755 index bd15d185c..000000000 --- a/template/hooks/templates/post-code-deploy.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# Cloud Hook: post-code-deploy -# -# The post-code-deploy hook is run whenever you use the Workflow page to -# deploy new code to an environment, either via drag-drop or by selecting -# an existing branch or tag from the Code drop-down list. See -# ../README.md for details. -# -# Usage: post-code-deploy site target-env source-branch deployed-tag repo-url -# repo-type - -site="$1" -target_env="$2" -source_branch="$3" -deployed_tag="$4" -repo_url="$5" -repo_type="$6" - -if [ "$source_branch" != "$deployed_tag" ]; then - echo "$site.$target_env: Deployed branch $source_branch as $deployed_tag." -else - echo "$site.$target_env: Deployed $deployed_tag." -fi diff --git a/template/hooks/templates/post-code-update.tmpl b/template/hooks/templates/post-code-update.tmpl deleted file mode 100755 index 8d6c26a25..000000000 --- a/template/hooks/templates/post-code-update.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# Cloud Hook: post-code-update -# -# The post-code-update hook runs in response to code commits. -# When you push commits to a Git branch, the post-code-update hooks runs for -# each environment that is currently running that branch.. See -# ../README.md for details. -# -# Usage: post-code-update site target-env source-branch deployed-tag repo-url -# repo-type - -site="$1" -target_env="$2" -source_branch="$3" -deployed_tag="$4" -repo_url="$5" -repo_type="$6" - - -if [ "$target_env" = 'dev' ]; then - echo "$site.$target_env: The $source_branch branch has been updated on $target_env. Clearing the cache." - drush @"$site".dev cc all -else - echo "$site.$target_env: The $source_branch branch has been updated on $target_env." -fi diff --git a/template/hooks/templates/post-db-copy.tmpl b/template/hooks/templates/post-db-copy.tmpl deleted file mode 100755 index 5f3b265a3..000000000 --- a/template/hooks/templates/post-db-copy.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# Cloud Hook: post-db-copy -# -# The post-db-copy hook is run whenever you use the Workflow page to copy a -# database from one environment to another. See ../README.md for -# details. -# -# Usage: post-db-copy site target-env db-name source-env - -site="$1" -target_env="$2" -db_name="$3" -source_env="$4" - -echo "$site.$target_env: Received copy of database $db_name from $source_env." diff --git a/template/hooks/templates/post-files-copy.tmpl b/template/hooks/templates/post-files-copy.tmpl deleted file mode 100755 index 04a69cd4b..000000000 --- a/template/hooks/templates/post-files-copy.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# Cloud Hook: post-files-copy -# -# The post-files-copy hook is run whenever you use the Workflow page to -# copy the files directory from one environment to another. See -# ../README.md for details. -# -# Usage: post-files-copy site target-env source-env - -site="$1" -target_env="$2" -source_env="$3" - -echo "$site.$target_env: Received copy of files from $source_env."