Skip to content

Commit

Permalink
Cirlcleci 2.0 (#31)
Browse files Browse the repository at this point in the history
* Cirlcleci 2.0

* Yaml lint

* delivery fixes

* Lint fixes

* Fixes

* Use context for license

* Revert context

* Update installs

* lint fix

* remove amazon linux 1

* Split to capture status results from compile steps

* Minor version bump

* Fedora and CentOS packaging updates

* Update install.rb

* Fixes #39

* Fixes #37

* Fixes #36

* Fixes #40

* Removes Fedora and updates checksums for rpm package

* Cookstyle fixes

* fix file resource error
  • Loading branch information
xorima authored and JohnRoesler committed Oct 18, 2019
1 parent 7a0020e commit ab54e7f
Show file tree
Hide file tree
Showing 20 changed files with 122 additions and 203 deletions.
42 changes: 33 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
---
lint_and_unit: &lint_and_unit
- delivery
- danger
- lint-yaml
- lint-markdown
version: 2.1

orbs:
kitchen: sous-chefs/[email protected]

kitchen: sous-chefs/kitchen@2
workflows:
kitchen:
jobs:
- kitchen/yamllint:
name: lint-yaml
- kitchen/mdlint:
name: lint-markdown
- kitchen/danger:
name: danger
context: Danger
- kitchen/lint:
name: lint
# - kitchen/dokken:
# name: default
# suite: default
# requires: [ danger, lint ]
- kitchen/delivery:
name: delivery
- kitchen/dokken-single:
name: default-debian-8
suite: default-debian-8
requires: *lint_and_unit
- kitchen/dokken-single:
name: default-debian-9
suite: default-debian-9
requires: *lint_and_unit
- kitchen/dokken-single:
name: default-centos-7
suite: default-centos-7
requires: *lint_and_unit
- kitchen/dokken-single:
name: default-ubuntu-1604
suite: default-ubuntu-1604
requires: *lint_and_unit
- kitchen/dokken-single:
name: default-ubuntu-1804
suite: default-ubuntu-1804
requires: *lint_and_unit
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

12 changes: 0 additions & 12 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

24 changes: 2 additions & 22 deletions .github/lock.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
# Configuration for lock-threads - https://github.com/dessant/lock-threads

# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 365

# Issues and pull requests with these labels will not be locked. Set to `[]` to disable
---
daysUntilLock: 30
exemptLabels: []

# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false

# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
# Limit to only `issues` or `pulls`
# only: issues

# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated

# pulls:
# daysUntilLock: 30
83 changes: 0 additions & 83 deletions .kitchen.dokken.yml

This file was deleted.

1 change: 1 addition & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rules "~MD013"
3 changes: 0 additions & 3 deletions .rubocop.yml

This file was deleted.

10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## v4.0.2 (2019-06-25)

- Added CircleCI 2.0 support

## v4.0.1 (2018-12-14)

- Updated checksums for the snort package on CentOS and Fedora
Expand Down Expand Up @@ -31,7 +35,7 @@ This file is used to list changes made in each version of the snort cookbook.

- Added new snort_service custom resource and a _service.rb recipe. The recipe is called by the default.rb recipe. The custom resource can be used to write wrapper cookbooks and supports the standard service actions (enable, start, restart, reload). The custom resource used the new Chef 12.5 customer resource format and the compat_resource cookbook for compatibility with 12.0+

## v1.1.0:
## v1.1.0

- Updated to the latest daq and snort packages for RHEL
- Added Chefspecs for RHEL/Debian platforms
Expand All @@ -45,7 +49,7 @@ This file is used to list changes made in each version of the snort cookbook.
- Removed references to database output from the Readme
- Added a Rakefile for simplified testing

## v1.0.0:
## v1.0.0

- Updated to the latest Snort packages on RHEL / Fedora. For RHEL the minimum supported release is now RHEL 7 due to Snort requirements
- The default package action is now install and not upgrade to prevent service restarts on Chef runs
Expand All @@ -58,6 +62,6 @@ This file is used to list changes made in each version of the snort cookbook.
- Added a Gemfile with development dependencies
- Added a Berksfile for development dependencies

## v0.10.0:
## v0.10.0

- [COOK-1512] - Update SNORT cookbook with upstream changes for RHEL platforms
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ The master branch is the current committed changes. These changes may not yet be

All releases are tagged in git. To see the releases available to you see the changelog or the tags directly.


## Pull requests

- <https://github.com/sous-chefs/snort/pulls>
Expand Down
4 changes: 2 additions & 2 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ def test_changes?
false
end

fail 'Please provide a summary of your Pull Request.' if github.pr_body.length < 10
failure 'Please provide a summary of your Pull Request.' if github.pr_body.length < 10

warn 'This is a big Pull Request.' if git.lines_of_code > 400

# Require a CHANGELOG entry for non-test changes.
if !git.modified_files.include?('CHANGELOG.md') && code_changes?
fail 'Please include a CHANGELOG entry.'
failure 'Please include a CHANGELOG entry.'
end

# A sanity check for tests.
Expand Down
5 changes: 3 additions & 2 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Please refer to
https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
# Testing

Please refer to [the community cookbook documentation on testing](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD).
47 changes: 47 additions & 0 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
driver:
name: dokken
privileged: true
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
env: [CHEF_LICENSE=accept]

transport:
name: dokken

provisioner:
name: dokken
deprecations_as_errors: true

platforms:
- name: debian-8
driver:
image: dokken/debian-8
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: debian-9
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: centos-7
driver:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd

- name: ubuntu-16.04
driver:
image: dokken/ubuntu-16.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
14 changes: 4 additions & 10 deletions .kitchen.yml → kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
driver:
name: vagrant

Expand All @@ -12,10 +13,6 @@ verifier:
name: inspec

platforms:
- name: amazon-linux
driver_config:
box: mvbcoding/awslinux
- name: centos-6
- name: centos-7
- name: debian-8
- name: debian-9
Expand All @@ -24,9 +21,6 @@ platforms:
- name: ubuntu-16.04

suites:
- name: default
run_list:
- recipe[test::default]
attributes:
oink_code: <%= ENV['SNORT_LICENCE'] %>
community_rules_url: <%= ENV['COMMUNITY_URL'] %>
- name: default
run_list:
- recipe[test::default]
2 changes: 1 addition & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def system_lib_dir

def package_suffix
if platform?('fedora')
'.f25'
'.f29'
else
'.centos7'
end
Expand Down
4 changes: 2 additions & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Installs Snort IDS packages'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '4.0.1'

version '4.0.2'
chef_version '>= 13.0'
source_url 'https://github.com/sous-chefs/snort'
issues_url 'https://github.com/sous-chefs/snort/issues'
Expand Down
Loading

0 comments on commit ab54e7f

Please sign in to comment.