Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Travis configuration to test all node types. #97

Merged
merged 15 commits into from Oct 28, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Fix buildbot master pip installation

PR #132 added service_identity to a pip.installed state which was using
name instead of pkgs because it only had one package to install
(buildbot). Use pkgs instead everywhere and create a style guide.
  • Loading branch information
aneeshusa committed Oct 27, 2015
commit 032a7cba350c002ca8fcb865010e3b74010bdcdd
@@ -0,0 +1,34 @@
# Style Guide

Style guide for Salt states (and other code) in this repo. Unfortunately,
no linter exists yet for Salt states, so there is no automated way to
check for compliance with this guide.

## Package Installation

### Use pkgs instead of name

pkg.installed, pip.installed, and any other states which install packages
should use the ```pkgs``` option instead of the ```name``` option to specify
which package(s) to install, even if there is only one package. This prevents
problems when adding another package, as in #132 (fixed in #97). Adding another
name option will cause the earlier option to be silently swallowed, which can
be hard to debug. Using pkgs from the beginning ensures correct behavior
regardless of the number of packages.

*Unsafe*:

```salt
buildbot-dependencies:
pip.installed:
- name: buildbot == 0.8.12
```

*Better*:

```salt
buildbot-dependencies:
pip.installed:
- pkgs:
- buildbot == 0.8.12
```
@@ -1,7 +1,8 @@
buildbot:
pip.installed:
- name: buildbot == 0.8.12
- name: service_identity == 14.0.0
- pkgs:
- buildbot == 0.8.12
- service_identity == 14.0.0

txgithub:
pip.installed
@@ -12,6 +13,8 @@ boto:
buildbot-master:
service.running:
- enable: True
- require:
- pip: buildbot

/home/servo/buildbot/master:
file.recurse:
@@ -2,7 +2,8 @@
buildbot-slave.pip:
pip.installed:
- name: buildbot-slave == 0.8.12
- pkgs:
- buildbot-slave == 0.8.12
{{ common.servo_home }}/buildbot/slave:
file.recurse:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.