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

Adding pipelines WIP. #307

Merged
merged 1 commit into from
Aug 31, 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
43 changes: 43 additions & 0 deletions acquia-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: 1.0.0

events:
build:
steps:
# Install global libraries and set global configurations.
- setup-environment:
type: script
script:
- git config --global user.name "Acquia Cloud"
- git config --global user.email "noreply@acquia.com"
- sudo /etc/init.d/mysql start
- mysql -u root -proot -e "CREATE DATABASE drupal" -v

- setup-repository:
type: script
script:
- composer install
# Download, install, and use correct node version.
- nvm download 4.4.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NVM is not yet available

- nvm install 4.4.1
- nvm use 4.4.1

- run-tests:
type: script
script:
- export PATH=$PATH:$BUILD_DIR/vendor/bin
- drupal init
# The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to test the site.
- drupal yaml:update:value project.yml project.local.hostname '127.0.0.1:8888'
- blt -Dbehat.run-server=true -Dcreate_alias=false -Dbehat.launch-phantom=true ci:build:validate:test

- prepare-artifact:
type: script
script:
# Generate artifact in a separate directory.
- export NEW_BUILD_DIR=/tmp/artifact
- bltl deploy:build -Ddeploy.dir=$NEW_BUILD_DIR
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

# Copy git history to artifact directory. Required for pipelines to commit and push.
- cp -R $BUILD_DIR/.git $NEW_BUILD_DIR/
# Replace build directory with artifact.
- rm -rf $BUILD_DIR
- mv $NEW_BUILD_DIR $BUILD_DIR
6 changes: 5 additions & 1 deletion template/docroot/sites/default/settings/blt.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@
require_once DRUPAL_ROOT . '/sites/default/settings/local.settings.php';
}

// Load Acquia Pipeline settings.
if (getenv('PIPELINE_ENV') && file_exists(DRUPAL_ROOT . '/sites/default/settings/pipelines.settings.php')) {
require_once DRUPAL_ROOT . '/sites/default/settings/pipelines.settings.php';
}
// Load Travis CI settings.
if (getenv('TRAVIS') && file_exists(DRUPAL_ROOT . '/sites/default/settings/travis.settings.php')) {
elseif (getenv('TRAVIS') && file_exists(DRUPAL_ROOT . '/sites/default/settings/travis.settings.php')) {
require_once DRUPAL_ROOT . '/sites/default/settings/travis.settings.php';
}
// Load Tugboat settings.
Expand Down
16 changes: 16 additions & 0 deletions template/docroot/sites/default/settings/pipelines.settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

$databases = array(
'default' => array(
'default' => array(
'database' => 'drupal',
'username' => 'root',
'password' => 'root',
'host' => '127.0.0.1',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
'prefix' => '',
),
),
);