2017 © Pedro Peláez
 

library example-drupal7-travis-composer

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

image

pantheon-systems/example-drupal7-travis-composer

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  • Friday, October 30, 2015
  • by greg.1.anderson
  • Repository
  • 34 Watchers
  • 15 Stars
  • 35 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 18 Forks
  • 2 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

About

This project utilizes the pantheon-systems/travis-scripts project in order to achieve the following things:, (*1)

  • Specify the Drupal modules, themes and libraries you use in a composer.json file, and build them with Composer.
  • Automatically build components via Travis every commit.
  • Use Behat to run tests on your site from Travis.
  • Automatically deploy your site to your Pantheon dev environment, or some other branch, every time the tests pass.

Create a New Project

Before you begin, you should first install composer., (*2)

There are two ways to quickly create a new project for your Drupal site, using this project as a template., (*3)

Via GitHub

The init-new-project script will set up the local files you will need, and commit them to your local git repository., (*4)

Via Composer

$ composer create-project pantheon-systems/example-drupal7-travis-composer my-new-project-name

The composer create-project will download the base files you need for your new project, then run the init-new-poroject script to set things up. The results are committed to a local git repository. You might wish to push your repository up to GitHub., (*5)

Configuration

Once you have created a new project, you will still need to do some customization steps to suit your particular needs. See the travis-scripts README for instructions on how to do this., (*6)

The folder 'scripts' contain some starting scripts that you may use to customize the environment you need for your tests., (*7)

Testing Locally

$ ./bin/local-test

The local-test script will set up a local Drupal site, run it with the PHP built-in webserver, and then run the Behat test suite. This is analagous to what happens on Travis on every commit., (*8)

Repository Management

You may place your custom modules and themes in drupal/sites/all/modules/custom and drupal/sites/all/themes/custom, respectively, and commit them to the same repository that contains your composer.json file., (*9)

If you prefer, you may instead create a Composer project for your custom components, and add them to your composer.json file. It is not necessary to make your code publicly accessible in order to do this; it is possible to create a local composer package definition that points to a private GitHub repository. See Creating your very own Composer Package for details on different ways to create composer packages., (*10)

Additional modules may be added using Composer:, (*11)

$ cd my-new-project-name
$ composer require drupal/devel '7.*'

This will put the specified module in sites/all/modules/contrib, and will also update your composer.json file with the information on the module that was just added., (*12)

The Versions

30/10 2015

dev-master

9999999-dev

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  Sources   Download

The Requires

 

The Development Requires

30/10 2015

1.3.3

1.3.3.0

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  Sources   Download

The Requires

 

The Development Requires

21/10 2015

1.3.2

1.3.2.0

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  Sources   Download

The Requires

 

The Development Requires

27/07 2015

1.3.1

1.3.1.0

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  Sources   Download

The Requires

 

The Development Requires

30/06 2015

1.3

1.3.0.0

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  Sources   Download

The Requires

 

24/06 2015

1.2

1.2.0.0

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  Sources   Download

The Development Requires

23/06 2015

1.1

1.1.0.0

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Use `composer create-project` to make your own project, or, if you prefer to clone the git repository, run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  Sources   Download

The Development Requires

23/06 2015

1.0

1.0.0.0

Template for creating a project to manage a Drupal site with Composer, and test with Travis CI. Run `composer install` followed by `bin/init-new-project` to replace this file and set up your starting project.

  Sources   Download

The Development Requires