puppet-retrospec 0.7.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile +4 -4
- data/README.md +63 -81
- data/VERSION +1 -1
- data/bin/retrospec +8 -4
- data/lib/retrospec.rb +40 -9
- data/lib/retrospec/helpers.rb +36 -2
- data/lib/retrospec/puppet_module.rb +3 -1
- data/lib/retrospec/templates/clone-hook +39 -0
- data/lib/retrospec/version.rb +1 -1
- data/puppet-retrospec.gemspec +3 -44
- data/spec/unit/puppet-retrospec_spec.rb +4 -65
- metadata +3 -100
- data/lib/retrospec/templates/acceptance_spec_test.erb +0 -24
- data/lib/retrospec/templates/module_files/.fixtures.yml +0 -8
- data/lib/retrospec/templates/module_files/.gitignore.erb +0 -8
- data/lib/retrospec/templates/module_files/.travis.yml +0 -14
- data/lib/retrospec/templates/module_files/Gemfile +0 -27
- data/lib/retrospec/templates/module_files/README.markdown +0 -75
- data/lib/retrospec/templates/module_files/Rakefile +0 -72
- data/lib/retrospec/templates/module_files/Vagrantfile +0 -95
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/centos-59-x64.yml +0 -10
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/centos-64-x64-pe.yml +0 -12
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/centos-64-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/centos-66-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/debian-607-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/debian-70rc1-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/debian-73-i386.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/debian-73-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/default.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/fedora-18-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/sles-11sp1-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +0 -10
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +0 -10
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +0 -11
- data/lib/retrospec/templates/module_files/spec/shared_contexts.rb +0 -45
- data/lib/retrospec/templates/module_files/spec/spec_helper.rb +0 -11
- data/lib/retrospec/templates/module_files/spec/spec_helper_acceptance.rb +0 -33
- data/lib/retrospec/templates/resource_spec_file.erb +0 -45
- data/vendor/gems/puppet-3.7.3/COMMITTERS.md +0 -244
- data/vendor/gems/puppet-3.7.3/CONTRIBUTING.md +0 -91
- data/vendor/gems/puppet-3.7.3/README.md +0 -76
data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
HOSTS:
|
2
|
-
ubuntu-server-1310-x64:
|
3
|
-
roles:
|
4
|
-
- master
|
5
|
-
platform: ubuntu-13.10-amd64
|
6
|
-
box : ubuntu-server-1310-x64-vbox4210-nocm
|
7
|
-
box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-1310-x64-virtualbox-nocm.box
|
8
|
-
hypervisor : vagrant
|
9
|
-
CONFIG:
|
10
|
-
log_level : debug
|
11
|
-
type: git
|
data/lib/retrospec/templates/module_files/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
HOSTS:
|
2
|
-
ubuntu-server-1404-x64:
|
3
|
-
roles:
|
4
|
-
- master
|
5
|
-
platform: ubuntu-14.04-amd64
|
6
|
-
box : puppetlabs/ubuntu-14.04-64-nocm
|
7
|
-
box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
|
8
|
-
hypervisor : vagrant
|
9
|
-
CONFIG:
|
10
|
-
log_level : debug
|
11
|
-
type: git
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# optional, this should be the path to where the hiera data config file is in this repo
|
2
|
-
# You must update this if your actual hiera data lives inside your module.
|
3
|
-
# I only assume you have a separate repository for hieradata and its include in your .fixtures
|
4
|
-
hiera_config_file = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures','modules','hieradata', 'hiera.yaml'))
|
5
|
-
|
6
|
-
# hiera_config and hiera_data are mutually exclusive contexts.
|
7
|
-
|
8
|
-
shared_content :global_hiera_data do
|
9
|
-
let(:hiera_data) do
|
10
|
-
{
|
11
|
-
<% @all_hiera_data.sort.each do |key, value| -%>
|
12
|
-
#"<%= key %>" => '',
|
13
|
-
<% end %>
|
14
|
-
}
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
shared_context :hiera do
|
19
|
-
# example only,
|
20
|
-
let(:hiera_data) do
|
21
|
-
{:some_key => "some_value" }
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
shared_context :linux_hiera do
|
26
|
-
# example only,
|
27
|
-
let(:hiera_data) do
|
28
|
-
{:some_key => "some_value" }
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
# In case you want a more specific set of mocked hiera data for windows
|
33
|
-
shared_context :windows_hiera do
|
34
|
-
# example only,
|
35
|
-
let(:hiera_data) do
|
36
|
-
{:some_key => "some_value" }
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# you cannot use this in addition to any of the hiera_data contexts above
|
41
|
-
shared_context :real_hiera_data do
|
42
|
-
let(:hiera_config) do
|
43
|
-
hiera_config_file
|
44
|
-
end
|
45
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'puppetlabs_spec_helper/module_spec_helper'
|
2
|
-
require 'rspec-puppet-utils'
|
3
|
-
require 'hiera-puppet-helper'
|
4
|
-
|
5
|
-
# Uncomment this to show coverage report, also useful for debugging
|
6
|
-
#at_exit { RSpec::Puppet::Coverage.report! }
|
7
|
-
|
8
|
-
RSpec.configure do |c|
|
9
|
-
c.formatter = 'documentation'
|
10
|
-
c.mock_with :rspec
|
11
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'beaker-rspec'
|
2
|
-
|
3
|
-
UNSUPPORTED_PLATFORMS = [ 'Windows', 'Solaris', 'AIX' ]
|
4
|
-
|
5
|
-
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
|
6
|
-
# This will install the latest available package on el and deb based
|
7
|
-
# systems fail on windows and osx, and install via gem on other *nixes
|
8
|
-
foss_opts = { :default_action => 'gem_install' }
|
9
|
-
|
10
|
-
if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end
|
11
|
-
|
12
|
-
hosts.each do |host|
|
13
|
-
on hosts, "mkdir -p #{host['distmoduledir']}"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
RSpec.configure do |c|
|
18
|
-
# Project root
|
19
|
-
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
20
|
-
|
21
|
-
# Readable test descriptions
|
22
|
-
c.formatter = :documentation
|
23
|
-
|
24
|
-
# Configure all nodes in nodeset
|
25
|
-
c.before :suite do
|
26
|
-
hosts.each do |host|
|
27
|
-
# Install this module
|
28
|
-
copy_module_to(host, :source => proj_root, :module_name => '<%= @module_name %>')
|
29
|
-
# List other dependencies here so they are installed on the host
|
30
|
-
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'shared_contexts'
|
3
|
-
|
4
|
-
describe '<%= @type.name -%>' do
|
5
|
-
# by default the hiera integration uses hiera data from the shared_contexts.rb file
|
6
|
-
# but basically to mock hiera you first need to add a key/value pair
|
7
|
-
# to the specific context in the spec/shared_contexts.rb file
|
8
|
-
# Note: you can only use a single hiera context per describe/context block
|
9
|
-
# rspec-puppet does not allow you to swap out hiera data on a per test block
|
10
|
-
#include_context :hiera
|
11
|
-
|
12
|
-
<%- if @type.type == :definition -%>
|
13
|
-
let(:title) { 'XXreplace_meXX' }
|
14
|
-
<%- end -%>
|
15
|
-
|
16
|
-
# below is the facts hash that gives you the ability to mock
|
17
|
-
# facts on a per describe/context block. If you use a fact in your
|
18
|
-
# manifest you should mock the facts below.
|
19
|
-
let(:facts) do
|
20
|
-
{}
|
21
|
-
end
|
22
|
-
# below is a list of the resource parameters that you can override.
|
23
|
-
# By default all non-required parameters are commented out,
|
24
|
-
# while all required parameters will require you to add a value
|
25
|
-
let(:params) do
|
26
|
-
{
|
27
|
-
<%- @parameters.each do |k,v| -%>
|
28
|
-
<%- if v.nil? -%>
|
29
|
-
<%= ":#{k} => 'place_value_here'," %>
|
30
|
-
<%- else -%>
|
31
|
-
<%= "#:#{k} => #{variable_value(v)}," %>
|
32
|
-
<%- end -%>
|
33
|
-
<%- end -%>
|
34
|
-
}
|
35
|
-
end
|
36
|
-
# add these two lines in a single test block to enable puppet and hiera debug mode
|
37
|
-
# Puppet::Util::Log.level = :debug
|
38
|
-
# Puppet::Util::Log.newdestination(:console)
|
39
|
-
<%- @resources.each do |res| -%>
|
40
|
-
it do
|
41
|
-
is_expected.to contain_<%= res.type.gsub('::', '__')%>('<%= res.title %>').
|
42
|
-
with(<%= res.parameters.to_s.gsub(/\",/, "\",\n ") %>)
|
43
|
-
end
|
44
|
-
<%- end -%>
|
45
|
-
end
|
@@ -1,244 +0,0 @@
|
|
1
|
-
Committing changes to Puppet
|
2
|
-
====
|
3
|
-
|
4
|
-
We would like to make it easier for community members to contribute to Puppet
|
5
|
-
using pull requests, even if it makes the task of reviewing and committing
|
6
|
-
these changes a little harder. Pull requests are only ever based on a single
|
7
|
-
branch, however, we maintain more than one active branch. As a result
|
8
|
-
contributors should target their changes at the master branch. This makes the
|
9
|
-
process of contributing a little easier for the contributor since they don't
|
10
|
-
need to concern themselves with the question, "What branch do I base my changes
|
11
|
-
on?" This is already called out in the [CONTRIBUTING.md](http://goo.gl/XRH2J).
|
12
|
-
|
13
|
-
Therefore, it is the responsibility of the committer to re-base the change set
|
14
|
-
on the appropriate branch which should receive the contribution.
|
15
|
-
|
16
|
-
It is also the responsibility of the committer to review the change set in an
|
17
|
-
effort to make sure the end users must opt-in to new behavior that is
|
18
|
-
incompatible with previous behavior. We employ the use of [feature
|
19
|
-
flags](http://stackoverflow.com/questions/7707383/what-is-a-feature-flag) as
|
20
|
-
the primary way to achieve this user opt-in behavior. Finally, it is the
|
21
|
-
responsibility of the committer to make sure the `master` and `stable` branches
|
22
|
-
are both clean and working at all times. Clean means that dead code is not
|
23
|
-
allowed, everything needs to be usable in some manner at all points in time.
|
24
|
-
Stable is not an indication of the build status, but rather an expression of
|
25
|
-
our intent that the `stable` branch does not receive new functionality.
|
26
|
-
|
27
|
-
The rest of this document addresses the concerns of the committer. This
|
28
|
-
document will help guide the committer decide which branch to base, or re-base
|
29
|
-
a contribution on top of. This document also describes our branch management
|
30
|
-
strategy, which is closely related to the decision of what branch to commit
|
31
|
-
changes into.
|
32
|
-
|
33
|
-
Terminology
|
34
|
-
====
|
35
|
-
|
36
|
-
Many of these terms have more than one meaning. For the purposes of this
|
37
|
-
document, the following terms refer to specific things.
|
38
|
-
|
39
|
-
**contributor** - A person who makes a change to Puppet and submits a change
|
40
|
-
set in the form of a pull request.
|
41
|
-
|
42
|
-
**change set** - A set of discrete patches which combined together form a
|
43
|
-
contribution. A change set takes the form of Git commits and is submitted to
|
44
|
-
Puppet in the form of a pull request.
|
45
|
-
|
46
|
-
**committer** - A person responsible for reviewing a pull request and then
|
47
|
-
making the decision what base branch to merge the change set into.
|
48
|
-
|
49
|
-
**base branch** - A branch in Git that contains an active history of changes
|
50
|
-
and will eventually be released using semantic version guidelines. The branch
|
51
|
-
named `master` will always exist as a base branch. The other base branches are
|
52
|
-
`stable`, and `security` described below.
|
53
|
-
|
54
|
-
**master branch** - The branch where new functionality that are not bug fixes
|
55
|
-
is merged.
|
56
|
-
|
57
|
-
**stable branch** - The branch where bug fixes against the latest release or
|
58
|
-
release candidate are merged.
|
59
|
-
|
60
|
-
**security** - Where critical security fixes are merged. These change sets
|
61
|
-
will then be merged into release branches independently from one another. (i.e.
|
62
|
-
no merging up). Please do not submit pull requests against the security branch
|
63
|
-
and instead report all security related issues to security@puppetlabs.com as
|
64
|
-
per our security policy published at
|
65
|
-
[https://puppetlabs.com/security/](https://puppetlabs.com/security/).
|
66
|
-
|
67
|
-
Committer Guide
|
68
|
-
====
|
69
|
-
|
70
|
-
This section provides a guide to follow while committing change sets to Puppet
|
71
|
-
base branches.
|
72
|
-
|
73
|
-
How to decide what release(s) should be patched
|
74
|
-
---
|
75
|
-
|
76
|
-
This section provides a guide to help a committer decide the specific base
|
77
|
-
branch that a change set should be merged into.
|
78
|
-
|
79
|
-
The latest minor release of a major release is the only base branch that should
|
80
|
-
be patched. These patches will be merged into `master` if they contain new
|
81
|
-
functionality. They will be merged into `stable` and `master` if they fix a
|
82
|
-
critical bug. Older minor releases in a major release do not get patched.
|
83
|
-
|
84
|
-
Before the switch to [semantic versions](http://semver.org/) committers did not
|
85
|
-
have to think about the difference between minor and major releases.
|
86
|
-
Committing to the latest minor release of a major release is a policy intended
|
87
|
-
to limit the number of active base branches that must be managed.
|
88
|
-
|
89
|
-
Security patches are handled as a special case. Security patches may be
|
90
|
-
applied to earlier minor releases of a major release, but the patches should
|
91
|
-
first be merged into the `security` branch. Security patches should be merged
|
92
|
-
by Puppet Labs staff members. Pull requests should not be submitted with the
|
93
|
-
security branch as the base branch. Please send all security related
|
94
|
-
information or patches to security@puppetlabs.com as per our [Security
|
95
|
-
Policy](https://puppetlabs.com/security/).
|
96
|
-
|
97
|
-
The CI systems are configured to run against `master` and `stable`. Over time,
|
98
|
-
these branches will refer to different versions, but their name will remain
|
99
|
-
fixed to avoid having to update CI jobs and tasks as new versions are released.
|
100
|
-
|
101
|
-
How to commit a change set to multiple base branches
|
102
|
-
---
|
103
|
-
|
104
|
-
A change set may apply to multiple branches, for example a bug fix should be
|
105
|
-
applied to the stable release and the development branch. In this situation
|
106
|
-
the change set needs to be committed to multiple base branches. This section
|
107
|
-
provides a guide for how to merge patches into these branches, e.g.
|
108
|
-
`stable` is patched, how should the changes be applied to `master`?
|
109
|
-
|
110
|
-
First, rebase the change set onto the `stable` branch. Next, merge the change
|
111
|
-
set into the `stable` branch using a merge commit. Once merged into `stable`,
|
112
|
-
merge the same change set into `master` without doing a rebase as to preserve
|
113
|
-
the commit identifiers. This merge strategy follows the [git
|
114
|
-
flow](http://nvie.com/posts/a-successful-git-branching-model/) model. Both of
|
115
|
-
these change set merges should have a merge commit which makes it much easier
|
116
|
-
to track a set of commits as a logical change set through the history of a
|
117
|
-
branch. Merge commits should be created using the `--no-ff --log` git merge
|
118
|
-
options.
|
119
|
-
|
120
|
-
Any merge conflicts should be resolved using the merge commit in order to
|
121
|
-
preserve the commit identifiers for each individual change. This ensures `git
|
122
|
-
branch --contains` will accurately report all of the base branches which
|
123
|
-
contain a specific patch.
|
124
|
-
|
125
|
-
Using this strategy, the stable branch need not be reset. Both `master` and
|
126
|
-
`stable` have infinite lifetimes. Patch versions, also known as bug fix
|
127
|
-
releases, will be tagged and released directly from the `stable` branch. Major
|
128
|
-
and minor versions, also known as feature releases, will be tagged and released
|
129
|
-
directly from the `master` branch. Upon release of a new major or minor
|
130
|
-
version all of the changes in the `master` branch will be merged into the
|
131
|
-
`stable` branch.
|
132
|
-
|
133
|
-
Code review checklist
|
134
|
-
---
|
135
|
-
|
136
|
-
This section aims to provide a checklist of things to look for when reviewing a
|
137
|
-
pull request and determining if the change set should be merged into a base
|
138
|
-
branch:
|
139
|
-
|
140
|
-
* All tests pass
|
141
|
-
* Are there any platform gotchas? (Does a change make an assumption about
|
142
|
-
platform specific behavior that is incompatible with other platforms? e.g.
|
143
|
-
Windows paths vs. POSIX paths.)
|
144
|
-
* Is the change backwards compatible? (It should be)
|
145
|
-
* Are there YARD docs for API changes?
|
146
|
-
* Does the change set also require documentation changes? If so is the
|
147
|
-
documentation being kept up to date?
|
148
|
-
* Does the change set include clean code? (software code that is formatted
|
149
|
-
correctly and in an organized manner so that another coder can easily read
|
150
|
-
or modify it.) HINT: `git diff master --check`
|
151
|
-
* Does the change set conform to the contributing guide?
|
152
|
-
|
153
|
-
Commit citizen guidelines:
|
154
|
-
---
|
155
|
-
|
156
|
-
This section aims to provide guidelines for being a good commit citizen by
|
157
|
-
paying attention to our automated build tools.
|
158
|
-
|
159
|
-
* Don’t push on a broken build. (A broken build is defined as a failing job
|
160
|
-
in the [Puppet FOSS](https://jenkins.puppetlabs.com/view/Puppet%20FOSS/)
|
161
|
-
page.)
|
162
|
-
* Watch the build until your changes have gone through green
|
163
|
-
* Update the ticket status and target version. The target version field in
|
164
|
-
our issue tracker should be updated to be the next release of Puppet. For
|
165
|
-
example, if the most recent release of Puppet is 3.1.1 and you merge a
|
166
|
-
backwards compatible change set into master, then the target version should
|
167
|
-
be 3.2.0 in the issue tracker.)
|
168
|
-
* Ensure the pull request is closed (Hint: amend your merge commit to contain
|
169
|
-
the string `closes #123` where 123 is the pull request number and github
|
170
|
-
will automatically close the pull request when the branch is pushed.)
|
171
|
-
|
172
|
-
Example Procedure
|
173
|
-
====
|
174
|
-
|
175
|
-
This section helps a committer rebase a contribution onto an earlier base
|
176
|
-
branch, then merge into the base branch and up through all active base
|
177
|
-
branches.
|
178
|
-
|
179
|
-
Suppose a contributor submits a pull request based on master. The change set
|
180
|
-
fixes a bug reported against Puppet 3.1.1 which is the most recently released
|
181
|
-
version of Puppet.
|
182
|
-
|
183
|
-
In this example the committer should rebase the change set onto the `stable`
|
184
|
-
branch since this is a bug rather than new functionality.
|
185
|
-
|
186
|
-
First, the committer pulls down the branch using the `hub` gem. This tool
|
187
|
-
automates the process of adding the remote repository and creating a local
|
188
|
-
branch to track the remote branch.
|
189
|
-
|
190
|
-
$ hub checkout https://github.com/puppetlabs/puppet/pull/1234
|
191
|
-
Branch jeffmccune-fix_foo_error set up to track remote branch fix_foo_error from jeffmccune.
|
192
|
-
Switched to a new branch 'jeffmccune-fix_foo_error'
|
193
|
-
|
194
|
-
At this point the topic branch is a descendant of master, but we want it to
|
195
|
-
descend from `stable`. The committer rebases the change set onto `stable`.
|
196
|
-
|
197
|
-
$ git branch bug/stable/fix_foo_error
|
198
|
-
$ git rebase --onto stable master bug/stable/fix_foo_error
|
199
|
-
First, rewinding head to replay your work on top of it...
|
200
|
-
Applying: (#23456) Fix FooError that always bites users in 3.1.1
|
201
|
-
|
202
|
-
The `git rebase` command may be interpreted as, "First, check out the branch
|
203
|
-
named `bug/stable/fix_foo_error`, then take the changes that were previously
|
204
|
-
based on `master` and re-base them onto `stable`.
|
205
|
-
|
206
|
-
Now that we have a topic branch containing the change set based on the `stable`
|
207
|
-
release branch, the committer merges in:
|
208
|
-
|
209
|
-
$ git checkout stable
|
210
|
-
Switched to branch 'stable'
|
211
|
-
$ git merge --no-ff --log bug/stable/fix_foo_error
|
212
|
-
Merge made by the 'recursive' strategy.
|
213
|
-
foo | 0
|
214
|
-
1 file changed, 0 insertions(+), 0 deletions(-)
|
215
|
-
create mode 100644 foo
|
216
|
-
|
217
|
-
Once merged into the first base branch, the committer merges the `stable`
|
218
|
-
branch into `master`, being careful to preserve the same commit identifiers.
|
219
|
-
|
220
|
-
$ git checkout master
|
221
|
-
Switched to branch 'master'
|
222
|
-
$ git merge --no-ff --log stable
|
223
|
-
Merge made by the 'recursive' strategy.
|
224
|
-
foo | 0
|
225
|
-
1 file changed, 0 insertions(+), 0 deletions(-)
|
226
|
-
create mode 100644 foo
|
227
|
-
|
228
|
-
Once the change set has been merged into one base branch, the change set should
|
229
|
-
not be modified in order to keep the history clean, avoid "double" commits, and
|
230
|
-
preserve the usefulness of `git branch --contains`. If there are any merge
|
231
|
-
conflicts, they are to be resolved in the merge commit itself and not by
|
232
|
-
re-writing (rebasing) the patches for one base branch, but not another.
|
233
|
-
|
234
|
-
Once the change set has been merged into `stable` and into `master`, the
|
235
|
-
committer pushes. Please note, the checklist should be complete at this point.
|
236
|
-
It's helpful to make sure your local branches are up to date to avoid one of
|
237
|
-
the branches failing to fast forward while the other succeeds. Both the
|
238
|
-
`stable` and `master` branches are being pushed at the same time.
|
239
|
-
|
240
|
-
$ git push puppetlabs master:master stable:stable
|
241
|
-
|
242
|
-
That's it! The committer then updates the pull request, updates the issue in
|
243
|
-
our issue tracker, and keeps an eye on the [build
|
244
|
-
status](http://jenkins.puppetlabs.com).
|
@@ -1,91 +0,0 @@
|
|
1
|
-
# How to contribute
|
2
|
-
|
3
|
-
Third-party patches are essential for keeping puppet great. We simply can't
|
4
|
-
access the huge number of platforms and myriad configurations for running
|
5
|
-
puppet. We want to keep it as easy as possible to contribute changes that
|
6
|
-
get things working in your environment. There are a few guidelines that we
|
7
|
-
need contributors to follow so that we can have a chance of keeping on
|
8
|
-
top of things.
|
9
|
-
|
10
|
-
## Getting Started
|
11
|
-
|
12
|
-
* Make sure you have a [Jira account](http://tickets.puppetlabs.com)
|
13
|
-
* Make sure you have a [GitHub account](https://github.com/signup/free)
|
14
|
-
* Submit a ticket for your issue, assuming one does not already exist.
|
15
|
-
* Clearly describe the issue including steps to reproduce when it is a bug.
|
16
|
-
* Make sure you fill in the earliest version that you know has the issue.
|
17
|
-
* Fork the repository on GitHub
|
18
|
-
|
19
|
-
## Making Changes
|
20
|
-
|
21
|
-
* Create a topic branch from where you want to base your work.
|
22
|
-
* This is usually the master branch.
|
23
|
-
* Only target release branches if you are certain your fix must be on that
|
24
|
-
branch.
|
25
|
-
* To quickly create a topic branch based on master; `git checkout -b
|
26
|
-
fix/master/my_contribution master`. Please avoid working directly on the
|
27
|
-
`master` branch.
|
28
|
-
* Make commits of logical units.
|
29
|
-
* Check for unnecessary whitespace with `git diff --check` before committing.
|
30
|
-
* Make sure your commit messages are in the proper format.
|
31
|
-
|
32
|
-
````
|
33
|
-
(PUP-1234) Make the example in CONTRIBUTING imperative and concrete
|
34
|
-
|
35
|
-
Without this patch applied the example commit message in the CONTRIBUTING
|
36
|
-
document is not a concrete example. This is a problem because the
|
37
|
-
contributor is left to imagine what the commit message should look like
|
38
|
-
based on a description rather than an example. This patch fixes the
|
39
|
-
problem by making the example concrete and imperative.
|
40
|
-
|
41
|
-
The first line is a real life imperative statement with a ticket number
|
42
|
-
from our issue tracker. The body describes the behavior without the patch,
|
43
|
-
why this is a problem, and how the patch fixes the problem when applied.
|
44
|
-
````
|
45
|
-
|
46
|
-
* Make sure you have added the necessary tests for your changes.
|
47
|
-
* Run _all_ the tests to assure nothing else was accidentally broken.
|
48
|
-
|
49
|
-
## Making Trivial Changes
|
50
|
-
|
51
|
-
### Documentation
|
52
|
-
|
53
|
-
For changes of a trivial nature to comments and documentation, it is not
|
54
|
-
always necessary to create a new ticket in Jira. In this case, it is
|
55
|
-
appropriate to start the first line of a commit with '(doc)' instead of
|
56
|
-
a ticket number.
|
57
|
-
|
58
|
-
````
|
59
|
-
(doc) Add documentation commit example to CONTRIBUTING
|
60
|
-
|
61
|
-
There is no example for contributing a documentation commit
|
62
|
-
to the Puppet repository. This is a problem because the contributor
|
63
|
-
is left to assume how a commit of this nature may appear.
|
64
|
-
|
65
|
-
The first line is a real life imperative statement with '(doc)' in
|
66
|
-
place of what would have been the ticket number in a
|
67
|
-
non-documentation related commit. The body describes the nature of
|
68
|
-
the new documentation or comments added.
|
69
|
-
````
|
70
|
-
|
71
|
-
## Submitting Changes
|
72
|
-
|
73
|
-
* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla).
|
74
|
-
* Push your changes to a topic branch in your fork of the repository.
|
75
|
-
* Submit a pull request to the repository in the puppetlabs organization.
|
76
|
-
* Update your Jira ticket to mark that you have submitted code and are ready for it to be reviewed (Status: Ready for Merge).
|
77
|
-
* Include a link to the pull request in the ticket.
|
78
|
-
* The core team looks at Pull Requests on a regular basis in a weekly triage
|
79
|
-
meeting that we hold in a public Google Hangout. The hangout is announced in
|
80
|
-
the weekly status updates that are sent to the puppet-dev list.
|
81
|
-
* After feedback has been given we expect responses within two weeks. After two
|
82
|
-
weeks will may close the pull request if it isn't showing any activity.
|
83
|
-
|
84
|
-
# Additional Resources
|
85
|
-
|
86
|
-
* [More information on contributing](http://links.puppetlabs.com/contribute-to-puppet)
|
87
|
-
* [Bug tracker (Jira)](http://tickets.puppetlabs.com)
|
88
|
-
* [Contributor License Agreement](http://links.puppetlabs.com/cla)
|
89
|
-
* [General GitHub documentation](http://help.github.com/)
|
90
|
-
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
|
91
|
-
* #puppet-dev IRC channel on freenode.org
|