# encoding: UTF-8 require 'jenkins_api_client' class SerproIntegrationPlugin::JenkinsIntegration def initialize(host, private_token, user) @client = JenkinsApi::Client.new(:server_url => host, :password => private_token, :username => user) end #FIXME make jenkins integration works def create_jenkis_project(profile, repository_path, web_url, git_url) #begin @client.job.create(profile.jenkins_project_name, xml_jenkins(repository_path, web_url, git_url)) #rescue JenkinsApi::Exceptions::ApiException #end end #FIXME def xml_jenkins(repository_path, web_url, git_url) " Projeto criado para o repositório #{repository_path} do Gitlab - #{web_url} -1 2 -1 -1 false 2 #{git_url} */master false true false false false (Inherit From Job) false clean package install deploy true false true false false false false -1 false false false true true (Inherit From Job) false FAILURE 2 RED " end end