Maven Web Application with Github Repository and Hosted in Openshift

Asked

Viewed 228 times

3

I have a Java web application (wildfly server) created with Maven, locally versioned with Git and remotely on Github, I’d like to know how to host this application in Openshift and deploy every Pull received by Github.

1 answer

5


I believe it’s simple:

  1. Sign in to your Openshift account
  2. Click on Add application
  3. Choose the Wildfly version you want to use
  4. In the box Source code, enter the URL of your Git repository.

If you do this, Openshift says you will do the following:

If you provide a Git URL, your application will start with an Exact copy of the code and Configuration provided in this Git Repository.

I then believe that it will create a copy of your repository within Openshift. This copy will have the behavior of restarting Wildfly each push what you do.

In that case the push should be done in the copy of Openshift (which is in another URL and not the URL of your original Git repository).

I don’t know if he keeps both repositories synchronized. I don’t think so.

  • So in case I would have to have two local Positorios, one to do push to the Github and another to do push to the Openshift?

  • As I have never done, I cannot answer with certainty. I believe that one of the local repositories would be worthless and you would have to keep the Openshift repository. A colleague says that Git supports a "mirror" behavior of repositories, but I don’t know how Openshift behaves. The best I could find to answer that question was that question from the OS (in English).

  • Piovezan this link from your comment is very enlightening, for it I need to have a single local repository, but I have it linked to two remote Positorios, one from Github and another of Openshift, then it makes more sense, I’ll test and then I give a feedback.

  • following the link indicated by you managed to do. There are still some adjustments to do, but basically that’s it. Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.