[ 
https://issues.apache.org/jira/browse/METRON-857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15979918#comment-15979918
 ] 

ASF GitHub Bot commented on METRON-857:
---------------------------------------

Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/543#discussion_r112809273
  
    --- Diff: metron-deployment/packaging/docker/rpm-docker/pom.xml ---
    @@ -227,4 +183,97 @@
                 </plugin>
             </plugins>
         </build>
    +    <profiles>
    +        <profile>
    +            <id>InDocker</id>
    +            <activation>
    +                <file>
    +                    <!-- If this file exists, then we are running in 
docker already -->
    +                    <exists>/.dockerenv</exists>
    +                </file>
    +            </activation>
    +            <build>
    +                <plugins>
    +                    <plugin>
    +                        <groupId>org.codehaus.mojo</groupId>
    +                        <artifactId>exec-maven-plugin</artifactId>
    +                        <version>1.5.0</version>
    +                        <executions>
    +                            <execution>
    +                                <id>rpm-build</id>
    +                                <phase>package</phase>
    +                                <goals>
    +                                    <goal>exec</goal>
    +                                </goals>
    +                                <configuration>
    +                                    <executable>/bin/bash</executable>
    +                                    <arguments>
    +                                        <argument>-c</argument>
    +                                        <argument>./build.sh 
${project.version}</argument>
    +                                    </arguments>
    +                                </configuration>
    +                            </execution>
    +                        </executions>
    +                    </plugin>
    +                </plugins>
    +            </build>
    +        </profile>
    +        <profile>
    +            <id>NeedsDocker</id>
    +            <activation>
    --- End diff --
    
    - I think this is the proper level to have this profile
    - I prefer two clear profiles to one profile that acts as an override 


> Metron should one unified docker build image
> --------------------------------------------
>
>                 Key: METRON-857
>                 URL: https://issues.apache.org/jira/browse/METRON-857
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Otto Fowler
>            Assignee: Otto Fowler
>
> Right now, we have a docker environment for building the code of the product, 
> and a docker image for building rpms.
> If you are in an environment that requires the first, you cannot use the 
> second from there.
> We should have a merged, unified metron build environment that builds the 
> whole product.
> This will enable workflows such as: 
> https://cwiki.apache.org/confluence/display/METRON/Metron+Installation+on+an+Ambari-Managed+Cluster
> That page can be updated once this is complete as well
> The approach:
> Using maven profiles and profile activation it is possible to have two 
> versions of the exec call to build rpms, one that calls docker and one that 
> just calls the script.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to