Bug 1033146 - Not able to override $MAVEN_ARGS values in JBoss EWS cartridge
Summary: Not able to override $MAVEN_ARGS values in JBoss EWS cartridge
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.0.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1033144
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-21 15:44 UTC by Nikhil Mone
Modified: 2017-03-08 17:36 UTC (History)
6 users (show)

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.
Clone Of: 1033144
Environment:
Last Closed: 2014-01-28 16:39:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0102 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.2 bug fix and enhancement update 2014-01-28 21:38:01 UTC

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


Note You need to log in before you can comment on or make changes to this bug.