Skip to main content
Version: 4

Importing objects using Adeptia Connect APIs in Jenkins

Adeptia provides an import pipeline file that incorporates Adeptia Connect APIs for importing, allowing you to generate the import pipeline. This section outlines the steps for creating an import pipeline and then activating it to import objects into a target environment.

The import pipeline requires the ID of the Import package, which should be created beforehand as a prerequisite for the import process. For more details on the necessary prerequisites for importing objects, refer to this page.

Creating and triggering the import pipeline ​

To initiate the import of objects, the initial step involves creating an import pipeline with all necessary parameters. Once the pipeline is established, it must be triggered to execute the import operation.

Follow the steps below to create the pipeline using the provided import pipeline file from Adeptia and activate it.

  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 import pipeline file.

    [+] Import 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 import pipeline file. 

  11. Enter the parameter values as per your requirement.

    InformationIt is mandatory to provide a valid value for all the Jenkins parameters.

    [+] Click here to expand the list of Import 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/export.zipGitHub repository path of the export zip file that you want to use to perform the Import operation.
    IMPORT_LOG_PATHtest/migration.logPath in the GitHub repository where the import logs file will be placed after the import 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.

    ROLLBACK_ZIP_PATHtest/rollback.zip
    Path in the GitHub repository where the rollback zip will be placed after the import operation completes.
  12. Click Build to trigger the pipeline.
    This imports the objects to the target environment and creates a corresponding rollback zip which is placed in the GitHub repository at the location you defined in the ROLLBACK_ZIP_PATH  parameter.