-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
167 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
assets: | ||
- deploy_key | ||
- db.sql.gz | ||
insecureStashDownload: true | ||
|
||
steps: | ||
- name: Install deploy key | ||
plugin: Script | ||
script: | | ||
mkdir -p ~/.ssh | ||
cp $ASSET_DIR/deploy_key ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
- name: 'Before install' | ||
plugin: Script | ||
script: | ||
- cd $SRC_DIR | ||
- "$SRC_DIR/blt/files/probo/setup_environment" | ||
- composer self-update | ||
- composer validate --no-check-all --ansi | ||
- composer install | ||
- composer run-script blt-alias | ||
|
||
- name: 'Import Drupal assets' | ||
plugin: Drupal | ||
drupalVersion: 8 | ||
subDirectory: docroot | ||
database: db.sql.gz | ||
databaseGzipped: true | ||
configSyncDirectory: '../config/default' | ||
|
||
- name: 'Setup project' | ||
plugin: Script | ||
script: | ||
- "$SRC_DIR/blt/files/probo/setup_project" | ||
|
||
- name: 'Run tests' | ||
plugin: Script | ||
script: | ||
- "$SRC_DIR/blt/files/probo/run_tests" | ||
|
||
- name: 'Deploy' | ||
plugin: Script | ||
script: | ||
- "$SRC_DIR/blt/files/probo/deploy_branch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ev | ||
|
||
# Add the git remote to known hosts | ||
$SRC_DIR/vendor/bin/yaml-cli get:value blt/project.yml git.remotes | cut -d@ -f2 | cut -d: -f1 >> ~/.ssh/known_hosts | ||
|
||
$SRC_DIR/vendor/bin/blt deploy --commit-msg "Automated commit by Probo CI for Build ${BUILD_ID}" --branch "${BRANCH_NAME}-build" --ignore-dirty --no-interaction -v | ||
|
||
set +v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ev | ||
|
||
# @TODO find a way of identifying if this is a tag build | ||
#blt deploy --commit-msg "Automated commit by Probo CI for Build ${BUILD_ID}" --tag "${BRANCH_NAME}-build" --ignore-dirty -v | ||
|
||
set +v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
$aliases['${project.machine_name}.ci'] = array( | ||
'uri' => $_ENV['PROBO_ENVIRONMENT'], | ||
'root' => $_ENV['SRC_DIR'] . '/docroot', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ev | ||
|
||
# The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to test the site. | ||
$SRC_DIR/vendor/bin/yaml-cli update:value $SRC_DIR/blt/project.yml project.local.hostname '127.0.0.1:8888' | ||
|
||
$SRC_DIR/vendor/bin/blt validate:all | ||
$SRC_DIR/vendor/bin/blt setup -D drush.alias='${drush.aliases.ci}' --no-interaction | ||
$SRC_DIR/vendor/bin/blt tests:all -D drush.alias='${drush.aliases.ci}' --define tests.run-server=true --yes -v | ||
|
||
set +v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ev | ||
|
||
# Allow MySQL to finish starting. | ||
sleep 3 | ||
|
||
export PATH="${SRC_DIR}/vendor/bin":$PATH | ||
|
||
# Install PHP 7 | ||
echo 'exit 0' > /usr/sbin/policy-rc.d | ||
apt-get update | ||
apt-get install -y software-properties-common language-pack-en-base | ||
LC_ALL=en_US.UTF-8 add-apt-repository -y ppa:ondrej/php | ||
apt-get update | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-gd php7.0-curl php7.0-json php7.0-mbstring php7.0-mysql php7.0-mcrypt php7.0-imagick php7.0-dev php7.0-gmp php7.0-xml php7.0-bcmath php7.0-redis php7.0-uploadprogress php7.0-soap php7.0-pgsql php7.0-bz2 | ||
|
||
# Create fake mailer. | ||
ln -s /bin/true /usr/sbin/sendmail | ||
echo 'max_execution_time = 120' >> /etc/php/7.0/cli/conf.d/probo.ini | ||
echo 'sendmail_path = /bin/true' >> /etc/php/7.0/cli/conf.d/probo.ini | ||
|
||
# Enable $_ENV variables in PHP. | ||
echo 'variables_order = "EGPCS"' >> /etc/php/7.0/cli/conf.d/probo.ini | ||
# Ensure that always_populate_raw_post_data PHP setting: Not set to -1 does not happen. | ||
echo "always_populate_raw_post_data = -1" >> /etc/php/7.0/cli/conf.d/probo.ini | ||
# Set PHP memory limit to something more realistic. | ||
echo "memory_limit=512M" >> /etc/php/7.0/cli/conf.d/probo.ini | ||
|
||
# Set git info. | ||
git config --global user.name "ProboCI" | ||
git config --global user.email "noreply@probo.ci" | ||
|
||
export DISPLAY=:99.0 | ||
|
||
set +v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ev | ||
|
||
set +v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' => 'strongpassword', | ||
'host' => 'localhost', | ||
'port' => '3306', | ||
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', | ||
'driver' => 'mysql', | ||
'prefix' => '', | ||
), | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters