Azure DevOps Pipeline for Oracle Integration Cloud
Learn how to successfully build an Azure DevOps pipeline to deploy the code from Azure Repos to Oracle Integration Cloud.
Join the DZone community and get the full member experience.
Join For FreeAuthors
Abhisek Banerjee, Technical Architect, IBM
Nandita Saha, Application Integration Consultant, IBM
Introduction:
Large enterprises nowadays operate in multi-cloud environments where company data and enterprise applications are distributed in different clouds due to organization security policy. IT operations under such multi-cloud ecosystems need a seamless DevOps platform where the source Code residing at one cloud layer can easily be deployed to another cloud where the enterprise application is hosted. Hence the current DevOps pipeline should address the cross-boundary continuous integration and continuous delivery challenges.
As part of the business requirement, this work is aimed to successfully build an Azure DevOps pipeline to deploy the code from Azure Repos (used as our source code repository) to Oracle Integration Cloud (used as our enterprise application host platform) as per the following architecture diagram.
Implementation Steps:
This use case will define and describe different stages of a pipeline as part of an OIC package lifecycle:
- Publish OIC Package Azure repository.
- OIC package import
- OIC Connection update
- Activate OIC integrations inside the OIC package.
- Integration Service testing
Prerequisite
- An Azure DevOps Organization
- Azure Pipeline can either run on the self-hosted agent which has limited features to execute the needed commands, or Microsoft hosted agent with access of parallel jobs
- Familiarity with branching and cloning a GitHub repository.
- An Azure GitHub branch
- OIC services/package
Implementation Steps
Publish OIC Package Azure Repository
Here, 2 OIC integrations were created with a package name devopsv1.
Code/OIC package can be committed to Azure git repository either via command line or Azure console or Pipeline.
Design Pipeline
Pipeline Creation
- Click on ‘New pipeline’
- Select ‘Azure Repos Git’ to refer to the codes committed to the Azure repository, as mentioned in the previous step
- Name the pipeline. Here ‘OIC’ pipeline created
- Add the script as per the requirement
The following screenshots are being provided for detailed navigation:
Trigger Criteria in Pipeline
Adding a trigger parameter helps to instruct the pipeline for its execution. One can specify the branch name along with the include/exclude filename pattern so that the pipeline will be auto-triggered whenever those specific files will be committed to that branch. For example, the below screenshot shares the snippet of the pipeline where the OIC pipeline will be auto-triggered whenever a <package-name>. par will be committed. Also, it’ll restrict the pipeline from being triggered even when any update will happen on that specific pipeline.
VM Image in Pipeline
Azure supplies a set of predefined agent pool names Azure pipelines with Microsoft-hosted agents. Each time it provides a fresh virtual machine for each job in the pipeline. Please note, Microsoft-hosted agents can run the jobs either in VM or in a container.
Here, ‘ubuntu-latest’ VM images have chosen to run CURL commands.
Define Variables in Pipeline
Pipeline variables can be added to send the external commands to the CURL command. The following screenshot illustrates the variables used in this use case:
OIC Package Deployment
OIC package (devopsv1.par) has been added to the Azure repository. This OIC package has been deployed into the next OIC environment using the below-mentioned CURL command inside the pipeline steps, as shown in the screenshot:
OIC Connection Update
OIC package deployment into a fresh OIC environment will create a connection in the draft mode which will not have any credentials. Hence, a further step has been added to update the connection parameter, which will update and test the OIC connection. Please note connection properties are supposed to be uploaded in Azure repository in <filename>. json format. Here, ICSConnProp.json has been created for this use case.
Activate OIC Integrations
The OIC package (devopsv1.par) consists of 2 OIC integration that needs to be activated post-connection activation. These integration names are kept in the Azure repo with the ProjectList.txt name. The CURL command will loop through the list for activation.
The following screenshot provides the OIC integration activation steps in the pipeline:
OIC Integrations Testing
OIC integration has been tested via CURL in this same pipeline. Please note a sleep of 1 min has been added to make sure the services are activated before the test job in the pipeline gets triggered. Test payload also needs to be uploaded in Azure repo (HELLOWORLD_01.00.0000_Test.json).
The following screenshot provides the OIC integration test steps in the pipeline:
Pipeline Execution
The pipeline can be triggered manually or automatically by committing the OIC package in the Azure repo.
The following screenshots provide the detailed jobs and its outcome upon running the pipeline for this use case:
- Trigger pipeline:
- Package deployment completed:
- Connection updated successfully:
- Integration activated:
- Integration tested successfully:
- An email will be triggered with the pipeline execution report.
Opinions expressed by DZone contributors are their own.
Comments