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.
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 a sample of import pipeline file that you can customize based on your requirement. After you create the pipeline, you need to trigger the pipeline to perform the import operation.
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.
Export Pipeline
Paste the copied content in the Pipeline Definition section in Jenkins.
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. The Build Now option now changes to Build with Parameters.
Click Build with Parameters.
You will see all the parameters and their values inherited from the import pipeline file.
Change the parameter values as per your requirement.
Click here to expand the list of Export parameters
Click Build to trigger the pipeline.
The objects are imported to the target environment.
The rollback ZIP is created and pushed to the GitHub repository.
All the log statements generated by the migration utility during the import process are tagged with a unique identifier. This allows you to search for this unique identifier in the centralized logging system, and fetch all the associated logs.
Rolling back the import operation
If you decide upon rolling back the import operation, follow the instructions given below.
Follow the steps from 1 through 10 given in the previous section.
Enter the same values for the parameters that were used during the import process.
Change the values for the following two parameters, and keep the rest of the values as is.
Enter rollback as the value for the OPERATION parameter.
Enter the path of the rollback ZIP as the value for the SOURCE_ZIP_PATH
The rollback ZIP is created at the location where your Exported ZIP is located.
The format of rollback ZIP file name is Recovery_<EXPORT_ZIP_NAME>.zip.
Click Build to roll back the import operation.
Enter rollback as the value for the OPERATION parameter.
Enter the path of the rollback ZIP as the value for the SOURCE_ZIP_PATH
You can find the rollback ZIP where your Exported ZIP is located.
The format of rollback ZIP file name is Recovery_<EXPORT_ZIP_NAME>.zip. RetainXmlLocation, OverRideuser, and OverrideModifiedByuser are not applicable on case of rollback.