# encoding: UTF-8 require 'jenkins_api_client' class SerproIntegrationPlugin::JenkinsIntegration #FIXME make jenkins integration works def self.create_jenkis_project(profile, projectName, repositoryPath, webUrl, gitUrl) @client = JenkinsApi::Client.new(:server_url => profile.serpro_integration_plugin_settings.jenkins[:host], :password => profile.serpro_integration_plugin_settings.jenkins[:private_token], :username => profile.serpro_integration_plugin_settings.jenkins[:user]) #begin @client.job.create(projectName, xml_jenkins(repositoryPath, webUrl, gitUrl)) #rescue JenkinsApi::Exceptions::ApiException #end end #FIXME def self.xml_jenkins(repositoryPath, webUrl, gitUrl) " Projeto criado para o repositório #{repositoryPath} do Gitlab - #{webUrl} -1 2 -1 -1 false 2 #{gitUrl} */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