Auto respond 'yes' for 'grails war' on Hudson - plugins

We're using 'grails war' to build a war on hudson then another job to deploy to our test environment.
The problem is that when the 'grails war' encounters a plugin upgrade, it will continuously ask the user to upgrade certain plugins.
Is there a way to respond 'y' on all user input?
I tried --non-interactive but that seems to do nothing.

You may need to put quotes around the run target in the Targets text field:
"war --non-interactive"

yes | grails war
assuming your on OSX/unix/Linux/cygwin. That answers yes for all questions that the program you pipe it to asks.
if you only want to say yes once, you can use
echo y | grails war

Related

Testng - Ant - windows terminal how to deal with errant input

I have a java selenium QA project where we use ant and testng via the powershell terminal. What I would like help with is creating a redirect if a tester enters a typo in the terminal.
If I am in the run directory and I simply type ant, it will run the default.xml file listed in the build.xml file which is what I expect.
If I enter an actual ant command with a typo though:
ant -Dtestdir= c:\dev\qa\src\tests -Dtestxml=blablabla
it will attempt to run every test.xml file in the test directory. This is especially problematic because most of the those test.xml files call java classes that contain #Factory and #Dataprovider(s) and they allocate everything at once which just causes everything to fail.
What I would like is a way to tell ant if the input is erroneous, then run the default.xml file(which I have configured to populate an html error page). I've been reviewing both testng and ant docs and I'm not finding a solution, so your guidance would be appreciated.
Other than this one issue, the system works very well.
After digging around a bit more and learning how to ask the question properly, I found 2 great examples here on SO.
1) Create an additional ant target that checks for the existence of the file the user has typed. And add it to the depends attribute of the main target , and also adding the if attribute.
Example
2) Use the Ant fail task and fail the build (with a message) if the file is not available. I prefer this one because the tester can get some feedback.
Example 2

How to disable/bypass JBoss EWS 2.0 logging on OpenShift?

I am able to deploy a war on OpenShift using git (git add, push ...) and it works. The only problem that I encountered is that all my logs are doubled (only when I deploy on OpenShift) whereas locally (using apache tomcat 7 with only log4j framework) all my logs are only logged one time.
After having searched one day on the Internet, I have found two ways to normally fix that problem, which is to find how to disable/bypass JBoss EWS 2.0 logging on OpenShift:
Clues found on Google
1) Add a JAVA_OPT to Startup
Now, when starting the application server, you will need to add a JAVA_OPT. This flag will make sure that the JBoss Log Manager does not pick up your logging configuration and your own logging JARs will work as normal.
./standalone.sh -Dorg.jboss.as.logging.per-deployment=false
And now your application will now log using the packaged JARs, effectively bypassing JBoss Logging.
Source: http://blog.jyore.com/?p=234
2) It looks like you have a log4j configuration file in your deployment. Try passing
-Dorg.jboss.as.logging.per-deployment=false
to disable that configuration from being used.
--
James R. Perkins
Source: https://community.jboss.org/thread/224127
My implementation of these clues
For implementing these solutions I did two things:
1) I created and git push this hook below:
vim .openshift/action_hooks/pre_start_jbossews-2.0
echo "executing pre_start_jbossews-2.0"
# I also tried with JAVA_OPTS
export JAVA_OPTS_EXT="-Dorg.jboss.as.logging.per-deployment=false"
echo "Value is: $JAVA_OPTS_EXT"
Note: this hook is well triggered, because I can see the echo when the server restarts after having pushed the modifications.
2) I also added this line in catalina.properties:
vim .openshift/config/catalina.properties
-Dorg.jboss.as.logging.per-deployment=false
Conclusion at that time:
Unfortunately none of these solutions disable/bypass JBoss EWS 2.0 default logging.
I am currently stuck with double log lines, so any help would be greatly appreciated, I count on you guys.
Thank you very much in advance for your help.
On Openshift the right way to setup persistent environment values is to use rhc tool:
rhc set-env JAVA_OPTS_EXT=-Dorg.jboss.as.logging.per-deployment=false -a myapp
Then try to explicitly stop and start your application (with rhc stop and rhc start).

Redmine plugin install (RedmineCRM Finance) results in 503

So my problem is that for some some reason installation of some plugins kills my bitnami redmine "permanently" (thin_redmine and thin_redmine2 stops after like 5 seconds).
The plugin which most recently did this is Finance Plugin from RedmineCRM. Version should be okay.
http://www.redmine.org/plugins/finance
Method I used (note that I added :migrate in the second line compared to their website (Is this the problem?)):
bundle install --without development test
bundle exec rake redmine:plugins:migrate NAME=redmine_finance RAILS_ENV=production
Am I missing or wrongly doing something? (Please note that I'm not really an expert in this field so I mainly go after how to-s.)
Are there anymore prerequirements for this (besides a very basic working redmine) e.g. I did not set up e-mail notifications, can stuff like this cause the problem?
Unfreez the gemfile. It solved the problem.

Grails: Where is the startGrails script in Eclipse/STS on the Mac?

In order to fix another problem (Stackoverflow Question 6367763) I needed to modify the startGrails script. I made the necessary updates however the modifications are not being picked up when I run Grails commands from within Eclipse/STS.
I put debug in the script and know it is functioning correctly when I call it directly from the command line. However STS appears to be running the original version.
Does STS have another copy of the startGrails script? How can I update this one or ensure STS links to the version of the startGrails script that I updated?

Displaying results of an NUnit run, CruiseControl.Net 1.5.7256.1

We recently upgraded CruiseControl.Net 1.4.2 to 1.5.7256.1. To our dismay the nice nunit results page that had previously been there had disappeared. All we get now is a build log with the verbose output from command line of our build.
After some research we discovered you can log into "Dashboard Administrator" from the main ccnet dashboard page and install the NUnit package. However, this did not change the output of our builds to include a NUnit result page.
Is there something extra we need to do here to have our output displayed? Any help would be greatly appreciated. I don't goto stack overflow until I've exhaustively searched on Google. I'm surprised no one else is confused or complaining about this.
FYI, we are merging our nunit XML output in the project configuration.
I'm not used to the Dashboard Administrator stuff, but you can edit the dashboard.config manually. Opposite to earlier versions CCNET version 1.5 comes with a naked configuration file.
Alternatively you may simply replace the configuration file with your 1.4 dashboard.config.
Possible duplicate of Cruise Control .net: Using packages and showing NUnit results
Don't merge manually if you use the nunit task
Edit the dashboard.config and the ccservice.exe.config files to add the nunit xsl files. Restart IIs.
Check that the Iis user has been granted access to the dashboard dir.