Skip to content

Commit

Permalink
Merge pull request #177 from AndrewHanes/promote
Browse files Browse the repository at this point in the history
Create Promotion Processes
  • Loading branch information
arangamani committed May 29, 2015
2 parents 92706e7 + 2c9167f commit ced258a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/jenkins_api_client/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,21 @@ def get_promotions(job_name)
result
end


# Create a new promotion process
#
# This must be called before set/get promote config can be used on a process
#
# Must be called after updating the job's config
# @param [String] job_name
# @param [String] process The process name
# @return [String] Process config
def init_promote_process(job_name, process, config)
@logger.info "Creating new process #{process} for job #{job_name}"
@client.post_config("/job/#{job_name}/promotion/createProcess?name=#{process}", config)
end


# Get a job's promotion config
#
# @param [String] job_name
Expand Down

0 comments on commit ced258a

Please sign in to comment.