Skip to content
Open
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
8 changes: 4 additions & 4 deletions lib/jenkins_api_client/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ def get_promotions(job_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)
@client.post_config("/job/#{path_encode job_name}/promotion/createProcess?name=#{path_encode process}", config)
end


Expand All @@ -1519,7 +1519,7 @@ def init_promote_process(job_name, process, config)
# @return [String] Promote config
def get_promote_config(job_name, process)
@logger.info "Getting promote config for job '#{job_name}' process '#{process}'"
@client.get_config("/job/#{job_name}/promotion/process/#{process}/config.xml")
@client.get_config("/job/#{path_encode job_name}/promotion/process/#{path_encode process}/config.xml")
end

# Set a job's promotion config
Expand All @@ -1530,7 +1530,7 @@ def get_promote_config(job_name, process)
# @return nil
def set_promote_config(job_name, process, config)
@logger.info "Setting promote config for job '#{job_name}' process '#{process}' to #{config}"
@client.post_config("/job/#{job_name}/promotion/process/#{process}/config.xml", config)
@client.post_config("/job/#{path_encode job_name}/promotion/process/#{path_encode process}/config.xml", config)
end

# Delete a job's promotion config
Expand All @@ -1540,7 +1540,7 @@ def set_promote_config(job_name, process, config)
# @return nil
def delete_promote_config(job_name, process)
@logger.info "Deleting promote config for job '#{job_name}' process '#{process}'"
@client.post_config("/job/#{job_name}/promotion/process/#{process}/doDelete")
@client.post_config("/job/#{path_encode job_name}/promotion/process/#{path_encode process}/doDelete")
end

#A Method to find artifacts path from the Current Build
Expand Down