Skip to content
Open
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
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"name": "VoxBox",
"image": "ghcr.io/voxpupuli/voxbox:latest"
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,29 @@ on:
branches:
- main
- master
workflow_dispatch:
inputs:
beaker_staging_url:
description: |-
URL to a staging Server to test unreleased packages.
We will append the version to the Server and assume all packages are in the same directory.
Only supported for AIO packages.
required: false
type: string
default: 'https://artifacts.voxpupuli.org/openvox-agent'
beaker_collection:
description: |-
When set to staging, we will download the packages from staging_url.
Otherwise we will use the official repos. Supported values: puppet7, puppet8, openvox7, openvox8, staging.
When unset, we will generate a list of supported collections based on metadata.json.
required: false
type: string
beaker_staging_version:
description: |-
The package version we want to test.
Only used for beaker_collection = staging
required: false
type: string

concurrency:
group: ${{ github.ref_name }}
Expand All @@ -23,3 +46,7 @@ jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v4
with:
beaker_staging_url: ${{ inputs.beaker_staging_url }}
beaker_collection: ${{ inputs.beaker_collection }}
beaker_staging_version: ${{ inputs.beaker_staging_version }}
22 changes: 22 additions & 0 deletions .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: Create Git tag

on:
workflow_dispatch:

permissions: {}

jobs:
create_tag:
uses: 'voxpupuli/gha-puppet/.github/workflows/create_tag.yml@v4'
with:
allowed_owner: 'voxpupuli'
git_name: 'pccibot'
git_email: '12855858+pccibot@users.noreply.github.com'
secrets:
# Configure secrets here:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
ssh_private_key: ${{ secrets.PCCI_SSH_PRIVATE_KEY }}
5 changes: 4 additions & 1 deletion .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ permissions:

jobs:
release_prep:
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3'
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v4'
with:
version: ${{ github.event.inputs.version }}
allowed_owner: 'voxpupuli'
git_name: 'pccibot'
git_email: '12855858+pccibot@users.noreply.github.com'
secrets:
# Configure secrets here:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}'
ssh_private_key: '${{ secrets.PCCI_SSH_PRIVATE_KEY }}'
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ name: Release
on:
push:
tags:
- '*'
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#filter-pattern-cheat-sheet
- 'v[0-9]+.[0-9]+.[0-9]+'

permissions:
contents: write

jobs:
release:
name: Release
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v4
with:
allowed_owner: 'voxpupuli'
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '10.5.0'
modulesync_config_version: '10.8.0'
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_from: .rubocop_todo.yml
inherit_gem:
voxpupuli-test: rubocop.yml
34 changes: 34 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This configuration was generated by
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
# using RuboCop version 1.85.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/IncludeExamples:
Exclude:
- 'spec/acceptance/tests/class_v5_spec.rb'
- 'spec/acceptance/tests/snapshot.rb'
- 'spec/helpers/acceptance/tests/class_shared_examples.rb'
- 'spec/unit/provider/kibana_plugin/kibana_plugin_spec.rb'
- 'spec/unit/provider/kibana_plugin/kibana_spec.rb'

# Offense count: 1
RSpec/LeakyLocalVariable:
Exclude:
- 'spec/helpers/acceptance/tests/basic_shared_examples.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/Output:
Exclude:
- 'spec/spec_utilities.rb'

# Offense count: 2
RSpec/SpecFilePathSuffix:
Exclude:
- 'spec/acceptance/tests/snapshot.rb'
- 'spec/functions/kibana_hash2yaml.rb'
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 13.0', :require => false
gem 'puppet_metadata', '~> 6.0', :require => false
gem 'voxpupuli-test', '~> 14.0', :require => false
gem 'puppet_metadata', '~> 6.1', :require => false
end

group :development do
Expand All @@ -14,12 +14,12 @@ group :development do
end

group :system_tests do
gem 'voxpupuli-acceptance', '~> 4.0', :require => false
gem 'voxpupuli-acceptance', '~> 4.4', :require => false
gem 'rspec-retry', :require => false
end

group :release do
gem 'voxpupuli-release', '~> 5.0', :require => false
gem 'voxpupuli-release', '~> 5.3', :require => false
end

gem 'rake', :require => false
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/functions/kibana/hash2yaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

def yaml(input, options = {})
settings = {
'header' => '# File managed by Puppet.'
'header' => '# File managed by Puppet.',
}

settings.merge!(options)
Expand Down
4 changes: 2 additions & 2 deletions lib/puppet/provider/elastic_kibana.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def self.present_plugins
name: File.basename(plugin),
ensure: :present,
provider: name,
version: j['version']
version: j['version'],
}
end
end
Expand Down Expand Up @@ -146,7 +146,7 @@ def self.prefetch(resources)

# Provider constructor
def initialize(value = {})
super(value)
super
@property_flush = {}
end
end
2 changes: 1 addition & 1 deletion lib/puppet/provider/kibana_plugin/kibana.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
home_path: File.join(%w[/ opt kibana]),
install_args: ['plugin', '--install'],
plugin_directory: 'installedPlugins',
remove_args: ['plugin', '--remove']
remove_args: ['plugin', '--remove'],
) do
desc 'Native command-line provider for Kibana v4 plugins.'

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/kibana_plugin/kibana_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
home_path: File.join(%w[/ usr share kibana]),
install_args: ['install'],
plugin_directory: 'plugins',
remove_args: ['remove']
remove_args: ['remove'],
) do
desc 'Native command-line provider for Kibana v5 plugins.'

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/kibana_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
end

autorequire(:package) do
self[:ensure] == :absent ? [] : 'kibana'
(self[:ensure] == :absent) ? [] : 'kibana'
end

validate do
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/tests/class_v5_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let(:plugin) { 'health_metric_vis' }
let(:plugin_version) { '0.3.4' }
let(:port) { 5602 }
let(:version) { fact('osfamily') == 'RedHat' ? '5.2.0-1' : '5.2.0' }
let(:version) { (fact('osfamily') == 'RedHat') ? '5.2.0-1' : '5.2.0' }

let(:manifest) do
<<-MANIFEST
Expand Down
Loading
Loading