Skip to content

Commit

Permalink
Fix 'stacks test'
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgibbins committed Feb 19, 2020
1 parent 554abf9 commit f6ceaca
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ FROM ruby:${ruby_version}-alpine as build

RUN apk add --no-cache make gcc libc-dev

WORKDIR /build
WORKDIR /root
COPY Gemfile Gemfile.lock ./

WORKDIR /build/vendor/bundle/ruby
WORKDIR /root/vendor/bundle/ruby
RUN bundle install --no-cache --deployment --without development && \
rm -rf ./*/cache ./*/gems/*/spec/* ./*/gems/*/tests/*

Expand All @@ -29,7 +29,7 @@ RUN chmod +x /usr/local/bin/kubectl && \

WORKDIR /root

COPY --from=build /build /root
COPY --from=build /root /root
COPY --from=build /usr/local/bundle /usr/local/bundle

COPY bin /usr/local/bin/
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ source 'https://rubygems.org'
gem 'collimator', '0.0.3'
gem 'mcollective-client', '2.8.2'
gem 'puppet', '3.7.5'
gem 'rspec', '3.3.0' # used by stacks test command

group :development do
gem 'ci_reporter_rspec', '1.0.0'
gem 'pry'
gem 'pry-byebug'
gem 'rake', '10.1.0'
gem 'rspec', '3.3.0'
gem 'rubocop', '0.32.1'
gem 'syck' if RUBY_VERSION.split('.').first.to_i > 1
end
52 changes: 52 additions & 0 deletions mcollective_plugins/agent/nrpe.ddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
metadata :name => "nrpe",
:description => "Agent to query NRPE commands via MCollective",
:author => "R.I.Pienaar",
:license => "Apache 2",
:version => "2.2",
:url => "http://projects.puppetlabs.com/projects/mcollective-plugins/wiki",
:timeout => 60


action "runallcommands", :description => "Runs all NRPE commands" do
output :commands,
:description => "Output from the Nagios plugind",
:display_as => "Commands",
:default => ""
end

action "runcommand", :description => "Run a NRPE command" do
input :command,
:prompt => "Command",
:description => "NRPE command to run",
:type => :string,
:validation => '\A[a-zA-Z0-9_-]+\z',
:optional => false,
:maxlength => 50

output :output,
:description => "Output from the Nagios plugin",
:display_as => "Output",
:default => ""

output :exitcode,
:description => "Exit Code from the Nagios plugin",
:display_as => "Exit Code",
:default => 3

output :perfdata,
:description => "Performance Data from the Nagios plugin",
:display_as => "Performance Data",
:default => ""

output :command,
:description => "Command that was run",
:display_as => "Command",
:default => ""

if respond_to?(:summarize)
summarize do
aggregate nagios_states(:exitcode)
end
end
end

0 comments on commit f6ceaca

Please sign in to comment.