-
Improvement
-
Resolution: Unresolved
-
Minor
Create attribute to set Dockerfile location in @DockerFixture. By default Dockerfile fixture should be placed in the resource directory and at the same package as DockerContainer subtype.
A new optional attribute called dockerfile can be added at @DockerFixture, so if it is not present then default behaviour is the expected, but if the attribute is present, Dockerfile location is get from there. This allows save Dockerfile in places where they can be reused.
An example of the annotation might be:
@DockerFixture(id="jira", ports="2909", dockerfile="a/b") public class JiraContainer ....
Classpath resolution will be based on class where annotation is defined.
[JENKINS-29976] Create an attribute to set Dockerfile location in @DockerFixture
Summary | Original: Create attribute to set Dockerfile location in @DockerFixture | New: Create an attribute to set Dockerfile location in @DockerFixture |
Description |
Original:
Create attribute to set Dockerfile location in {{@DockerFixture}}. By default Dockerfile fixture should be placed in the resource directory and at the same package as {{DockerContainer}} subtype. A new optional attribute called {{dockerfile}} can be added at {{@DockerFixture}}, so if it is not present then default behaviour is the expected, but if the attribute is present, Dockerfile definition is get from there. This allows two things: * Be able to name Dockerfile with any name. * Save Dockerfile in places where they can be reused. {{dockerfile}} attribute can contain three kind of values: * File based: file:///a/b/c/Dockerfile which resolves Dockerfile from file location. * Classpath based: classpath://a/b/c/Dockerfile which resolves Dockerfile from classpath location. * No schema provided which by default uses the classpath ones. An example of the annotation might be: {code:java} @DockerFixture(id="jira", ports="2909", dockerfile="a/b/Dockerfile") public class JiraContainer .... {code} Classpath resolution will be based on class where annotation is defined. |
New:
Create attribute to set Dockerfile location in {{@DockerFixture}}. By default Dockerfile fixture should be placed in the resource directory and at the same package as {{DockerContainer}} subtype. A new optional attribute called {{dockerfile}} can be added at {{@DockerFixture}}, so if it is not present then default behaviour is the expected, but if the attribute is present, Dockerfile location is get from there. This allows save Dockerfile in places where they can be reused. {{dockerfile}} attribute can contain three kind of values: * File based: file:///a/b/c which resolves Dockerfile from file location. * Classpath based: classpath://a/b/c which resolves Dockerfile from classpath location. * No schema provided which by default uses the classpath ones. An example of the annotation might be: {code:java} @DockerFixture(id="jira", ports="2909", dockerfile="a/b") public class JiraContainer .... {code} Classpath resolution will be based on class where annotation is defined. |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Description |
Original:
Create attribute to set Dockerfile location in {{@DockerFixture}}. By default Dockerfile fixture should be placed in the resource directory and at the same package as {{DockerContainer}} subtype. A new optional attribute called {{dockerfile}} can be added at {{@DockerFixture}}, so if it is not present then default behaviour is the expected, but if the attribute is present, Dockerfile location is get from there. This allows save Dockerfile in places where they can be reused. {{dockerfile}} attribute can contain three kind of values: * File based: file:///a/b/c which resolves Dockerfile from file location. * Classpath based: classpath://a/b/c which resolves Dockerfile from classpath location. * No schema provided which by default uses the classpath ones. An example of the annotation might be: {code:java} @DockerFixture(id="jira", ports="2909", dockerfile="a/b") public class JiraContainer .... {code} Classpath resolution will be based on class where annotation is defined. |
New:
Create attribute to set Dockerfile location in {{@DockerFixture}}. By default Dockerfile fixture should be placed in the resource directory and at the same package as {{DockerContainer}} subtype. A new optional attribute called {{dockerfile}} can be added at {{@DockerFixture}}, so if it is not present then default behaviour is the expected, but if the attribute is present, Dockerfile location is get from there. This allows save Dockerfile in places where they can be reused. An example of the annotation might be: {code:java} @DockerFixture(id="jira", ports="2909", dockerfile="a/b") public class JiraContainer .... {code} Classpath resolution will be based on class where annotation is defined. |
Workflow | Original: JNJira [ 165055 ] | New: JNJira + In-Review [ 185627 ] |
Code changed in jenkins
User: Alex Soto
Path:
docs/FIXTURES.md
pom.xml
src/main/java/org/jenkinsci/test/acceptance/docker/Docker.java
src/main/java/org/jenkinsci/test/acceptance/docker/DockerFixture.java
src/test/java/org/jenkinsci/test/acceptance/docker/DockerTest.java
src/test/resources/org/jenkinsci/test/acceptance/docker/DockerTest/TestContainer/Dockerfile
src/test/resources/test/Dockerfile
http://jenkins-ci.org/commit/acceptance-test-harness/c9e5ec7dc646c33cd017b0b2c26a28d300e19f27
Log:
JENKINS-29976 Create an attribute to set Dockerfile location in @DockerFixture.