Java Web application with Maven with repository in GitHub and hosted in OpenShift

Posted on

Question :

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

    

Answer :

I think it’s simple:

  • Sign in to your OpenShift account
  • Click Add application
  • Choose the version of Wildfly you want to use
  • In the Source code box, enter the URL of your Git repository.
  • If you do this, OpenShift says it 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 with every push you make.

    In this case, push should be done in the copy of OpenShift (which is in a URL other than the URL of your original Git repository).

    I do not know if it keeps the two repositories in sync. I do not think so.

        

    Leave a Reply

    Your email address will not be published. Required fields are marked *