Annotation Type DockerFixture
-
@Target(TYPE) @Retention(RUNTIME) @Indexed @Inherited public @interface DockerFixture
AnnotatesDockerContainer
subtype that exposes fixture-specific methods.The fixture should be accompanied by a
Dockerfile
resource in a predictable spot (seedockerfileFolder()
). A fixture class may extend another fixture class. In this case theFROM
directive should specify an image whose name isjenkins/
followed by theid()
of the parent fixture; the tag is the first 12 characters of thesha1sum
of the parent fixture’sDockerfile
. You will be able to see the tagged parent image names in your log.- Author:
- Kohsuke Kawaguchi, asotobueno
-
-
Field Summary
Fields Modifier and Type Fields Description static String
DEFAULT_DOCKER_IP
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
bindIp
Deprecated.this assumes you have network knowledge of the running ATH environment which you can not possibly have.String
dockerfileFolder
Path of Dockerfile file.boolean
matchHostPorts
Map container ports to host ports exactly.int[]
ports
TCP ports that are exposed from this fixture.int[]
udpPorts
UDP ports that are exposed from this fixture.
-
-
-
Field Detail
-
DEFAULT_DOCKER_IP
static final String DEFAULT_DOCKER_IP
-
-
Element Detail
-
id
String id
Unique ID of this fixture. Used from cucumber, etc. to find this annotation.
-
-
-
ports
int[] ports
TCP ports that are exposed from this fixture.When a container is started, these ports from the container are mapped to random ephemeral ports on the host. The actual ephemeral port number can be retried at runtime via
DockerContainer.port(int)
.- Default:
- {}
-
-
-
udpPorts
int[] udpPorts
UDP ports that are exposed from this fixture.When a container is started, these ports from the container are mapped to random ephemeral ports on the host. The actual ephemeral port number can be retried at runtime via
DockerContainer.udpPort(int)
.- Default:
- {}
-
-
-
bindIp
@Deprecated String bindIp
Deprecated.this assumes you have network knowledge of the running ATH environment which you can not possibly have. Docker may be running on a remote machine and as such any address (e.g.127.0.0.5
) you specify may not be reachable.Ip address to bind to- Default:
- ""
-
-
-
dockerfileFolder
String dockerfileFolder
Path of Dockerfile file.By default Dockerfile fixture should be placed in the resource directory and at the same package as DockerContainer subtype.
If this attribute is present, Dockerfile folder specified in the attribute is used as Dockerfile fixture place.
- Default:
- ""
-
-