Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: conventional-commits

"on":
pull_request:
types:
- opened
- reopened
- edited
- synchronize

jobs:
conventional-commits:
uses: sous-chefs/.github/.github/workflows/conventional-commits.yml@5.0.3
24 changes: 24 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: 'Copilot Setup Steps'

"on":
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Install Chef
uses: actionshub/chef-install@main
- name: Install cookbooks
run: berks install
16 changes: 16 additions & 0 deletions .github/workflows/prevent-file-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: prevent-file-change

"on":
pull_request:
types:
- opened
- reopened
- edited
- synchronize

jobs:
prevent-file-change:
uses: sous-chefs/.github/.github/workflows/prevent-file-change.yml@5.0.3
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: release

"on":
push:
branches:
- main

permissions:
contents: write
issues: write
pull-requests: write
packages: write
attestations: write
id-token: write

jobs:
release:
uses: sous-chefs/.github/.github/workflows/release-cookbook.yml@5.0.3
secrets:
token: ${{ secrets.PORTER_GITHUB_TOKEN }}
supermarket_user: ${{ secrets.CHEF_SUPERMARKET_USER }}
supermarket_key: ${{ secrets.CHEF_SUPERMARKET_KEY }}
2 changes: 2 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ config:
line-length: false # MD013
no-duplicate-heading: false # MD024
reference-links-images: false # MD052
no-multiple-blanks:
maximum: 2
ignores:
- .github/copilot-instructions.md
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "4.0.9"
}
95 changes: 36 additions & 59 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@

This file is used to list changes made in each version of the ufw cookbook.

## Unreleased

Standardise files with files in sous-chefs/repo-management

Standardise files with files in sous-chefs/repo-management

## 4.0.9 - *2025-09-04*

## 4.0.8 - *2024-11-18*

Standardise files with files in sous-chefs/repo-management
Expand All @@ -24,25 +19,13 @@ Standardise files with files in sous-chefs/repo-management

Standardise files with files in sous-chefs/repo-management

## 4.0.6 - *2024-05-03*

## 4.0.5 - *2024-05-03*

## 4.0.4 - *2023-09-28*

## 4.0.3 - *2023-09-11*

## 4.0.2 - *2023-07-10*

## 4.0.1 - *2023-05-17*

## 4.0.0 - *2023-04-25*

- Finalaize Sous-Chefs adoption
- Update workflow to 2.0.2
- Require Chef 15.3
- Change node.normal for node.default
- Chef/Correctness/NodeNormal: Do not use node.normal. Replace with default/override/force_default/force_override attribute levels. (<https://docs.chef.io/workstation/cookstyle/chef_correctness_nodenormal>)
* Finalaize Sous-Chefs adoption
* Update workflow to 2.0.2
* Require Chef 15.3
* Change node.normal for node.default
* Chef/Correctness/NodeNormal: Do not use node.normal. Replace with default/override/force_default/force_override attribute levels. (<https://docs.chef.io/workstation/cookstyle/chef_correctness_nodenormal>)

## 3.2.14 - *2023-04-07*

Expand All @@ -64,16 +47,10 @@ Standardise files with files in sous-chefs/repo-management

Standardise files with files in sous-chefs/repo-management

## 3.2.9 - *2023-02-27*

## 3.2.8 - *2023-02-27*

## 3.2.7 - *2023-02-23*

Standardise files with files in sous-chefs/repo-management

## 3.2.6 - *2023-02-15*

## 3.2.5 - *2023-02-15*

Standardise files with files in sous-chefs/repo-management
Expand All @@ -88,57 +65,57 @@ Standardise files with files in sous-chefs/repo-management

## 3.2.3 - *2021-08-30*

- Standardise files with files in sous-chefs/repo-management
* Standardise files with files in sous-chefs/repo-management

## 3.2.2 - *2021-06-01*

- resolved cookstyle error: recipes/default.rb:36:15 convention: `Style/HashEachMethods`
- resolved cookstyle error: recipes/default.rb:44:7 convention: `Style/HashEachMethods`
* resolved cookstyle error: recipes/default.rb:36:15 convention: `Style/HashEachMethods`
* resolved cookstyle error: recipes/default.rb:44:7 convention: `Style/HashEachMethods`

## 3.2.1 (2018-10-04)

- Update README.md formatting
* Update README.md formatting

## 3.2.0 (2018-07-24)

- allow rules attribute to be specified as Hash
* allow rules attribute to be specified as Hash

## 3.1.1 (2018-01-03)

- Fix failure in recipes recipe from issue #21
- Update apache2 license string
- Call 'concat' on an array instead of on the node object
* Fix failure in recipes recipe from issue #21
* Update apache2 license string
* Call 'concat' on an array instead of on the node object

## 3.1.0 (2017-03-02)

- Add use of the default['firewall']['allow_ssh'] attribute in the default recipe. Default for this cookbook is set to true, as the default recipe assumed that ssh would be enabled.
* Add use of the default['firewall']['allow_ssh'] attribute in the default recipe. Default for this cookbook is set to true, as the default recipe assumed that ssh would be enabled.

## 3.0.0 (2017-03-01)

- Require Chef 12.4 (Depends on firewall which requires Chef 12.4+ at this point)
- Update default to remove installation of ufw which is duplication from firewall cookbook, and remove state changes
- Due to the change in default recipe, bumping major version in case this is breaking change for some.
- Added debian platform as firewall cookbook supports ufw on debian
* Require Chef 12.4 (Depends on firewall which requires Chef 12.4+ at this point)
* Update default to remove installation of ufw which is duplication from firewall cookbook, and remove state changes
* Due to the change in default recipe, bumping major version in case this is breaking change for some.
* Added debian platform as firewall cookbook supports ufw on debian

## 2.0.0 (2016-11-25)

- Add chef_version metadata + remove chef 11 compat
- Replace node.set with node.normal
- Require Chef 12.1
- Fix the recipe to properly converge
* Add chef_version metadata + remove chef 11 compat
* Replace node.set with node.normal
* Require Chef 12.1
* Fix the recipe to properly converge

## v1.0.0 (12-14-2015)

- Update to use / require the Firewall v2.0.0+ cookbook, which requires Chef 12
- Updated all Opscode references to Chef Software Inc.
- Updated testing, contributing, and maintainers docs
- Added source_url and issues_url metadata for supermarket
- Resolved all rubocop warnings and add the standard Chef rubocop file
- Added travis and supermarket version badges to the readme
- Added requirements section to the readme
- Added a chefignore file
- Added a Rakefile for simplified testing
- Added a basic converge chefspec
* Update to use / require the Firewall v2.0.0+ cookbook, which requires Chef 12
* Updated all Opscode references to Chef Software Inc.
* Updated testing, contributing, and maintainers docs
* Added source_url and issues_url metadata for supermarket
* Resolved all rubocop warnings and add the standard Chef rubocop file
* Added travis and supermarket version badges to the readme
* Added requirements section to the readme
* Added a chefignore file
* Added a Rakefile for simplified testing
* Added a basic converge chefspec

## v0.7.4

Expand All @@ -150,17 +127,17 @@ Updating metadata to depend on firewall >= 0.9

## v0.7.0

- [COOK-3592] - allow source ports to be defined as a range in ufw
* [COOK-3592] - allow source ports to be defined as a range in ufw

## v0.6.4

### Bug

- [COOK-3316] - Fix README.md example
* [COOK-3316] - Fix README.md example

## v0.6.2

### Bug

- [COOK-2487]: when setting a node attribute you must specify the precedence
- [COOK-2982]: ufw cookbook has foodcritic failures
* [COOK-2487]: when setting a node attribute you must specify the precedence
* [COOK-2982]: ufw cookbook has foodcritic failures
2 changes: 1 addition & 1 deletion recipes/databag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def run_list_names(run_list)
names.push(entry.name)
end
if entry.role?
rol = search(:role, "name:#{entry.name}")[0]
rol = search(:role, "name:#{entry.name}").first
names.concat(run_list_names(rol.run_list))
end
end
Expand Down
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
port params['port'].to_i if params['port']
if params['port_range']
ends = params['port_range'].split('..').map { |d| Integer(d) }
port ends[0]..ends[1]
port ends.first..ends[1]
end
source params['source'] if params['source']
destination params['destination'] if params['destination']
Expand Down
2 changes: 1 addition & 1 deletion recipes/recipes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# append them to the node['firewall']['rules'] array attribute
node.expand!.recipes.each do |recipe|
Chef::Log.debug "ufw::recipes: #{recipe}"
cookbook = recipe.split('::')[0]
cookbook = recipe.split('::').first
# get the cookbook attributes if there are any
if recipe != cookbook && node[cookbook] && node[cookbook]['firewall'] && node[cookbook]['firewall']['rules']
rules = node[cookbook]['firewall']['rules']
Expand Down
12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"packages": {
".": {
"package-name": "ufw",
"changelog-path": "CHANGELOG.md",
"release-type": "ruby",
"include-component-in-tag": false,
"version-file": "metadata.rb"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
Loading