Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Commit

Permalink
(MODULES-3945) Make travis.yaml more configurable
Browse files Browse the repository at this point in the history
As part of MODULES-3945 the travis configuration required the use of sudo, dist
and additional before_install steps.  Previously this is was not possible as the
modsync template was not setup.  This commit:
- Allows the sudo: and dist: settings to be overriden from the defaults of
  'false' and not defined respectively.
- Allows modules to specify additional before_install steps.  This is used in
  the powershell module to install Powershell in Travis prior to testing.

Note that this commit is backwards compatible as the new steps are opt-in and
preserve the pre-existing defaults.
  • Loading branch information
glennsarti committed Jan 4, 2018
1 parent 65530a4 commit c909057
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion moduleroot/.travis.yml.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#This file is generated by ModuleSync, do not edit.
---
sudo: false
sudo: <%= @configs['sudo'].nil? ? 'false' : @configs['sudo'] %>
<%= @configs['dist'].nil? ? '' : "dist: " + @configs['dist'] + "\n" -%>
language: ruby
cache: bundler
script: <%= @configs['script'] %>
<% if @configs['before_install'] -%>
before_install:
# Additional instructions
<% @configs['before_install'].each do |cmd| -%>
- <%= cmd %>
<% end -%>
<% end -%>
<% if @configs['env'] -%>
env:
<% if @configs['env']['global'] -%>
Expand Down

0 comments on commit c909057

Please sign in to comment.