2

I use a WildFly application server in a Java environment on OpenShift. In my pom.xml file I have specified to run bower install (with the exec-maven-plugin).

Running bower install with exec-maven-plugin requires the presence of Bower on the operating system but by default my OpenShift instance hasn't Node.js & Bower installed.

Is it possible to install Bower per Action Hook?

I have tried the following with a "pre-build action hook":

/.openshift/action_hooks/pre_build

#!/bin/bash
npm install -g bower

I have also executed the following:

git update-index --chmod=+x .openshift/action_hooks/pre_build

But it looks like that my Action Hook is not executed:

Not stopping cartridge wildfly because hot deploy is enabled
Repairing links for 1 deployments
Syncing git content to other proxy gears
Building git ref 'master', commit f330f6d
No such file or directory - /var/lib/openshift/54e8f8984382ecc9a1000047/app-root/runtime/repo/.openshift/action_hooks/pre_build
Benny Code
  • 51,456
  • 28
  • 233
  • 198

1 Answers1

0

Looks like, it IS executed. If the bash scripting file under the hooks directory would itself be missing, it would not complain.

Apparently something happens in the file that returns a "no such file ..." error.

Try to play around with some echo statements in the script to see that it's executed and to find out what's happening further.

bevada
  • 351
  • 2
  • 4
  • Hi bevada, thank you for your comment! My "pre_build" hook consists only of one echo command. And the `No such file or directory` comes from the fact, that the hook isn't found. So we do not have any solution to the problem. – Benny Code Apr 12 '15 at 08:40
  • Hello Benny - I must admit I don't know the specific cartridge. Maybe it would treat the hook as obligatory? Maybe change something about the permissions? – bevada Apr 13 '15 at 09:57