bin/nixenvironment in nixenvironment-0.0.75 vs bin/nixenvironment in nixenvironment-0.0.77
- old
+ new
@@ -236,9 +236,59 @@
c.description = 'Make working copy clean'
c.option '--all', 'Remove ignored files too'
c.action { |_args, options| clean_working_copy(options.all) }
end
+command :slave do |c|
+ c.syntax = 'nixenvironment slave'
+ c.description = 'Jenkins slave'
+ c.option '--init', 'Init Jenkins slave'
+ c.option '--start', 'Start Jenkins slave'
+ c.option '--deinit', 'Deinit Jenkins slave'
+ c.action do |_args, options|
+ if options.init
+ SlaveInitializer.new.start
+ elsif options.deinit
+ SlaveDeinitializer.new.start
+ end
+
+ if options.start
+ starter = SlaveStarter.new
+
+ begin
+ starter.start
+ rescue SystemExit, Interrupt
+ starter.stop
+ end
+ end
+ end
+end
+
+command :master do |c|
+ c.syntax = 'nixenvironment master'
+ c.description = 'Jenkins master'
+ c.option '--init', 'Init Jenkins master'
+ c.option '--start', 'Start Jenkins master'
+ c.option '--deinit', 'Deinit Jenkins master'
+ c.action do |_args, options|
+ if options.init
+ MasterInitializer.new.start
+ elsif options.deinit
+ MasterDeinitializer.new.start
+ end
+
+ if options.start
+ starter = MastertStarter.new
+
+ begin
+ starter.start
+ rescue SystemExit, Interrupt
+ starter.stop
+ end
+ end
+ end
+end
+
def init
template_project_url = nil
template_project_types = []
puts 'Select project type (put index or name):'
\ No newline at end of file