Skip to content

Commit

Permalink
Version 3.0.0 (#16)
Browse files Browse the repository at this point in the history
* add todos

* we accept this as a variable so we should respect it

* remove commented out code

* no passwords in the data files

* Push to github

* specifically specify our database

* escape the password just in case

* empty commit

* try this syntax

* empty commit

* remote can't add users

* remove todo

* Push integration tests

* export

* export vars

* check inventory

* try running task directly

* test with location

* commit changes

* push changes

* Control snmp listen in observium

* disable ipv6

* Commit run in github action

* try with provision litmus

* Run integration tests

* Install the module too!!!

* Switch to provision.yaml

* Move provision yaml

* Remove centos7 add ubuntu

* add puppet facts

* remove do

* with os family

* lowercase strings

* Fix serverspec

* added more checks

* describe not descrube

* Try with other "

* Test again

* remove sed

* Test with snmp v6 listen enabled

* set override

* Setup vagrant images

* added unit tests

* test unit tests

* Commit latest unit tests

* fix some lint issues

* added lint tests

* remove old plan

* Update reference.md

* Add lint test

* update name

* Fix lint, disable ubuntu 20.04 litmus

* added cron serverspec entry

* Added more tests

* check os release

* Fix variable and cron

* Updated serverspec

* Test curl

* test with should

* with full path

* Test with stdout

* test with simple command

* attempt with new syntax

* with match

* test

* revert

* with quotes

* Restore code

* Disable breaking test

* added centos7 image

* Added stream 9 image

* Push with rhel9 enhancements

* Fix escape sequence

* push changes

* fixed gpg content

* More fixes

* update code

* Check for os major

* Change to int

* Check os release

* Check for rhel9

* Verify its rhel8 before installing package

* Switch from and to &&

* Changes to github actions

* Bump ruby version

* with puppet 7 and 8

* remove nightly version

* Dwongrade apache

* Bump deps in metadata

* Fix label

* Set gem version

* Run new test

* test again

* with inline

* cat githuboutput

* Restore to old matrix

* Fix matrix file

* switch to using contain

* Revert "switch to using contain"

This reverts commit 6dfd8f6.

* Exception for ubuntu 2204

* try with apply

* Switch to apply manifest

* more chnanges

* Run apply twice for 2204

* Check if hiera_config works with litmus

* set values

* fix syntax

* Switch to firewall module for ubuntu

* Update reference, drop other traffic

* manage firewall

* dsiable port 80

* remove default rules for testing

* fix

* enable icmp

* fix ordering

* disable fw ubuntu

* Update readme and changelog

* last commit

* Run unit test only on PR

* bump lint and unit test to use matrix

* Remove check for repo owner

* added password req content

* Only run on PR

* bump version

* Readme updates

---------

Co-authored-by: tyler bailey <baile320@umn.edu>
  • Loading branch information
benjamin-robertson and baile320 authored Jun 24, 2024
1 parent 8c22c28 commit b8c1547
Show file tree
Hide file tree
Showing 36 changed files with 1,431 additions and 316 deletions.
50 changes: 28 additions & 22 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,47 @@
fixtures:
forge_modules:
stdlib:
repo: "puppetlabs/stdlib"
ref: "8.6.0"
repo: "puppetlabs/stdlib" # needs stdlib 9 >
ref: "9.6.0"
puppetlabs-yumrepo_core:
repo: "puppetlabs/yumrepo_core"
ref: "2.0.0"
ref: "2.1.0"
puppet-archive:
repo: "puppet/archive"
ref: "5.0.0"
ref: "7.1.0"
puppetlabs-mysql:
repo: "puppetlabs/mysql"
ref: "13.3.0"
repo: "puppetlabs/mysql" # needs 15 or >
ref: "15.0.0"
puppetlabs-cron_core:
repo: "puppetlabs/cron_core"
ref: "1.0.5"
ref: "1.3.0"
puppet-selinux:
repo: "puppet/selinux"
ref: "3.4.0"
repo: "puppet/selinux" # needs stdlib 9 >
ref: "4.1.0" # needs 4>
puppetlabs-apache:
repo: "puppetlabs/apache"
ref: "10.0.0"
ref: "12.1.0"
puppet-snmp:
repo: "puppet/snmp"
ref: "5.1.1"
repo: "puppet/snmp" # needs systemd 2.5.1 >
ref: "7.1.0"
puppet-firewalld:
repo: "puppet/firewalld"
ref: "4.4.0"
domkrm-ufw:
repo: "domkrm/ufw"
ref: "1.1.4"
camptocamp-systemd:
repo: "camptocamp/systemd"
ref: "3.0.0"
puppetlabs-concat:
ref: "5.0.0"
puppetlabs-firewall:
repo: "puppetlabs/firewall"
ref: "8.0.2"
puppet-systemd: # inifile is dep
repo: "puppet/systemd"
ref: "7.0.0"
puppetlabs-concat: # needs stdlib 9 >
repo: "puppetlabs/concat"
ref: "7.0.1"
ref: "9.0.2"
puppetlabs-augeas_core:
repo: "puppetlabs/augeas_core"
ref: "1.1.2"
ref: "1.5.0"
repositories:
provision: https://github.com/puppetlabs/provision.git
puppet_agent:
repo: https://github.com/puppetlabs/puppetlabs-puppet_agent.git
ref: v4.19.0
facts: https://github.com/puppetlabs/puppetlabs-facts.git
99 changes: 99 additions & 0 deletions .github/workflows/acceptance_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
name: "Acceptance Testing"

on:
pull_request:
branches:
- "main"

jobs:

setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}

steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Activate Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true

- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Setup Integration Test Matrix
id: get-matrix
run: |
echo "matrix=$(cat test_matrix.json | tr -s '\n' ' ')" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
acceptance:
name: "Acceptance tests (${{matrix.collection.agent_version}})"
needs:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}

runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}

env:
PUPPET_GEM_VERSION: ${{matrix.collection.gem_version}}
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?

steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Activate Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true

- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Create the fixtures directory
run: |
bundle exec rake spec_prep
- name: check vars
run: |
export
- name: Provision test environment
run: |
bundle exec rake 'litmus:provision_list[docker]'
FILE='spec/fixtures/litmus_inventory.yaml'
- name: Install Agents and module
run: |
# bundle exec rake 'litmus:install_agent'
bundle exec rake 'litmus:install_agent[${{ matrix.collection.agent_version }}]'
bundle exec rake litmus:install_module
- name: Run integration tests
run: |
bundle exec rake litmus:acceptance:parallel
- name: Remove test environment
if: ${{ always() }}
continue-on-error: true
run: |
ls -lh ./spec/fixtures/
cat ./spec/fixtures/litmus_inventory.yaml
bundle exec rake 'litmus:tear_down'
71 changes: 71 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: "Lint testing"

on:
pull_request:
branches:
- "main"

jobs:
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}

steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Activate Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true

- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Setup Integration Test Matrix
id: get-matrix
run: |
echo "matrix=$(cat test_matrix.json | tr -s '\n' ' ')" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
lint:
name: "Lint tests (${{matrix.collection.agent_version}})"
needs:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}

runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}

env:
PUPPET_GEM_VERSION: ${{matrix.collection.gem_version}}
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?

steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Activate Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true

- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: "Run tests"
run: |
bundle exec rake validate
71 changes: 71 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: "Unit Testing"

on:
pull_request:
branches:
- "main"

jobs:
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}

steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Activate Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true

- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Setup Integration Test Matrix
id: get-matrix
run: |
echo "matrix=$(cat test_matrix.json | tr -s '\n' ' ')" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
Unit:
name: "Unit tests (${{matrix.collection.agent_version}})"
needs:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}

runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}

env:
PUPPET_GEM_VERSION: ${{matrix.collection.gem_version}}
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?

steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Activate Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true

- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: "Run tests"
run: |
bundle exec rake parallel_spec
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/spec/fixtures/modules/*
/tmp/
/vendor/
/convert_report.txt
Expand Down
9 changes: 3 additions & 6 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/spec/fixtures/modules/*
/tmp/
/vendor/
/convert_report.txt
Expand All @@ -26,20 +26,17 @@
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/appveyor.yml
/.editorconfig
/.fixtures.yml
/Gemfile
/.gitattributes
/.github/
/.gitignore
/.gitlab-ci.yml
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
/.rubocop.yml
/.travis.yml
/..yml
/.yardopts
/spec/
/.vscode/
Expand Down
Loading

0 comments on commit b8c1547

Please sign in to comment.