Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29976

Create an attribute to set Dockerfile location in @DockerFixture

      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

          Alex Soto created issue -
          Alex Soto made changes -
          Summary Original: Create attribute to set Dockerfile location in @DockerFixture New: Create an attribute to set Dockerfile location in @DockerFixture
          Alex Soto made changes -
          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.

          Alex Soto made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Alex Soto made changes -
          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.

          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 165055 ] New: JNJira + In-Review [ 185627 ]

            asotobueno Alex Soto
            asotobueno Alex Soto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: