Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #237: Document deploy excludes. #277

Merged
merged 1 commit into from
Aug 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions phing/tasks/deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@
<target name="deploy:commit">
<!-- We make these commands quiet because they can cause the output to be so long that Travis CI stops logging. -->
<exec command="git add -A" dir="${deploy.dir}" logoutput="true" passthru="true" checkreturn="true"/>
<!-- We are forcing vendor everywhere to add here in case a global git ignore flags it -->
<exec command="git add vendor -f" dir="${deploy.dir}" logoutput="true" passthru="true" checkreturn="true"/>
<exec command="git commit -m '${deploy.commitMsg}' --quiet" dir="${deploy.dir}" logoutput="true" passthru="true" checkreturn="true"/>
</target>

Expand Down Expand Up @@ -117,6 +115,8 @@
<target name="deploy:prepare-dir" description="Delete the existing deploy directory and re-initialize as an empty git repository.">
<delete dir="${deploy.dir}" failonerror="false" quiet="true" />
<exec command="git init ${deploy.dir}" logoutput="true" checkreturn="true"/>
<exec dir="${deploy.dir}" command="git config --local core.excludesfile false" logoutput="true" checkreturn="true"/>
<echo>Global .gitignore file is being disabled for this repository to prevent unexpected behavior.</echo>
</target>

<target name="deploy:push-all">
Expand Down
7 changes: 0 additions & 7 deletions readme/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ Integration with Travis CI is included, although Phing tasks can be used with an
1. `.travis.yml` is read and executed by Travis CI. The environment is built by installing composer dependencies.
1. Travis CI begins a a build and calls various Phing targets.

### Creating your own custom tasks

You may add your own custom tasks to the build engine by defining new [Phing](https://www.phing.info/) targets in [build/custom/phing/build.xml]
(custom/phing/build.xml).

You may override or define custom Phing properties in [build/custom/phing/build.yml](custom/phing/build.yml)

### Automated testing using live content

By default, the Travis CI automated tests install and test your site from scratch. Once you have a production site in a remote environment, it’s recommended to also run automated tests against a copy of your production database, especially in order to functionally test update hooks.
Expand Down
25 changes: 25 additions & 0 deletions readme/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,31 @@ blt deploy -Ddeploy.branch=develop-build -Ddeploy.commitMsg='BLT-123: The commit

This command will commit the artifact to the `develop-build` branch with the specified commit message and push it to the remotes defined in project.yml.

## Modifying the artifact

The artifact is built by:
* Rsyncing files from the repository root
* Re-building dependencies directly in the deploy directory. E.g., `composer install`

You can modify the build artifact in a few ways:

1. Change which files are rsynced to the artifact by providing your own `deploy.exclude_file` value in project.yml. See [upstream deploy-exclude.txt](https://github.com/acquia/blt/blob/8.x/phing/files/deploy-exclude.txt) for example contents. E.g.,

deploy:
exclude_file: ${repo.root}/blt/deploy/rsync-exclude.txt

1. Change which files are gitignored in the artifact by providing your own `deploy.gitignore_file` value in project.yml. See [upstream .gitignore](https://github.com/acquia/blt/blob/8.x/phing/files/.gitignore) for example contents. E.g.,

deploy:
gitignore_file: ${repo.root}/blt/deploy/.gitignore

1. Execute a custom command after the artifact by providing your own `target-hooks.post-deploy-build.dir` and `target-hooks.post-deploy-build.command` values in project.yml. E.g.,

# Executed after deployment artifact is created.
post-deploy-build:
dir: ${deploy.dir}/docroot/profiles/contrib/lightning
command: npm run install-libraries

### Debugging deployment artifacts

If you would like to create, commit, but _not push_ the artifact, you may do a dry run:
Expand Down