diff --git a/.travis.yml b/.travis.yml index e1dbe4484..aa6bc4a03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,6 +79,8 @@ script: - drupal yaml:update:value project.yml project.local.hostname '127.0.0.1:8888' # Running `blt init` modified composer.json, so we must update. - composer update + # Create a .travis.yml, just to make sure it works. It won't be executed. + - blt ci:travis:init # Call targets in the new 'blt-project' project. - blt ci:build:validate:test -Dcreate_alias=false -Dbehat.run-server=true -Dbehat.launch-phantom=true # Initialize ACSF config. diff --git a/readme/ci.md b/readme/ci.md index c7789cd3d..2ce635566 100644 --- a/readme/ci.md +++ b/readme/ci.md @@ -49,13 +49,12 @@ To set up this workflow, you must configure Acquia Cloud, GitHub, and Travis CI 1. Login to the new Acquia Cloud account and add the public SSH key from the key pair that was generated in step 1 by visiting `https://accounts.acquia.com/account/[uid]/security`. 1. Add the same public SSH key to the "Deployment Keys" section on your project's GitHub settings page, located at `https://github.com/acquia-pso/[project-name]/settings/keys`. **Note: You may not have direct access to these settings if you do not have administrative control over your repository.** 1. Add the _private SSH key_ to your project's Travis CI settings located at `https://magnum.travis-ci.com/acquia-pso/[project-name]/settings`. -1. Uncomment the example deployment steps in your .travis.yml file and customize them to deploy your desired branch. 1. Add your cloud git repository to the remotes section of your project.yml file: remotes: - example@svn-14671.prod.hosting.acquia.com:example.git` -1. Add your cloud git repository's server host name to `ssh_known_hosts` in your .travis.yml file. +1. Add your cloud git repository's server host name to `ssh_known_hosts` in your .travis.yml file. Take care to remove the user name and file name (example.git) and use only the hostname. addons: ssh_known_hosts: diff --git a/scripts/travis/.travis.yml b/scripts/travis/.travis.yml index dc88aa162..6e9c3ec48 100644 --- a/scripts/travis/.travis.yml +++ b/scripts/travis/.travis.yml @@ -63,10 +63,9 @@ before_script: script: - blt -Dbehat.run-server=true -Dcreate_alias=false -Dbehat.launch-phantom=true ci:build:validate:test -# Uncomment to enable automatic deployments following merges. deploy: - # provider: script - # script: blt deploy -Ddeploy.commitMsg="Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" -Ddeploy.branch="${TRAVIS_BRANCH}-build" - # skip_cleanup: true - # on: - # branch: master + provider: script + script: blt deploy -Ddeploy.commitMsg="Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" -Ddeploy.branch="${TRAVIS_BRANCH}-build" + skip_cleanup: true + on: + branch: master diff --git a/tests/phpunit/Blt/TravisCiTest.php b/tests/phpunit/Blt/TravisCiTest.php new file mode 100644 index 000000000..c0832b8dd --- /dev/null +++ b/tests/phpunit/Blt/TravisCiTest.php @@ -0,0 +1,21 @@ +assertFileExists($this->new_project_dir . '/.travis.yml'); + } + +}