Class: JenkinsPipelineBuilder::CLI::Pipeline
- Inherits:
-
Thor
- Object
- Thor
- JenkinsPipelineBuilder::CLI::Pipeline
- Includes:
- Thor::Actions
- Defined in:
- lib/jenkins_pipeline_builder/cli/pipeline.rb
Overview
This class provides various command line operations related to jobs.
Instance Method Summary collapse
- #bootstrap(path, project_name = nil) ⇒ Object
- #dump(job_name) ⇒ Object
- #file(path, project_name = nil) ⇒ Object
- #pull_request(path, project_name = nil) ⇒ Object
Instance Method Details
#bootstrap(path, project_name = nil) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/jenkins_pipeline_builder/cli/pipeline.rb', line 35 def bootstrap(path, project_name = nil) failed = Helper.setup().bootstrap(path, project_name) exit(0) if failed.empty? # weird ordering, but rubocop decrees JenkinsPipelineBuilder.logger.error 'Encountered error during run' exit(1) end |
#dump(job_name) ⇒ Object
30 31 32 |
# File 'lib/jenkins_pipeline_builder/cli/pipeline.rb', line 30 def dump(job_name) Helper.setup().dump(job_name) end |
#file(path, project_name = nil) ⇒ Object
49 50 51 |
# File 'lib/jenkins_pipeline_builder/cli/pipeline.rb', line 49 def file(path, project_name = nil) Helper.setup().file(path, project_name) end |
#pull_request(path, project_name = nil) ⇒ Object
44 45 46 |
# File 'lib/jenkins_pipeline_builder/cli/pipeline.rb', line 44 def pull_request(path, project_name = nil) Helper.setup().pull_request(path, project_name, [:base_branch_only]) end |