Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Promotion Processes #177

Merged
merged 2 commits into from
May 29, 2015
Merged
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
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