Azure Git Repos Integration for Liferay Cloud

Released 09/21/2023

Introduction

In alignment with our continued commitment to versatility and adaptability, Liferay Cloud now supports the integration of Azure Git repositories via Azure DevOps with Jenkins (CI) service. This new feature is specifically beneficial for users who rely on AzureDevOps as their Git repository provider.

Step-by-Step Configuration Guide:

  1. Azure DevOps Initial Setup:

    • Login: Access your AzureDevOps account.
    • Project Creation: If you haven't set up a project yet, create a new one by following Azure's standard project setup procedures.
  2. Authentication & Credentials:

    • If you're accessing a private repository, AzureDevOps will prompt and generate a Personal Access Token (PAT) for authentication.
    • For public repositories or other projects, create a PAT from the top-right drop-down menu in AzureDevOps.
  3. Integrating Builds in Jenkins:

    • In Jenkins, navigate to your job's configuration.
    • Under 'Build Triggers', define how and when you wish Jenkins to poll or check your Azure repository for changes.
  4. Setting up LCP.json for CI Service:

    • You'll need to edit the LCP.json to specify the CI service image and to recognize Azure DevOps as the SCM provider.
    {
      "image": "liferaycloud/jenkins:specific_version",
      "env": {
         "LCP_CI_SCM_PROVIDER": "azure-devops",
         "LCP_CI_SCM_REPOSITORY_OWNER": "Azure DevOps Owner/ProjectName",
         "LCP_CI_SCM_REPOSITORY_NAME": "RepositoryName",
         "LCP_CI_SCM_TOKEN": "PersonalAccessToken"
      }
    }
  5. Deployment Configuration:

    • Once your changes are finalized, commit them to the develop branch.
    • Push the updated branch to GitHub.
    • Configure the Azure DevOps remote settings to ensure Jenkins recognizes and interacts with your Azure repository.
    • Lastly, deploy the most recent successful build to the designated infra environment.

Additional Information

  • Azure DevOps Pull Requests are currently not integrated.
  • The system will automatically poll the Azure repository every 5 minutes to check for any updates.
  • New builds will be triggered by any detected changes in branches or tags.
  • Personal Access Tokens (PAT) are exclusive to specific users and are set with an expiration period.

Security & Best Practices

It's worth noting the importance of token management. The PAT, crucial for Jenkins to access Azure repositories, is specific to an Azure user and contains an expiry. Ensure that the token belongs to an organizational account. Also, for bolstered security, it's recommended to frequently review and manage the permissions assigned to the PAT.

Wrap-Up:

This new integration is reflective of Liferay Cloud's ongoing efforts to offer enhanced versatility to our users. By ensuring a seamless Azure DevOps experience within Jenkins, we hope to empower users with more options and streamline development processes.

For a deeper dive into the nuances of this feature or to seek troubleshooting guidance, please refer to the Liferay Cloud GitHub documentation and official Azure documentation.

Was this article helpful?
1 out of 1 found this helpful