Importing objects using DevOps pipeline
You can use a CI/CD pipeline for importing the Adeptia Connect objects to a new environment automatically. This CI/CD pipeline uses the Exported ZIP file that you must have created as a prerequisite for import operation, and imports the objects to the target environment.
If you want to retain the activities while importing the objects, you need to configure the parameters in the retain.xml file that you want to retain. The objects can be retained at service and field level. You will find retain.xml in the <shared>/migration/template folder in PVC. For more information, refer to Structure of Retain XML.
How the Import pipeline works
The diagram below represents how the import pipeline works, and automates the import process.
When triggered, the pipeline performs the following sequence of actions.
Connects to the GitHub repository, pulls the Import XML and Exported ZIP files, and places them to a location in the PVC (shared folder).
Pulls the retain XML from the GitHub repository (if specified in the import pipeline) to retain certain activities during the import process.
Pulls and deploys the migration utility helm chart to import the objects.
Creates a rollback ZIP file at the shared repository file location, and pushes it to the GitHub repository.
Deletes the migration workspace created during the import process.
To start with importing the objects, you first need to create an import pipeline having all the required parameters for exporting the objects.
Adeptia provides you with an import pipeline file that you can use to create the pipeline.
After you create the pipeline, you need to trigger the pipeline to perform the import operation.
Creating and triggering the import pipeline
To create the pipeline in Jenkins using the import pipeline provided by Adeptia, follow the steps given below.
Log in to the Jenkins with admin privileges.
Select New Item.
Enter a name for the Import pipeline, and then select Pipeline.
Click OK.
Copy the content from the provided import pipeline file.
In the Pipeline Definition section, paste the copied content and uncheck the Use Groovy Sandbox checkbox.
Click Save.
On the screen that follows, click Build Now.
As you build the pipeline for the very first time, all the parameters get initialized.Refresh the page.
The Build Now option now changes to Build with Parameters.Click Build with Parameters.
You will see all the parameters inherited from the import pipeline file.
Enter the parameter values as per your requirement.
Click Build to trigger the pipeline.
Rolling back the import operation
If you decide upon rolling back the import operation, use the rollback ZIP created during the import operation.
Here are the steps to perform the rollback operation.
Log in to Jenkins.
Click Build with Parameters.
Enter the values for the following parameters.
Click Build to roll back the import operation.