Last active
August 29, 2015 14:01
-
-
Save thommay/05bece4bf798f84937ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def jj(p) | |
name = p.name.sub(/-cook/, " cook") | |
n_xml = Nokogiri::XML(@jenkins.client.job.get_config(name)) | |
path = n_xml.xpath("//url").children.first | |
path.content = p.ssh_url_to_repo | |
gitlab = n_xml.xpath("//__projectPath").children.first | |
gitlab.content = p.web_url unless gitlab.nil? | |
@jenkins.client.job.post_config(name, n_xml.to_xml) | |
end | |
@gitlab.gl.projects(per_page: 100).select { |p| p.name =~ /.*cookbook/ }.reject{ |p| p.ssh_url_to_repo =~ /^[email protected]:cookbooks/ }.each do |prj| | |
@gitlab.gl.transfer_project_to_group(32, prj.id) | |
prj = @gitlab.gl.project(prj.id) | |
jj prj | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment