net.nemerosa.ontrack.extension.jenkins.client.DefaultJenkinsClientFactory.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-extension-jenkins Show documentation
Show all versions of ontrack-extension-jenkins Show documentation
Ontrack module: ontrack-extension-jenkins
package net.nemerosa.ontrack.extension.jenkins.client
import net.nemerosa.ontrack.extension.jenkins.JenkinsConfiguration
import net.nemerosa.ontrack.extension.jenkins.JenkinsConfigurationProperties
import net.nemerosa.ontrack.extension.support.client.ClientConnection
import net.nemerosa.ontrack.extension.support.client.ClientFactory
import org.springframework.stereotype.Component
@Component
class DefaultJenkinsClientFactory(
private val clientFactory: ClientFactory,
private val jenkinsConfigurationProperties: JenkinsConfigurationProperties
) : JenkinsClientFactory {
override fun getClient(configuration: JenkinsConfiguration): JenkinsClient {
return DefaultJenkinsClient(
clientFactory.getJsonClient(
ClientConnection(
configuration.url,
configuration.user,
configuration.password,
jenkinsConfigurationProperties.timeout
)
)
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy