Skip to content

Commit 9ea3f5e

Browse files
authored
fix(ci): Update workflows to use release pipeline (#64)
Signed-off-by: Dan Webb <dan.webb@damacus.io>
1 parent bad6a9b commit 9ea3f5e

10 files changed

Lines changed: 186 additions & 108 deletions
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: conventional-commits
3+
4+
"on":
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- edited
10+
- synchronize
11+
12+
jobs:
13+
conventional-commits:
14+
uses: sous-chefs/.github/.github/workflows/conventional-commits.yml@5.0.3
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: 'Copilot Setup Steps'
3+
4+
"on":
5+
workflow_dispatch:
6+
push:
7+
paths:
8+
- .github/workflows/copilot-setup-steps.yml
9+
pull_request:
10+
paths:
11+
- .github/workflows/copilot-setup-steps.yml
12+
13+
jobs:
14+
copilot-setup-steps:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
steps:
19+
- name: Check out code
20+
uses: actions/checkout@v5
21+
- name: Install Chef
22+
uses: actionshub/chef-install@main
23+
- name: Install cookbooks
24+
run: berks install
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: prevent-file-change
3+
4+
"on":
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- edited
10+
- synchronize
11+
12+
jobs:
13+
prevent-file-change:
14+
uses: sous-chefs/.github/.github/workflows/prevent-file-change.yml@5.0.3
15+
secrets:
16+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: release
3+
4+
"on":
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
packages: write
14+
attestations: write
15+
id-token: write
16+
17+
jobs:
18+
release:
19+
uses: sous-chefs/.github/.github/workflows/release-cookbook.yml@5.0.3
20+
secrets:
21+
token: ${{ secrets.PORTER_GITHUB_TOKEN }}
22+
supermarket_user: ${{ secrets.CHEF_SUPERMARKET_USER }}
23+
supermarket_key: ${{ secrets.CHEF_SUPERMARKET_KEY }}

.markdownlint-cli2.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ config:
33
line-length: false # MD013
44
no-duplicate-heading: false # MD024
55
reference-links-images: false # MD052
6+
no-multiple-blanks:
7+
maximum: 2
8+
ignores:
9+
- .github/copilot-instructions.md

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "6.0.9"
3+
}

CHANGELOG.md

Lines changed: 89 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -5,181 +5,165 @@ This file is used to list changes made in each version of the transmission cookb
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## Unreleased
9-
10-
## 6.0.9 - *2025-09-04*
11-
12-
## 6.0.8 - *2024-05-03*
13-
14-
## 6.0.7 - *2024-05-03*
15-
16-
## 6.0.6 - *2023-09-28*
17-
18-
## 6.0.5 - *2023-09-04*
19-
20-
## 6.0.4 - *2023-09-04*
21-
22-
## 6.0.3 - *2023-05-17*
23-
248
## 6.0.2 - *2023-04-04*
259

26-
- Standardise files with files in sous-chefs/repo-management
10+
* Standardise files with files in sous-chefs/repo-management
2711

2812
## 6.0.1 - *2022-02-10*
2913

30-
- resolved cookstyle error: tasks/maintainers.rb:37:7 convention: `Style/FileWrite`
31-
- resolved cookstyle error: metadata.rb:23:1 refactor: `Chef/Modernize/DependsOnOpensslCookbook`
32-
- resolved cookstyle error:
33-
- Chef/Deprecations/Delivery: Do not include a .delivery directory for the delivery command in your cookbooks. Chef Delivery (Workflow) went EOL Dec 31st 2021 and the delivery command was removed from Chef Workstation Feb 2022. (<https://docs.chef.io/workstation/cookstyle/chef_deprecations_delivery>)
34-
- resolved cookstyle error:
35-
- Chef/Correctness/OpenSSLPasswordHelpers: The secure_password helper from the openssl cookbooks Opscode::OpenSSL::Password class should not be used to generate passwords. (<https://docs.chef.io/workstation/cookstyle/chef_correctness_opensslpasswordhelpers>) ::Chef::Node.include Opscode::OpenSSL::Password
36-
- Update provisioner settings
37-
- Update tested platforms
14+
* resolved cookstyle error: tasks/maintainers.rb:37:7 convention: `Style/FileWrite`
15+
* resolved cookstyle error: metadata.rb:23:1 refactor: `Chef/Modernize/DependsOnOpensslCookbook`
16+
* resolved cookstyle error:
17+
* Chef/Deprecations/Delivery: Do not include a .delivery directory for the delivery command in your cookbooks. Chef Delivery (Workflow) went EOL Dec 31st 2021 and the delivery command was removed from Chef Workstation Feb 2022. (<https://docs.chef.io/workstation/cookstyle/chef_deprecations_delivery>)
18+
* resolved cookstyle error:
19+
* Chef/Correctness/OpenSSLPasswordHelpers: The secure_password helper from the openssl cookbooks Opscode::OpenSSL::Password class should not be used to generate passwords. (<https://docs.chef.io/workstation/cookstyle/chef_correctness_opensslpasswordhelpers>) ::Chef::Node.include Opscode::OpenSSL::Password
20+
* Update provisioner settings
21+
* Update tested platforms
3822

3923
## 6.0.0 - *2021-08-20*
4024

41-
- Set unified_mode on resources for Chef 17 support
42-
- Require Chef 15.3+ for unified_mode support
25+
* Set unified_mode on resources for Chef 17 support
26+
* Require Chef 15.3+ for unified_mode support
4327

4428
## 5.0.3 - *2021-08-14*
4529

46-
- Standardising files in line with updated recommendations
30+
* Standardising files in line with updated recommendations
4731

4832
## 5.0.2 - *2021-06-01*
4933

50-
- Standardise files with files in sous-chefs/repo-management
34+
* Standardise files with files in sous-chefs/repo-management
5135

5236
## 5.0.1 - *2021-03-25*
5337

54-
- resolved cookstyle error: providers/torrent_file.rb:120:21 convention: `Style/RedundantBegin`
55-
- resolved cookstyle error: providers/torrent_file.rb:121:1 convention: `Layout/EmptyLinesAroundMethodBody`
56-
- resolved cookstyle error: providers/torrent_file.rb:121:1 convention: `Layout/TrailingWhitespace`
38+
* resolved cookstyle error: providers/torrent_file.rb:120:21 convention: `Style/RedundantBegin`
39+
* resolved cookstyle error: providers/torrent_file.rb:121:1 convention: `Layout/EmptyLinesAroundMethodBody`
40+
* resolved cookstyle error: providers/torrent_file.rb:121:1 convention: `Layout/TrailingWhitespace`
5741

5842
## 5.0.0 (2020-11-13)
5943

60-
- Sous Chefs Adoption
61-
- Update Changelog to Sous Chefs
62-
- Update to use Sous Chefs GH workflow
63-
- Update README to sous-chefs
64-
- Update metadata.rb to Sous Chefs
65-
- Update test-kitchen to Sous Chefs
66-
- Update to version 3.00 for source installation
67-
- Added InSpec test profile
68-
- resolved cookstyle error: providers/torrent_file.rb:76:60 convention: `Style/RedundantParentheses`
69-
- resolved cookstyle error: attributes/default.rb:20:14 warning: `Lint/SendWithMixinArgument`
70-
- resolved cookstyle error: metadata.rb:12:1 refactor: `ChefStyle/OverlyComplexSupportsDependsMetadata`
71-
- resolved cookstyle error: metadata.rb:13:1 refactor: `ChefModernize/UnnecessaryDependsChef14`
72-
- Cookstyle fixes
73-
- Yamllint fixes
74-
- MDL fixes
75-
- Fix CentOS/Fedora installation
76-
- Source installation issues
77-
- Fix SUSE source installation
78-
- Remove Amazon Linux 1 testing
79-
- Remove EL 6 testing
80-
- Remove init.d scripts
81-
- Remove Oracle Linux testing
44+
* Sous Chefs Adoption
45+
* Update Changelog to Sous Chefs
46+
* Update to use Sous Chefs GH workflow
47+
* Update README to sous-chefs
48+
* Update metadata.rb to Sous Chefs
49+
* Update test-kitchen to Sous Chefs
50+
* Update to version 3.00 for source installation
51+
* Added InSpec test profile
52+
* resolved cookstyle error: providers/torrent_file.rb:76:60 convention: `Style/RedundantParentheses`
53+
* resolved cookstyle error: attributes/default.rb:20:14 warning: `Lint/SendWithMixinArgument`
54+
* resolved cookstyle error: metadata.rb:12:1 refactor: `ChefStyle/OverlyComplexSupportsDependsMetadata`
55+
* resolved cookstyle error: metadata.rb:13:1 refactor: `ChefModernize/UnnecessaryDependsChef14`
56+
* Cookstyle fixes
57+
* Yamllint fixes
58+
* MDL fixes
59+
* Fix CentOS/Fedora installation
60+
* Source installation issues
61+
* Fix SUSE source installation
62+
* Remove Amazon Linux 1 testing
63+
* Remove EL 6 testing
64+
* Remove init.d scripts
65+
* Remove Oracle Linux testing
8266

8367
## 4.0.1 (2017-08-18)
8468

85-
- Add attributes for controling seed ratio
69+
* Add attributes for controling seed ratio
8670

8771
## 4.0.0 (2017-01-18)
8872

89-
- Use multipackage to speed up package installs
90-
- Expand platform testing and fix 16.04 package tests
91-
- Make sure we have ssl libs on debian systems
92-
- Remove the chef 11 compatibility check in chef_gem
93-
- Switch back to stable ChefDK builds for testing
94-
- Require Chef 12.14 to get ruby 2.2.2+ which is needed for the gems that are installed by this cookbook
73+
* Use multipackage to speed up package installs
74+
* Expand platform testing and fix 16.04 package tests
75+
* Make sure we have ssl libs on debian systems
76+
* Remove the chef 11 compatibility check in chef_gem
77+
* Switch back to stable ChefDK builds for testing
78+
* Require Chef 12.14 to get ruby 2.2.2+ which is needed for the gems that are installed by this cookbook
9579

9680
## 3.0.0 (2016-09-08)
9781

98-
- Add matchers
99-
- Require Chef 12.1+
82+
* Add matchers
83+
* Require Chef 12.1+
10084

10185
## 2.2.1 (2016-09-01)
10286

103-
- Add chef_version
104-
- Testing updates
105-
- Pull transmission from Github and use 2.92
87+
* Add chef_version
88+
* Testing updates
89+
* Pull transmission from Github and use 2.92
10690

10791
## 2.2.0 (2016-08-11)
10892

109-
- Fix up chef_gem compile time warnings.
110-
- Add support for transmission whitelist settings.
111-
- Add use_inline_resources
112-
- Add conditional to support older versions of chef.
113-
- Update testing
114-
- Specif version 4.x of activesupport to fix installs on Ruby 2.1 Chef omnibus
93+
* Fix up chef_gem compile time warnings.
94+
* Add support for transmission whitelist settings.
95+
* Add use_inline_resources
96+
* Add conditional to support older versions of chef.
97+
* Update testing
98+
* Specif version 4.x of activesupport to fix installs on Ruby 2.1 Chef omnibus
11599

116100
## v2.1.1 (2016-01-08)
117101

118-
- Add supports metadata for all supported platforms
102+
* Add supports metadata for all supported platforms
119103

120104
## v2.1.0 (2016-01-08)
121105

122-
- Fixed installation via source on RHEL systems by adding openssl / tar packages to the source recipe
123-
- Switched to platform_family to better support derivitive operating systems
124-
- Updated to the latest version of Transmission for source installs
125-
- Switched from .bz2 to .xz format archives for source installs as .bz2 archives are no longer being published. Xz tools will now be installed in the source recipe
126-
- Added source test suite in Test Kitchen
127-
- Removed support for RHEL releases before 7 as the version of libevent shipped in these distros is too old to compile tranmission
106+
* Fixed installation via source on RHEL systems by adding openssl / tar packages to the source recipe
107+
* Switched to platform_family to better support derivitive operating systems
108+
* Updated to the latest version of Transmission for source installs
109+
* Switched from .bz2 to .xz format archives for source installs as .bz2 archives are no longer being published. Xz tools will now be installed in the source recipe
110+
* Added source test suite in Test Kitchen
111+
* Removed support for RHEL releases before 7 as the version of libevent shipped in these distros is too old to compile tranmission
128112

129113
## v2.0.10 (2015-12-14)
130114

131-
- Set the minimum supported Chef release to 11
132-
- Removed the monkeypatch to Ruby 1.8.6 support
133-
- Resolved all rubocop warnings
134-
- Added testing with Travis CI
135-
- Added chefignore file
136-
- Swaped Digital Ocean Test Kitchen config for Docker
137-
- Added standard Chef .rubocop.yml
138-
- Updated contributing and testing docs
139-
- Added Gemfile with development deps
140-
- Added maintainers file
141-
- Added a Rakefile for simplified testing
115+
* Set the minimum supported Chef release to 11
116+
* Removed the monkeypatch to Ruby 1.8.6 support
117+
* Resolved all rubocop warnings
118+
* Added testing with Travis CI
119+
* Added chefignore file
120+
* Swaped Digital Ocean Test Kitchen config for Docker
121+
* Added standard Chef .rubocop.yml
122+
* Updated contributing and testing docs
123+
* Added Gemfile with development deps
124+
* Added maintainers file
125+
* Added a Rakefile for simplified testing
142126

143127
## v2.0.9 (2015-02-18)
144128

145-
- reverting OpenSSL module namespace change
129+
* reverting OpenSSL module namespace change
146130

147131
## v2.0.8 (2015-02-18)
148132

149-
- reverting chef_gem compile_time work
133+
* reverting chef_gem compile_time work
150134

151135
## v2.0.7 (2015-02-18)
152136

153-
- Updating to use the latest openssl
137+
* Updating to use the latest openssl
154138

155139
## v2.0.6 (2015-02-18)
156140

157-
- Fixing chef_gem for Chef below 12.1.0
141+
* Fixing chef_gem for Chef below 12.1.0
158142

159143
## v2.0.4 (2014-09-18)
160144

161-
- [#11] prevent circular symlink for settings.json on Ubuntu 14.04
162-
- Add Berksfile and test-kitchen config
145+
* [#11] prevent circular symlink for settings.json on Ubuntu 14.04
146+
* Add Berksfile and test-kitchen config
163147

164148
## v2.0.2 (2014-03-19)
165149

166-
- [COOK-4424] Updates Transmission url in README'
150+
* [COOK-4424] Updates Transmission url in README'
167151

168152
## v2.0.0
169153

170154
**Requires Ruby 1.9 or higher!**
171155

172-
- **[COOK-3451](https://tickets.chef.io/browse/COOK-3451)** - Use Hash#key to silence Hash#index deprecation warnings
173-
- **[COOK-3450](https://tickets.chef.io/browse/COOK-3450)** - Delete torrent local data when not seeding
174-
- **[COOK-3449](https://tickets.chef.io/browse/COOK-3449)** - Prevent torrent status of checking from prematurely ending blocking downloads
175-
- **[COOK-3324](https://tickets.chef.io/browse/COOK-3324)** - Use `BEncode.load_file` to load torrent file when hashing to avoid UTF-8 encoding issues
176-
- **[COOK-2227](https://tickets.chef.io/browse/COOK-2227)** - Add watch dir options
156+
* Use Hash#key to silence Hash#index deprecation warnings
157+
* Delete torrent local data when not seeding
158+
* Prevent torrent status of checking from prematurely ending blocking downloads
159+
* Use `BEncode.load_file` to load torrent file when hashing to avoid UTF-8 encoding issues
160+
* Add watch dir options
177161

178162
## v1.0.4
179163

180-
- [COOK-2981]: transmission cookbook has foodcritic errors
164+
* [COOK-2981]: transmission cookbook has foodcritic errors
181165

182166
## v1.0.2
183167

184-
- [COOK-729]: `transmission_torrent_file` doesn't work for more than a single torrent
185-
- [COOK-732]: link to file in swarm not created if torrent already completely downloaded
168+
* [COOK-729]: `transmission_torrent_file` doesn't work for more than a single torrent
169+
* [COOK-732]: link to file in swarm not created if torrent already completely downloaded

release-please-config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"packages": {
3+
".": {
4+
"package-name": "transmission",
5+
"changelog-path": "CHANGELOG.md",
6+
"release-type": "ruby",
7+
"include-component-in-tag": false,
8+
"version-file": "metadata.rb"
9+
}
10+
},
11+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
12+
}

resources/torrent_file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ def cached_torrent
109109

110110
def torrent_hash
111111
require 'bencode'
112-
@torrent_hash ||= Digest::SHA1.hexdigest((BEncode.load_file(cached_torrent)['info']).bencode) # thx bakins!
112+
@torrent_hash ||= Digest::SHA1.hexdigest(BEncode.load_file(cached_torrent)['info'].bencode) # thx bakins!
113113
end
114114
end

tasks/maintainers.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141
warn "\n*** TomlRb not available. Skipping the Maintainers Rake task\n\n"
4242
end
4343

44-
private
45-
4644
def preamble
4745
<<-EOL
4846
# #{@toml['Preamble']['title']}

0 commit comments

Comments
 (0)