Integrating Internal GIT with Cloud Manager Using Jenkins

Singaiah Chintalapudi
3 min readJul 24, 2020

Authors

Singaiah Chintalapudi: https://www.linkedin.com/in/singaiah-chintalapudi-ph-d-a4a053122

Rahul Chugh: https://www.linkedin.com/in/rahulchug

Overview

In this article, we’ll discuss about integrating on-premise GIT with the Cloud Manager using Jenkins. Below is a overview of the flow.

Overview of GIT to Cloud Manager Flow

Different Ways to Sync

  1. Adobe I/O
  2. Jenkins
  3. Manually
  4. Using shell script

Since most of the organization use Jenkins for their CI/CD processed, we’ll use Jenkins to easily push the code from your on-premise GIT to Cloud Manager.

Prerequisites

  1. Jenkins
  2. GIT plugin installed on Jenkins
  3. Repository configured on Cloud Manager

Configuring Jenkins

  1. Let’s create a new Jenkins job and go to configuration.
  2. Go to Source Code Management and select “Git”
  3. Here we should configure couple of repositories i.e. one is source (on-premise repo) and the other one is destination (Cloud Manager repo). The Branch to build/Brand Specifier in the below screenshot represents the branch on your on-premise git repo.
Configuring on-premise and Cloud Manager GIT repos

Note: Once you configure the proper git urls and credentials, you would not see the connection errors. Name is a required field here and differentiates the two git repo’s. By-default when you checkout any git repo, the default repo ID is: origin. You can use any name you want as long as they are different.

4. Optional: You can modify “Build Triggers” to automatically push the code to Cloud Manager or configure SSL hooks to push the code to Cloud Manager automatically on push events to on-premise GIT repo.

Build Triggers Configuration

Note: Step 4 is optional and you need to configure webhooks on your git repo to make push events to work on Jenkins job.

5. DO NOT configure anything on “Build Environment”.

6. DO NOT add anything in the“Build” step

7. Add a step in the “Post-build Actions”. Click on “Add post-build action” dropdown and select “Git publisher

8. Git publisher will push the changes from on-premise git repo to Cloud Manager GIT repo. Here you need to configure the Cloud Manager branch where you want merge your on-premise changes. The “Target remote name” in the below screenshot should be same as repository name configure in Step 3.

Configuration to push the code to Cloud Manager branch

Note: You can either Merge the code with Cloud Manager branch or do a force push.

--

--