![](https://blog.safozi.com/wp-content/uploads/2021/10/gitlab-devopsV1-1.png)
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.
- Create a new environment. Click the “New environment” icon.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/env.png)
2. Configure your environment. For our application we will need a Tomcat server and we will set our environment’s name then click “Create”.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/envv.png)
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
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/deploy.png)
b. Now we’ll configure the Git Repository Credentials, for that click the “Add New Repository”
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/git-svn.png)
c. Now we’ll add the repository’s “URL” specify its “Branch” and Authentication Credentials. Click the “Add” button.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/addrepository.png)
d. Now that our repository is set. Click “Build and Deploy”.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/addrepository-1.png)
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.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/environnement.png)
- 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
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/add-ons.png)
b. Now head to the “Git-Push-Deploy” package and click “Install”
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/git-push_deploy.png)
c. Now let’s configure it. Set the “Git Repo URL”, “Branch” as well as the user and access token then click “Install”.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/git-push_deployy.png)
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/git-push_deployy-1.png)
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.
- Open the file and edit it.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/cms.png)
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/Capture.png)
2. Now let’s commit and push the updated version.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/ubuntu.png)
- On a second screen we’ve been controlling the git-push-deploy log.
a. Click the “log” icon.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/logicon.png)
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/logg.png)
b. A few seconds after pushing the code we’d notice that the build process was automatically started.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/logfile.png)
c. Once the build process is finished, we get a notification of that, and the deployment starts.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/processfinished.png)
d. Now that the deployment process is finished, we could notice the change in the web page’s content on our browser.
![](https://safozicloudblog.my.p4d.click/wp-content/uploads/2021/10/interface.png)