Issue
- GitHub, GitLab, and Bitbucket are not ideal Git repo options for all customers
- Customers who utilize AzureDevOps as their Git repository provider prefer to keep their repos in Azure
Environment
- Liferay PaaS
Resolution
Use the following steps to set up your environment with an Azure Git Repo
-
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.
-
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.
-
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.
-
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" } } -
Deployment Configuration:
- Once your changes are finalized, commit them to the
developbranch. - 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.
- Once your changes are finalized, commit them to the