in google-cloud-server/src/main/kotlin/jetbrains/buildServer/clouds/google/GoogleCloudClientFactory.kt [41:59]
override fun createNewClient(state: CloudState,
params: CloudClientParameters,
errors: Array<TypedCloudErrorInfo>): GoogleCloudClient {
val credentialsType = params.getParameter(GoogleConstants.CREDENTIALS_TYPE)
val apiConnector = if (credentialsType != GoogleConstants.CREDENTIALS_ENVIRONMENT) {
val accessKey = getParameter(params, GoogleConstants.ACCESS_KEY)
GoogleApiConnectorImpl(accessKey)
} else {
GoogleApiConnectorImpl()
}
apiConnector.setServerId(mySettings.serverUUID)
apiConnector.setProfileId(state.profileId)
val cloudClient = GoogleCloudClient(params, apiConnector, myImagesHolder, myGoogleStorage)
cloudClient.updateErrors(*errors)
return cloudClient
}