@@ -11,6 +11,8 @@ matrix:
11
11
12
12
env :
13
13
- DEPLOY_SOURCE_BRANCH=8.x
14
+ - COMPOSER_BIN=$TRAVIS_BUILD_DIR/vendor/bin
15
+ - BLT_DIR=$TRAVIS_BUILD_DIR
14
16
15
17
cache :
16
18
bundler : true
@@ -22,53 +24,20 @@ cache:
22
24
- " $HOME/.nvm"
23
25
- " vendor"
24
26
25
- notifications :
26
- # slack: acquia:KKfgpOkDhcO26Erv5uoZMfdP
27
-
28
27
addons :
29
28
ssh_known_hosts :
30
29
- svn-5223.devcloud.hosting.acquia.com
31
30
32
31
before_install :
33
32
# Decrypt private SSH key id_rsa_blt.enc, save as ~/.ssh/id_rsa_blt.
34
33
- 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
47
35
48
36
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
66
38
67
39
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
72
41
73
42
script :
74
43
# Ensure code quality of 'blt' itself.
@@ -115,11 +84,11 @@ script:
115
84
# Deploy build artifact.
116
85
- blt deploy:build
117
86
# 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
119
88
120
89
deploy :
121
90
- 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
123
92
skip_cleanup : true
124
93
on :
125
94
branch : $DEPLOY_SOURCE_BRANCH
0 commit comments