com.avast.gradle.dockercompose.ContainerInfo.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-docker-compose-plugin Show documentation
Show all versions of gradle-docker-compose-plugin Show documentation
Simplifies usage of Docker Compose for integration testing in Gradle environment.
package com.avast.gradle.dockercompose
import groovy.transform.Immutable
//@Immutable // see ServiceHost.groovy
class ContainerInfo {
/* For example serviceName_1 */
String instanceName
ServiceHost serviceHost
/* Mapping from exposed to forwarded port. */
Map tcpPorts
Map udpPorts
/* Docker inspection */
Map inspection
String getContainerId() { inspection.Id }
String getContainerHostname() { inspection.Config.Hostname }
String getHost() { serviceHost.host }
Map getPorts() { tcpPorts }
Integer getPort() { ports.values().find() }
Integer getTcpPort() { tcpPorts.values().find() }
Integer getUdpPort() { udpPorts.values().find() }
@Override
public String toString() {
return "ContainerInfo{" +
"instanceName='" + instanceName + '\'' +
", serviceHost=" + serviceHost +
", tcpPorts=" + tcpPorts +
", udpPorts=" + udpPorts +
", inspection=" + inspection +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy