Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit b9c1893

Browse files
committed
Modifying BLT's .travis.yml.
1 parent f1ae3fc commit b9c1893

File tree

6 files changed

+24
-51
lines changed

6 files changed

+24
-51
lines changed

.travis.yml

+7-38
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ matrix:
1111

1212
env:
1313
- DEPLOY_SOURCE_BRANCH=8.x
14+
- COMPOSER_BIN=$TRAVIS_BUILD_DIR/vendor/bin
15+
- BLT_DIR=$TRAVIS_BUILD_DIR
1416

1517
cache:
1618
bundler: true
@@ -22,53 +24,20 @@ cache:
2224
- "$HOME/.nvm"
2325
- "vendor"
2426

25-
notifications:
26-
# slack: acquia:KKfgpOkDhcO26Erv5uoZMfdP
27-
2827
addons:
2928
ssh_known_hosts:
3029
- svn-5223.devcloud.hosting.acquia.com
3130

3231
before_install:
3332
# Decrypt private SSH key id_rsa_blt.enc, save as ~/.ssh/id_rsa_blt.
3433
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then openssl aes-256-cbc -K $encrypted_c0b166e924da_key -iv $encrypted_c0b166e924da_iv -in id_rsa_blt.enc -out ~/.ssh/id_rsa -d; chmod 600 ~/.ssh/id_rsa; ls -lash ~/.ssh; eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_rsa; fi
35-
- composer selfupdate
36-
# Disable xdebug.
37-
- phpenv config-rm xdebug.ini
38-
# Enable $_ENV variables in PHP.
39-
- echo 'variables_order = "EGPCS"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
40-
# Ensure that always_populate_raw_post_data PHP setting: Not set to -1 does not happen.
41-
- echo "always_populate_raw_post_data = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
42-
# Set PHP memory limit to something more realistic.
43-
- echo "memory_limit=256M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
44-
- git config --global user.name "Travis-CI"
45-
- git config --global user.email "[email protected]"
46-
- mysql -u root -e "CREATE DATABASE drupal; CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'drupal'; GRANT ALL ON drupal.* TO 'drupal'@'localhost';"
34+
- $BLT_DIR/scripts/travis/before_install
4735

4836
install:
49-
# Load composer dependencies.
50-
- composer validate --no-check-all --ansi
51-
# Remove acquia packages from cache before running `composer install`.
52-
- rm -rf vendor/acquia
53-
- composer install -v
54-
- export PATH=$TRAVIS_BUILD_DIR/vendor/bin:$PATH
55-
# Install proper version of node for front end tasks.
56-
- nvm install 4.4.1
57-
- nvm use 4.4.1
58-
# Initialize xvfb (see https://docs.travis-ci.com/user/gui-and-headless-browsers)
59-
- sudo apt-get install xvfb
60-
- export DISPLAY=:99.0
61-
- sh -e /etc/init.d/xvfb start
62-
# Installs chromedriver to vendor/bin.
63-
- ./scripts/linux/install-chrome.sh $TRAVIS_BUILD_DIR/vendor/bin
64-
# Use JDK 8.
65-
- jdk_switcher use oraclejdk8
37+
- $BLT_DIR/scripts/travis/install
6638

6739
before_script:
68-
# Clear drush release history cache, to pick up new releases.
69-
- rm -f ~/.drush/cache/download/*---updates.drupal.org-release-history-*
70-
# Verify that no git diffs (caused by line ending variation) exist.
71-
- git diff --exit-code
40+
- $BLT_DIR/scripts/travis/before_script
7241

7342
script:
7443
# Ensure code quality of 'blt' itself.
@@ -115,11 +84,11 @@ script:
11584
# Deploy build artifact.
11685
- blt deploy:build
11786
# Run 'blt' phpunit tests, excluding deploy-push tests.
118-
- phpunit ../blt/tests/phpunit --group blt --exclude-group deploy-push
87+
- phpunit $BLT_DIR/tests/phpunit --group blt --exclude-group deploy-push
11988

12089
deploy:
12190
- provider: script
122-
script: blt deploy -Ddeploy.commitMsg="Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" -Ddeploy.branch="${DEPLOY_SOURCE_BRANCH}-build" && phpunit ../blt/tests/phpunit --group=deploy
91+
script: $BLT_DIR/scripts/travis/deploy_branch && phpunit $BLT_DIR/tests/phpunit --group=deploy
12392
skip_cleanup: true
12493
on:
12594
branch: $DEPLOY_SOURCE_BRANCH

scripts/travis/.travis.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ php:
99
matrix:
1010
fast_finish: true
1111

12+
env:
13+
- DEPLOY_SOURCE_BRANCH=8.x
14+
- COMPOSER_BIN=$TRAVIS_BUILD_DIR/vendor/bin
15+
- BLT_DIR=$TRAVIS_BUILD_DIR/vendor/acquia/blt
16+
1217
cache:
1318
bundler: true
1419
apt: true
@@ -32,32 +37,32 @@ notifications:
3237
# - slack: '<account>:<token>#[channel]'
3338

3439
before_install:
35-
- ./vendor/acquia/blt/scripts/travis/before_install
40+
- $BLT_DIR/scripts/travis/before_install
3641

3742
install:
38-
- ./vendor/acquia/blt/scripts/travis/install
43+
- $BLT_DIR/scripts/travis/install
3944

4045
before_script:
41-
- ./vendor/acquia/blt/scripts/travis/before_script
46+
- $BLT_DIR/scripts/travis/before_script
4247

4348
script:
44-
- ./vendor/acquia/blt/scripts/travis/script
49+
- $BLT_DIR/scripts/travis/script
4550

4651
deploy:
4752
- provider: script
48-
script: ./vendor/acquia/blt/scripts/travis/deploy_branch
53+
script: $BLT_DIR/scripts/travis/deploy_branch
4954
skip_cleanup: true
5055
on:
5156
branch: develop
5257
php: 5.6
5358
- provider: script
54-
script: ./vendor/acquia/blt/scripts/travis/deploy_branch
59+
script: $BLT_DIR/scripts/travis/deploy_branch
5560
skip_cleanup: true
5661
on:
5762
branch: master
5863
php: 5.6
5964
- provider: script
60-
script: ./vendor/acquia/blt/scripts/travis/deploy_tag
65+
script: $BLT_DIR/scripts/travis/deploy_tag
6166
skip_cleanup: true
6267
on:
6368
tags: true

scripts/travis/before_install

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
22

3-
# Enable aliases for non-interactive shell.
4-
shopt -s expand_aliases
53
composer selfupdate
64
# Disable xdebug.
75
phpenv config-rm xdebug.ini

scripts/travis/before_script

-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@
44
rm -f ~/.drush/cache/download/*---updates.drupal.org-release-history-*
55
# Verify that no git diffs (caused by line ending variation) exist.
66
# - git diff --exit-code
7-
# The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to run the site on Travis CI.
8-
yaml-cli update:value blt/project.yml project.local.hostname '127.0.0.1:8888'

scripts/travis/install

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
# Load composer dependencies.
44
composer validate --no-check-all --ansi
55
composer install
6-
export PATH=$TRAVIS_BUILD_DIR/vendor/bin:$PATH
6+
export PATH=$COMPOSER_BIN/vendor/bin:$PATH
77
# Install proper version of node for front end tasks.
88
nvm install 4.4.1
99
nvm use 4.4.1
1010
# Initialize xvfb (see https://docs.travis-ci.com/user/gui-and-headless-browsers)
11+
# sudo apt-get install xvfb
1112
export DISPLAY=:99.0
1213
sh -e /etc/init.d/xvfb start
1314
# Installs chromedriver to vendor/bin.
14-
./vendor/acquia/blt/scripts/linux/install-chrome.sh $TRAVIS_BUILD_DIR/vendor/bin
15+
$BLT_DIR/scripts/linux/install-chrome.sh $COMPOSER_BIN
1516
# Use JDK 8.
1617
jdk_switcher use oraclejdk8

scripts/travis/script

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/usr/bin/env bash
22

3+
# The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to run the site on Travis CI.
4+
yaml-cli update:value blt/project.yml project.local.hostname '127.0.0.1:8888'
35
blt -Dbehat.run-server=true -Dcreate_alias=false -Dbehat.launch-phantom=true ci:build:validate:test -Dblt.verbose=true

0 commit comments

Comments
 (0)