top of page

Tags

Archive

CI/CD Approach for Oracle Integration Cloud Components.

Writer's picture: SatyaSatya

In this Post , I will explain the possibilities of achieving the Automated Deployments for OIC components using Azure Devops. Generally this is pretty much possible using any CI/CD tools including oracle's own PaaS offering which is Developer cloud Service Product . In this post i will outline the high level approach of achieving the same using Azure Devops.


Before we go in to the detail , lets see what are the deploy-able OIC components


Integration's : Integrations are exported as .iar file and imported to the target instance.

we can do below operations on the integration in the source/Target Instance.


Packages- Package contains one or more integrations

Connections- They hold the application specific url's , User Credentials and other metadata information.

Lookups- They hold the static values and can be used at design time with out doing any hard coding .

Libraries- They contain the custom java script libraries.


for each of the above operations , oracle provided the REST api's to get the job done. Full API information can be found in the below url.




Let's talk about how can this be achieved in the Azure Devops.


Use Case: Deploying an .iar file- Integration

Step1: Export the .iar file from the OIC Instance

Step2: Go to the Azure and Under Repos > Select the branch in which you want to upload the file (Repos > FIles)

Step3: Upload the file to the selected branch (Dev)

Step4: Create a Pull Request and provide the title,description,reviewers and work item. and click on create

Step5: The pull request gets auto approved and the code gets merged to the main branch

Step6: At this point based on the Release configurations , the respective pipeline gets triggered to deploy the artifices to the target instance.


Explanations: A release will hold the pipeline configurations where the devops people create different stages like QA, UAT and PROD .


Under Each of this stage , we create different tasks for different type of objects. Example :

one task to read the git log , other task to deploy the OIC integration and so on..


generally , Azure gives various options to choose different technologies while creating the task . Ex , you can choose bash for Unix ,Mac & Windows .. , .net ,Ant and many more ,.its up to the developer to choose the technology . In my case i choose to go with the unix Scripting .


Now under each task , we write the Shell script to download the files pushed to git and upload the same to target instance.


High level flow on what happens inside shell script :


Step1: We read the git log from shell script as it contains all the actions like Added,Updated , Deleted, Merged along with the respective commit id's , it also contain the information on which directory the operation takes places . So the starting point is read the git log and only identify the integration files . To elaborate further , we try to find the latest merge and the actions i.e Update or added .When these conditions are met , we further go down and check for the directories , if the directory name is integration and then CD to the directory and execute a custom function which will initiate the deployment process.


Same Code Snippet :


	cd 'your repo"
	git log --name--only --online > writeoutput.txt
	filename='writeoutput.txt'
	Echo "reading the log file "
	while read line
		do
		#check for the merge actions
			#check for Updated or added actions
	#check for the directory validations
	
	#Call the custom function to Deploy the integrations
	    Deploy_OICintegration ${file}
	Done <$filename


Step2: The custom function Deploy_OICintegrations will do the job of calling the respective curl commands to do the actual deployment of migrating the components to target instance.


Similar , tasks can be created to deploy the objects like Packages, VBCS, DBCS Scripts,Deploy Connections.



Hope This Helps : Happy learning

855 views1 comment

Recent Posts

See All

1 comentário


hari kiran
hari kiran
19 de mai. de 2022

Hi Sandeep,

This document is very informative and it is useful for me in my current company. if possible can you please provide me the script for export and import the .IAR files.

Please give me the step by step process that will be highly appreciated.

Curtir

Other Posts you may Interested 

Subscribe Form

  • facebook
  • linkedin
bottom of page