Skip to content
Snippets Groups Projects
Unverified Commit 643529aa authored by David Schmitt's avatar David Schmitt Committed by GitHub
Browse files

Merge pull request #293 from DavidS/os-and-install-support

Support setting `os` and `install` keys for appveyor and travis
parents faf9e8b7 6541322b
Branches
Tags
No related merge requests found
...@@ -78,6 +78,7 @@ Travis uses a .travis.yml file in the root of your repository to learn about you ...@@ -78,6 +78,7 @@ Travis uses a .travis.yml file in the root of your repository to learn about you
| Key | Description | | Key | Description |
| :------------- |:--------------| | :------------- |:--------------|
| os | Set to an array of operating systems to test. See the [TravisCI documentation](https://docs.travis-ci.com/user/multi-os/) for more details. |
| dist | If specified, it will set the dist attribute. See the [TravisCI documentation](https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system) for more details. | | dist | If specified, it will set the dist attribute. See the [TravisCI documentation](https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system) for more details. |
| simplecov |Set to `true` to enable collecting ruby code coverage.| | simplecov |Set to `true` to enable collecting ruby code coverage.|
| ruby\_versions |Define the ruby versions on which you want your builds to be executed.| | ruby\_versions |Define the ruby versions on which you want your builds to be executed.|
...@@ -90,6 +91,8 @@ Travis uses a .travis.yml file in the root of your repository to learn about you ...@@ -90,6 +91,8 @@ Travis uses a .travis.yml file in the root of your repository to learn about you
|docker_sets['collection]| This configures the `BEAKER_PUPPET_COLLECTION` to use when testing the docker instance. The default is `puppet6`. |docker_sets['collection]| This configures the `BEAKER_PUPPET_COLLECTION` to use when testing the docker instance. The default is `puppet6`.
|docker_defaults |Defines what values are used as default when using the `docker_sets` definition. Includes ruby version, sudo being enabled, the distro, the services, the env variables and the script to execute.| |docker_defaults |Defines what values are used as default when using the `docker_sets` definition. Includes ruby version, sudo being enabled, the distro, the services, the env variables and the script to execute.|
|stages |Allows the specification of order and conditions for travis-ci build stages. See [Specifying Stage Order and Conditions](https://docs.travis-ci.com/user/build-stages/#specifying-stage-order-and-conditions).| |stages |Allows the specification of order and conditions for travis-ci build stages. See [Specifying Stage Order and Conditions](https://docs.travis-ci.com/user/build-stages/#specifying-stage-order-and-conditions).|
|before_install_pre |Add install steps to the start of `before_install`. |
|before_install_post |Add install steps to the end of `before_install`. |
|includes |Ensures that the .travis file includes the following checks by default: Rubocop, Puppet Lint, Metadata Lint.| |includes |Ensures that the .travis file includes the following checks by default: Rubocop, Puppet Lint, Metadata Lint.|
|remove_includes |Allows you to remove includes set in `config_defaults.yml`.| |remove_includes |Allows you to remove includes set in `config_defaults.yml`.|
|branches |Allows you to specify the only branches that travis will run builds on. The default branches are `master` and `/^v\d/`. | |branches |Allows you to specify the only branches that travis will run builds on. The default branches are `master` and `/^v\d/`. |
...@@ -120,6 +123,8 @@ Travis uses a .travis.yml file in the root of your repository to learn about you ...@@ -120,6 +123,8 @@ Travis uses a .travis.yml file in the root of your repository to learn about you
| Key | Description | | Key | Description |
| :------------- |:--------------| | :------------- |:--------------|
|appveyor\_bundle\_install|Defines the bundle install command for the appveyor execution run. In our case we use bundle install `--without system_tests` as default, therefore avoiding redundant gem installation.| |appveyor\_bundle\_install|Defines the bundle install command for the appveyor execution run. In our case we use bundle install `--without system_tests` as default, therefore avoiding redundant gem installation.|
|install_pre |Add install steps to the start of `install`. |
|install_post |Add install steps to the end of `install`. |
|environment|Defines any environment variables wanted for the job run. In our case we default to the latest Puppet 4 gem version.| |environment|Defines any environment variables wanted for the job run. In our case we default to the latest Puppet 4 gem version.|
|matrix|This defines the matrix of jobs to be executed at runtime. Each defines environment variables for that specific job run. In our defaults we have a Ruby version specfied, followed by the check that will be run for that job.| |matrix|This defines the matrix of jobs to be executed at runtime. Each defines environment variables for that specific job run. In our defaults we have a Ruby version specfied, followed by the check that will be run for that job.|
|simplecov|Set to `true` to enable collecting ruby code coverage.| |simplecov|Set to `true` to enable collecting ruby code coverage.|
......
...@@ -14,6 +14,12 @@ ...@@ -14,6 +14,12 @@
end end
-%> -%>
--- ---
<% if @configs['os'] -%>
os:
<% @configs['os'].each do |os| -%>
- <%= os %>
<% end -%>
<% end -%>
<% if @configs['dist'] -%> <% if @configs['dist'] -%>
dist: <%= @configs['dist'] %> dist: <%= @configs['dist'] %>
<% else -%> <% else -%>
...@@ -36,11 +42,21 @@ addons: ...@@ -36,11 +42,21 @@ addons:
<% end -%> <% end -%>
<% end -%> <% end -%>
before_install: before_install:
<% if @configs['before_install_pre'] -%>
<% @configs['before_install_pre'].each do |bip| -%>
- <%= bip %>
<% end -%>
<% end -%>
- bundle -v - bundle -v
- rm -f Gemfile.lock - rm -f Gemfile.lock
- gem update --system $RUBYGEMS_VERSION - gem update --system $RUBYGEMS_VERSION
- gem --version - gem --version
- bundle -v - bundle -v
<% if @configs['before_install_post'] -%>
<% @configs['before_install_post'].each do |bip| -%>
- <%= bip %>
<% end -%>
<% end -%>
script: script:
<% if @configs['simplecov'] -%> <% if @configs['simplecov'] -%>
- 'SIMPLECOV=yes bundle exec rake $CHECK' - 'SIMPLECOV=yes bundle exec rake $CHECK'
......
...@@ -61,9 +61,19 @@ for: ...@@ -61,9 +61,19 @@ for:
matrix: matrix:
fast_finish: true fast_finish: true
install: install:
<% if @configs['install_pre'] -%>
<% @configs['install_pre'].each do |ip| -%>
- <%= ip %>
<% end -%>
<% end -%>
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- <%= @configs['appveyor_bundle_install'] %> - <%= @configs['appveyor_bundle_install'] %>
- type Gemfile.lock - type Gemfile.lock
<% if @configs['install_post'] -%>
<% @configs['install_post'].each do |ip| -%>
- <%= ip %>
<% end -%>
<% end -%>
build: off build: off
test_script: test_script:
- bundle exec puppet -V - bundle exec puppet -V
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment