Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit fd04e96

Browse files
committed
Merge branch 'release/1.18.1'
2 parents a77c3d6 + 0da369c commit fd04e96

File tree

11 files changed

+200
-91
lines changed

11 files changed

+200
-91
lines changed

.gitchangelog.rc

Lines changed: 142 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# -*- coding: utf-8; mode: python -*-
2-
import yaml
3-
42
##
53
## Format
64
##
@@ -53,6 +51,7 @@ import yaml
5351
## message will be displayed in the changelog without reformatting.
5452

5553

54+
##
5655
## ``ignore_regexps`` is a line of regexps
5756
##
5857
## Any commit having its full commit message matching any regexp listed here
@@ -130,8 +129,18 @@ section_regexps = [
130129
## whatever given ``msg`` if the current text is empty.
131130
##
132131
## Additionally, you can `pipe` the provided filters, for instance:
132+
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
133+
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
134+
#body_process = noop
133135
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
134136

137+
138+
## ``subject_process`` is a callable
139+
##
140+
## This callable will be given the original subject and result will
141+
## be used in the changelog.
142+
##
143+
## Available constructs are those listed in ``body_process`` doc.
135144
subject_process = (strip |
136145
ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
137146
SetIfEmpty("No commit message.") | ucfirst | final_dot)
@@ -144,39 +153,139 @@ subject_process = (strip |
144153
tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$'
145154

146155

156+
## ``unreleased_version_label`` is a string or a callable that outputs a string
157+
##
158+
## This label will be used as the changelog Title of the last set of changes
159+
## between last valid tag and HEAD if any.
160+
import yaml
161+
147162
with open('vars/main.yml') as stream:
148163
unreleased_version_label = yaml.safe_load(stream)['cassandra_role_version']
149164

165+
## ``output_engine`` is a callable
166+
##
167+
## This will change the output format of the generated changelog file
168+
##
169+
## Available choices are:
170+
##
171+
## - rest_py
172+
##
173+
## Legacy pure python engine, outputs ReSTructured text.
174+
## This is the default.
175+
##
176+
## - mustache(<template_name>)
177+
##
178+
## Template name could be any of the available templates in
179+
## ``templates/mustache/*.tpl``.
180+
## Requires python package ``pystache``.
181+
## Examples:
182+
## - mustache("markdown")
183+
## - mustache("restructuredtext")
184+
##
185+
## - makotemplate(<template_name>)
186+
##
187+
## Template name could be any of the available templates in
188+
## ``templates/mako/*.tpl``.
189+
## Requires python package ``mako``.
190+
## Examples:
191+
## - makotemplate("restructuredtext")
192+
##
193+
#output_engine = rest_py
194+
#output_engine = mustache("restructuredtext")
150195
output_engine = mustache("markdown")
196+
#output_engine = makotemplate("restructuredtext")
197+
198+
199+
## ``include_merge`` is a boolean
200+
##
201+
## This option tells git-log whether to include merge commits in the log.
202+
## The default is to include them.
151203
include_merge = False
152-
log_encoding = 'utf-8'
153-
OUTPUT_FILE = "CHANGELOG.md"
154-
INSERT_POINT_REGEX = r'''(?isxu)
155-
^
156-
(
157-
\s*\#\s+Changelog\s*(\n|\r\n|\r) ## ``Changelog`` line
158-
)
159-
160-
( ## Match all between changelog and release rev
161-
(
162-
(?!
163-
(?<=(\n|\r)) ## look back for newline
164-
\#\#\s+%(rev)s ## revision
165-
\s+
166-
\([0-9]+-[0-9]{2}-[0-9]{2}\)(\n|\r\n|\r) ## date
167-
)
168-
.
169-
)*
170-
)
171-
172-
(?P<tail>\#\#\s+(?P<rev>%(rev)s))
173-
''' % {'rev': r"[0-9]+\.[0-9]+(\.[0-9]+)?"}
174-
175-
revs = [
176-
Caret(FileFirstRegexMatch(OUTPUT_FILE, INSERT_POINT_REGEX)),
177-
'HEAD'
178-
]
179-
publish = FileInsertAtFirstRegexMatch(
180-
OUTPUT_FILE, INSERT_POINT_REGEX,
181-
idx=lambda m: m.start(1)
182-
)
204+
205+
206+
## ``log_encoding`` is a string identifier
207+
##
208+
## This option tells gitchangelog what encoding is outputed by ``git log``.
209+
## The default is to be clever about it: it checks ``git config`` for
210+
## ``i18n.logOutputEncoding``, and if not found will default to git's own
211+
## default: ``utf-8``.
212+
#log_encoding = 'utf-8'
213+
214+
215+
## ``publish`` is a callable
216+
##
217+
## Sets what ``gitchangelog`` should do with the output generated by
218+
## the output engine. ``publish`` is a callable taking one argument
219+
## that is an interator on lines from the output engine.
220+
##
221+
## Some helper callable are provided:
222+
##
223+
## Available choices are:
224+
##
225+
## - stdout
226+
##
227+
## Outputs directly to standard output
228+
## (This is the default)
229+
##
230+
## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start(), flags)
231+
##
232+
## Creates a callable that will parse given file for the given
233+
## regex pattern and will insert the output in the file.
234+
## ``idx`` is a callable that receive the matching object and
235+
## must return a integer index point where to insert the
236+
## the output in the file. Default is to return the position of
237+
## the start of the matched string.
238+
##
239+
## - FileRegexSubst(file, pattern, replace, flags)
240+
##
241+
## Apply a replace inplace in the given file. Your regex pattern must
242+
## take care of everything and might be more complex. Check the README
243+
## for a complete copy-pastable example.
244+
##
245+
# publish = FileInsertIntoFirstRegexMatch(
246+
# "CHANGELOG.rst",
247+
# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/',
248+
# idx=lambda m: m.start(1)
249+
# )
250+
#publish = stdout
251+
252+
253+
## ``revs`` is a list of callable or a list of string
254+
##
255+
## callable will be called to resolve as strings and allow dynamical
256+
## computation of these. The result will be used as revisions for
257+
## gitchangelog (as if directly stated on the command line). This allows
258+
## to filter exaclty which commits will be read by gitchangelog.
259+
##
260+
## To get a full documentation on the format of these strings, please
261+
## refer to the ``git rev-list`` arguments. There are many examples.
262+
##
263+
## Using callables is especially useful, for instance, if you
264+
## are using gitchangelog to generate incrementally your changelog.
265+
##
266+
## Some helpers are provided, you can use them::
267+
##
268+
## - FileFirstRegexMatch(file, pattern): will return a callable that will
269+
## return the first string match for the given pattern in the given file.
270+
## If you use named sub-patterns in your regex pattern, it'll output only
271+
## the string matching the regex pattern named "rev".
272+
##
273+
## - Caret(rev): will return the rev prefixed by a "^", which is a
274+
## way to remove the given revision and all its ancestor.
275+
##
276+
## Please note that if you provide a rev-list on the command line, it'll
277+
## replace this value (which will then be ignored).
278+
##
279+
## If empty, then ``gitchangelog`` will act as it had to generate a full
280+
## changelog.
281+
##
282+
## The default is to use all commits to make the changelog.
283+
#revs = ["^1.0.3", ]
284+
#revs = [
285+
# Caret(
286+
# FileFirstRegexMatch(
287+
# "CHANGELOG.rst",
288+
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
289+
# "HEAD"
290+
#]
291+
revs = []

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ jobs:
1717
strategy:
1818
matrix:
1919
include:
20-
- image-version: centos7
21-
command: /usr/sbin/init
22-
distro: centos
23-
tag: 7
20+
# Disable Tests for CentOS 7 due to https://github.com/locp/ansible-role-cassandra/issues/155
21+
# - image-version: centos7
22+
# command: /usr/sbin/init
23+
# distro: centos
24+
# tag: 7
2425
- image-version: centos8
2526
command: /usr/sbin/init
2627
distro: centos

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
## 1.18.0
1+
# Changelog
2+
3+
4+
## 1.18.1
5+
6+
### Changes
7+
8+
* Migrate to testinfra-bdd 2.0.0. [Ben Dalling]
9+
10+
### Fix
11+
12+
* Change apache package repository URLs to new location (CASSANDRA-17748) [Hauke Hans]
13+
14+
* Disable testing against CentOS 7. [Ben Dalling]
15+
16+
* Correct Lint errors in metadata file. [Ben Dalling]
17+
18+
19+
## 1.18.0 (2022-07-17)
220

321
### New
422

meta/main.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ galaxy_info:
1111

1212
namespace: locp
1313

14-
github_branch: main
15-
1614
license: GPLv3
1715

1816
min_ansible_version: 2.12.6
@@ -30,8 +28,8 @@ galaxy_info:
3028
platforms:
3129
- name: EL
3230
versions:
33-
- 7
34-
- 8
31+
- '7'
32+
- '8'
3533
- name: Ubuntu
3634
versions:
3735
- bionic
@@ -45,15 +43,13 @@ galaxy_info:
4543
- stretch
4644
- name: Fedora
4745
versions:
48-
- 27
49-
- 28
50-
- 29
51-
- 30 # https://github.com/ansible/galaxy/issues/1926
52-
- 31 # https://github.com/ansible/galaxy/issues/2105
53-
- 32 # https://github.com/ansible/galaxy/issues/2356
54-
- 33 # https://github.com/ansible/galaxy/issues/2533
55-
- 34
56-
- 35
57-
- 36
58-
59-
dependencies: []
46+
- '27'
47+
- '28'
48+
- '29'
49+
- '30' # https://github.com/ansible/galaxy/issues/1926
50+
- '31' # https://github.com/ansible/galaxy/issues/2105
51+
- '32' # https://github.com/ansible/galaxy/issues/2356
52+
- '33' # https://github.com/ansible/galaxy/issues/2533
53+
- '34'
54+
- '35'
55+
- '36'

molecule/default/tests/test_supported_platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_platform_is_supported(self):
5555
supported_versions = platform['versions']
5656

5757
if platform_name == 'EL' or platform_name == 'Fedora':
58-
version = int(host.system_info.release.split('.')[0])
58+
version = host.system_info.release.split('.')[0]
5959
else:
6060
version = host.system_info.codename
6161

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,11 @@
11
"""Test Cassandra feature tests."""
22

3-
from pytest_bdd import scenario
3+
import testinfra_bdd
4+
from pytest_bdd import scenarios
45

5-
# Ensure that the PyTest fixtures provided in testinfra-bdd are available to
6-
# your test suite.
7-
pytest_plugins = ['testinfra_bdd']
8-
9-
10-
@scenario('../features/cassandra.feature', 'Check that a File Contains an Expected String')
11-
def test_check_that_a_file_contains_an_expected_string():
12-
"""Check that a File Contains an Expected String."""
13-
14-
15-
@scenario('../features/cassandra.feature', 'Check that a file exists and matches an expected type')
16-
def test_check_that_a_file_exists_and_matches_an_expected_type():
17-
"""Check that a file exists and matches an expected type."""
6+
scenarios('../features/cassandra.feature')
187

198

20-
@scenario('../features/cassandra.feature', 'Check the Cassandra Service and Package')
21-
def test_check_the_cassandra_service_and_package():
22-
"""Check the Cassandra Service and Package."""
23-
24-
25-
@scenario('../features/cassandra.feature', 'Custom Directories')
26-
def test_custom_directories():
27-
"""Custom Directories."""
28-
29-
30-
@scenario('../features/cassandra.feature', 'Run the nodetool command')
31-
def test_run_the_nodetool_command():
32-
"""Run the nodetool command."""
9+
# Ensure that the PyTest fixtures provided in testinfra-bdd are available to
10+
# your test suite.
11+
pytest_plugins = testinfra_bdd.PYTEST_MODULES

molecule/latest/tests/test_supported_platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_platform_is_supported(self):
5555
supported_versions = platform['versions']
5656

5757
if platform_name == 'EL' or platform_name == 'Fedora':
58-
version = int(host.system_info.release.split('.')[0])
58+
version = host.system_info.release.split('.')[0]
5959
else:
6060
version = host.system_info.codename
6161

0 commit comments

Comments
 (0)