2

I created a WildFly cartridge on RedHat OpenShift and pushed some small code changes to the master branch of my initial Git repository (ssh://account@host.rhcloud.com/~/git/wildfly8.git/). I encountered that pushing to the repository takes very long.

How can I make pushing to my repository faster? Is there a Git pre-commit hook which is running?

My command looks like this:

git push --porcelain --progress --recurse-submodules=check origin refs/head/master:refs/heads/master
Charles
  • 50,943
  • 13
  • 104
  • 142
Benny Code
  • 51,456
  • 28
  • 233
  • 198

1 Answers1

5

create a new file called hot_deploy inside .openshift/markers directory. Add it to Git repository, commit it, and the push it. It will enable hot deployment and deployment will take less time.

Shekhar
  • 5,771
  • 10
  • 42
  • 48
  • Thanks for the fast answer. Does a push to the Git repo takes that long because the application is build first and only after that the push is successful? Because I added a Jenkins cartridge to my application and thought that it will handle the build process so that I only have to push the changed files to my Git repo. – Benny Code Apr 29 '14 at 14:17
  • The way it works is: 1) first bits are pushed 2) then all cartridges are stopped 3) Then Maven build happens(it will download dependencies if not in .m2 repo) 4) Then it copies the WAR file 5) And start the cartridges. With hot deploy enable cartridges are not stopped so you get faster deployments. Please mark this answer as correct if you are satisfied. – Shekhar Apr 29 '14 at 16:23
  • Ok. Thanks for the answer and explanation but in my case the "push" to the Git repoisitory took long. Not the deployment itself. And I am using WildFly which is not supported by OpenShift for hot deployment or does it count to the "JBoss AS" type? https://access.redhat.com/documentation/en-US/OpenShift/2.0/html/User_Guide/sect-OpenShift-User_Guide-Hot_Deploying_Applications.html – Benny Code Mar 01 '15 at 14:41
  • this should be marked as the correct answer. i had the same problem. the hot deploy marker solved this issue. – Dennis Bauszus Apr 30 '15 at 17:06
  • Hot deploy can solve half of the problem. After enabling the hot deploy, it takes long time as well. – Hongbin Wang Apr 07 '16 at 09:43