forked from acquia/blt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (81 loc) · 3.41 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
sudo: true
language: php
dist: trusty
php:
- 7.1
- 7.2
env:
global:
- DEPLOY_SOURCE_BRANCH=8.x
- COMPOSER_BIN=$TRAVIS_BUILD_DIR/vendor/bin
- BLT_DIR=$TRAVIS_BUILD_DIR
- IS_PULL_REQUEST=$TRAVIS_PULL_REQUEST
- BUILD_DIR=$TRAVIS_BUILD_DIR
- DRUPAL_CORE_HEAD=8.7.x-dev
matrix:
- DRUPAL_CORE_VERSION=default PHPUNIT_EXCLUDE_GROUP='long,requires-vm'
- DRUPAL_CORE_VERSION=default PHPUNIT_GROUP='long' PHPUNIT_EXCLUDE_GROUP='requires-vm'
# - DRUPAL_CORE_VERSION=$DRUPAL_CORE_HEAD
matrix:
allow_failures:
- env: DRUPAL_CORE_VERSION=$DRUPAL_CORE_HEAD
fast_finish: true
cache:
bundler: true
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.console"
- "$HOME/.drush/cache"
- "$HOME/.nvm"
- "/tmp/blt-sandbox-instance/.rules"
services:
- memcached
addons:
ssh_known_hosts: []
chrome: stable
before_install:
# Exit build early if only documentation was changed in a Pull Request.
- source ${BLT_DIR}/scripts/travis/exit_early
# Decrypt private SSH key id_rsa_blt.enc, save as ~/.ssh/id_rsa_blt.
- 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
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo service memcached status
- phpenv config-rm xdebug.ini
- phpenv config-add travis.php.ini
- composer self-update
- composer validate --no-check-all --ansi
- composer install
install:
- source ${BLT_DIR}/scripts/travis/setup_environment
# Create extra dbs for multisite testing.
- mysql -u root -e "CREATE DATABASE drupal2; GRANT ALL ON drupal2.* TO 'drupal'@'localhost';"
- mysql -u root -e "CREATE DATABASE drupal3; GRANT ALL ON drupal3.* TO 'drupal'@'localhost';"
- mysql -u root -e "CREATE DATABASE drupal4; GRANT ALL ON drupal4.* TO 'drupal'@'localhost';"
script:
- ${BLT_DIR}/vendor/bin/robo release:test
before_deploy:
- cd ${TRAVIS_BUILD_DIR}/../blted8
# The BLTed8 project will need its ssh_known_hosts configured to push to ACF.
- yaml-cli update:value .travis.yml addons.ssh_known_hosts.0 svn-5223.devcloud.hosting.acquia.com
# Add encrypted SSH key to BLTed8 project.
- yaml-cli update:value .travis.yml before_deploy.0 'openssl aes-256-cbc -K $encrypted_065fa5839cf8_key -iv $encrypted_065fa5839cf8_iv -in id_rsa_blted8.enc -out ~/.ssh/id_rsa -d; chmod 600 ~/.ssh/id_rsa; eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_rsa;'
- cp ${TRAVIS_BUILD_DIR}/id_rsa_blted8.enc .
# Remove the symlink definition for BLT from composer.json and require this specific commit for BLT.
- composer config --unset repositories.blt
- composer require acquia/blt:8.x-dev#${TRAVIS_COMMIT}
- composer update --lock
- echo "[![Build Status](https://travis-ci.org/acquia-pso/blted8.svg?branch=8.x)](https://travis-ci.org/acquia-pso/blted8)" >> README.md
- git add -A
- git commit -m "Automated commit for BLT repo by Travis CI for Build ${TRAVIS_BUILD_ID}" -n
after_success:
# - ./vendor/bin/coveralls -vvv
deploy:
- provider: script
# Deploys build artifact's source branch to acquia-pso/blted8 on GitHub.
script: ${BLT_DIR}/scripts/blt/ci/internal/deploy_blted8.sh
skip_cleanup: true
on:
branch: $DEPLOY_SOURCE_BRANCH
php: 7.1
condition: $DRUPAL_CORE_VERSION = default