Skip to main content
Version: 4

Performing migration rollback using Adeptia Connect APIs in Jenkins

Adeptia allows you to revert the import operation conducted using the import pipeline file, which integrates Adeptia Connect APIs. Reversing the migration of objects is achievable through the use of migration APIs within the rollback pipeline file provided by Adeptia. This section delineates the procedure for establishing a rollback pipeline and subsequently initiating it to execute the rollback operation.

The rollback pipeline necessitates the ID of the Import package, which should be prepared in advance as a prerequisite for the rollback process. For further information on the essential prerequisites for carrying out the rollback operation, refer to this page.

Creating and triggering the rollback pipeline ​

Follow the steps given below to create the rollback pipeline using the provided rollback pipeline file from Adeptia and activate it to roll back the import operation.

  1.  Log in to the Jenkins with admin privileges.

  2.  Select New Item.

  3. Enter a name for the Import pipeline, and then select Pipeline.

  4. Click OK.

  5. Copy the content from the provided rollback pipeline file.

    [+] Rollback Pipeline

    [-] Hide

  6. In the Pipeline Definition section, paste the copied content and uncheck the Use Groovy Sandbox checkbox. 

    Error

    If you are using Jenkins on Windows OS, and have created an agent on Linux OS, you need to do the following in the export pipeline file.

    1. Uncomment the following code snippet.

    <ch:codesample>

    Where,

    LinuxAgent is the name of the agent that you have created.

    2. Comment the following lines of code.

    <ch:codesample></ch:codesample></ch:codesample>
  7. Click Save.

  8. On the screen that follows, click Build Now.
    As you build the pipeline for the very first time, all the parameters get initialized. 

  9. Refresh the page.
    The Build Now option now changes to Build with Parameters.

  10. Click Build with Parameters.

    You will see all the parameters inherited from the rollback pipeline file. 

  11. Enter the parameter values as per your requirement.

    [+] Click here to expand the list of Rollback parameters

    [-] Hide

    ParametersValueDescription
    GIT_CREDENTIALS_ID

    <credential ID generated by Jenkins>

    Credential ID for GitHub in Jenkins.

    Refer to the prerequisites for more details.

    GIT_REPO_URLhttps://github.com/adeptia/migration-definition.gitURL of the GitHub repository.
    GIT_BRANCHmainGitHub branch name.
    APPLICATION_URLhttps://abc.comAdeptia Connect application URL.
    APPLICATION_CREDENTIALS_IDuser@abc.comAdeptia Connect User Id to be used for performing the Import operation.
    SOURCE_ZIP_PATHtest/rollback.zipGitHub repository path of the rollback zip that you want to use to perform the Rollback operation.
    IMPORT_LOG_PATHtest/migration.logPath in the GitHub repository where the rollback logs file will be placed after the Rollback operation completes.
    IMPORT_PACKAGE_ID1235472230119257845

    Id of the Import package.

    For more details on viewing the Id of an Import package, refer to this section.

  12. Click Build to trigger the pipeline.
    This rolls back the import operation.