DevOps Tools Integration – The Git-Push-Deploy Add-On

  • October 20, 2021
  • 497 Views

The Git-Push-Deploy Add-On is a built-in package in our P4D platform based on Jelastic PaaS. It presents a simple CI/CD Pipeline to automatically pull and deploy application code from source GitHub/GitLab repository upon commit.
In this article we will present a small demo of the Git-Push-Deploy Add-On.

  1. Create a new environment. Click the “New environment” icon.

2. Configure your environment. For our application we will need a Tomcat server and we will set our environment’s name then click “Create”.

Now that we have our environment set, let’s link our GitHub repository containing the application that we’d like to deploy to our server.

a. Click the “Deploy from Git / SVN” icon

b. Now we’ll configure the Git Repository Credentials, for that click the “Add New Repository”

c. Now we’ll add the repository’s “URL” specify its “Branch” and Authentication Credentials. Click the “Add” button.

d. Now that our repository is set. Click “Build and Deploy”.

e. Now wait a few minutes for the application to be built and deployed. Once deployed its war file will be attached to the environment.

  1. Our environment is set, and our application is deployed, let’s install the “Git-Push-Deploy” package. For that:
    a. Click the “Add-Ons” icon

b. Now head to the “Git-Push-Deploy” package and click “Install”

c. Now let’s configure it. Set the “Git Repo URL”, “Branch” as well as the user and access token then click “Install”.

d. Wait for the installation process to finish.
Now let’s test the “Git-Push-Deploy” package. We will edit the “index.jsp” of our application.

  1. Open the file and edit it.

2. Now let’s commit and push the updated version.

  1. On a second screen we’ve been controlling the git-push-deploy log.
    a. Click the “log” icon.

b. A few seconds after pushing the code we’d notice that the build process was automatically started.

c. Once the build process is finished, we get a notification of that, and the deployment starts.

d. Now that the deployment process is finished, we could notice the change in the web page’s content on our browser.