OpenShift action_hooks are not executable
When I created a test DIY application in OpenShift, the
action_hooks worked fine, but now I created an actual application and they just don’t fire when I push changes.
I did some investigating, and I found the problem – for some reason the action hooks are not executable. I checked and they were executable in the test application(where they worked) – but now they aren’t.
- Openshift Jboss 7 binary deployment with scaling
- Ruby gem error while trying to login to openshift via terminal
- git commiting changes on openshift server
- Cant build on openshift jenkins
- How to connect OpenShift with a private BitBucket Repository
- How to use to make a file executable on Openshift server after pushing it via git
chmoding them doesn’t help, since every time I push some changes OpenShift copies the new repo folder over the old one(instead of using git to update it), so the permissions are reset. I looked into using git’s
post-receive hook to make them executable, but the git hooks on OpenShift are protected and I can’t edit them.
Is there any way to solve this problem?
PS. I don’t know if it has any impact, but my actual development repo is on Google Code, and I used this tutorial to set the OpenShift repo as an upstream for my local repo.
2 Solutions collect form web for “OpenShift action_hooks are not executable”
In the OpenShift tooling for JBoss Tools, we faced the very same problem. Our implementation was resetting the execute permissions on the hook files causing the hooks to get ignored: https://issues.jboss.org/browse/JBIDE-13217
In our case having +x on these again solved the issue. You seem report some repo being copied over yours, which I dont really get. How is this occurring to you? It could help if you could show some of your setup?
OK, I figured it out.
When I created the application, instead of editing the action hooks I copied the action hooks from the repo of the first application(the the application I created to see try out the OpenShift DIY). I think that what happened is that Git detected that the files were replaced and not edited and treated them as new files. OpenShift somehow read this, and haven’t given them the execute permissions of the original files.
To fix this, I followed this answer to restore the old files from the OpenShift Template Builder’s commit, and now it works!