Bug 1033146

Summary: Not able to override $MAVEN_ARGS values in JBoss EWS cartridge
Product: OpenShift Container Platform Reporter: Nikhil Mone <nmone>
Component: ImageStreamsAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0CC: adellape, bleanhar, brice.vandeputte, gpei, jolamb, nmone
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: openshift-origin-cartridge-jbossews-1.17.2.1-1.el6op Doc Type: Bug Fix
Doc Text:
The MAVEN_ARGS environment variable could not be set with JBoss EWS cartridges because it would reset to the default value of the cartridge when application changes were pushed. This fix updates the build script for the JBoss EWS cartridge so that the default value of the cartridge is only used if MAVEN_ARGS is not defined. If it is defined, the user configuration is used.
Story Points: ---
Clone Of: 1033144 Environment:
Last Closed: 2014-01-28 16:39:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1033144    
Bug Blocks:    

Description Nikhil Mone 2013-11-21 15:44:28 UTC
+++ This bug was initially created as a clone of Bug #1033144 +++

Description of problem: Not able to override $MAVEN_ARGS values in JBoss EWS cartridge. See below :

[1] https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-jbossews/bin/build

One needs to modify  :

export MAVEN_ARGS="clean package -Popenshift -DskipTests"

to 

if [ -z "$MAVEN_ARGS" ]; then
   export MAVEN_ARGS="clean package -Popenshift -DskipTests"
fi

Similar to JBoss EAP cartridge


Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1. Create a JBoss EWS application
2. create an action hook to override $MAVEN_ARGS
3. git add > commit > push the application, you will see variable is not overridden. 

Actual results:

$MAVEN_ARGS value stays to default : "clean package -Popenshift -DskipTests"

Expected results:

Should be overridden with the values provided in action hook

Additional info:

Comment 3 Brenton Leanhardt 2014-01-14 14:44:44 UTC
Cherry-picking:

commit be5a392a0a4a17dc335f4a7dc57f01c579d56fb2
Author: Dan Mace <ironcladlou>
Date:   Fri Nov 22 10:00:32 2013 -0500

    Bug 1033144: Allow MAVEN_ARGS overriding in jbossews builds


PR: https://github.com/openshift/enterprise-server/pull/195

Comment 5 Gaoyun Pei 2014-01-15 08:16:47 UTC
Verify this bug with package  openshift-origin-cartridge-jbossews-1.17.2.1-1.el6op

1. Create a jbossews-2.0 app
2. Set a custom env value to $MAVEN_ARGS
[root@broker app]# rhc env-set -a app -e MAVEN_ARGS="post-integration-test"
Password: ******
Setting environment variable(s) ... done
3. Check the env variable after build process
[root@broker app]# date > b
[root@broker app]# git add . && git commit -amp && git push
...
[root@broker app]# rhc ssh app --gear 'env|grep MAVEN_ARGS'
Password: ******
=== 52d616edea28b95392000ad6 jbossews-2.0
MAVEN_ARGS=post-integration-test

Comment 7 errata-xmlrpc 2014-01-28 16:39:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0102.html