![]() repo-url: The URL of your code repository.deployed-tag: The code branch or tag being deployed.source-branch: The code branch or tag being deployed.target-env: The environment to which code was just deployed.This is the same as the Acquia Cloud username for the site. Usage: post-code-deploy site target-env source-branch deployed-tag repo-url repo-type (The post-code-update hook runs after every code commit.) 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. This section defines the currently supported Cloud Hooks and the command-line arguments they receive. newrelic.sh: Example of Acquia Hosting Cloud Hook to notify New Relic API of code version deployments.rollback.sh: Run designated simpletest testing against a branch/tag and rollback on failure.drupal-tests.sh: Run Drupal simpletests.db-scrub.sh: Scrub important information from a Drupal database.update-db.sh: Run drush updatedb to perform database updates.post-files-copy.tmpl: Template for post-files-copy hook scripts.post-db-copy.tmpl: Template for post-db-copy hook scripts.post-code-update.tmpl: Template for post-code-update hook scripts.post-code-deploy.tmpl: Template for post-code-deploy hook scripts.Each script starts with comments explaining what it is for and how it works. The samples directory contains bare-bones example scripts for each of the supported hooks, plus a variety of useful user-contributed scripts. Git commit -m 'Add execute bit to my-hook.sh' Otherwise, to set the execute bit to a file already in your Git repo: If your script has the execute bit set when you first add it to Git, you're all set. Note that hook scripts must have the Unix "executable" bit in order to run. All stdout and stderr output from all the hooks that ran are displayed in the task log on the Workflow page. If one of the hook scripts exits with non-zero status, the remaining hook scripts are skipped, and the task is marked "failed" on the Workflow page so you know to check it. All scripts in the hook directory are run, in lexicographical (shell glob) order. is a program or shell script within the / directory.Įach time a hookable action occurs, Acquia Cloud runs scripts from the directory common/ and /. is a directory whose name is a Cloud Hook name: see below for supported hooks. is a directory whose name is an environment name: 'dev' for Development, 'test' for Staging, and 'prod' for Production, as well as 'common' for all environments. ![]() To install the correct directory structure and sample hook scripts, simply copy this repo into your Acquia Cloud repo. ![]() Cloud hooks live in the directory hooks NEXT TO docroot (not inside of docroot). In each branch of your repo, there is a directory named docroot that contains your site's source code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |