Creating a Package from a Pipeline in Jenkins

  1. Go to the main page and create a pipeline (New Item > Pipeline) or use an existing one.
  2. Open the Pipeline Syntax.
  3. In the sample step field, select the createDepPckg: CDA Create Package step from the drop-down list.
  4. Do one of the following:
  5. Click Test connection to ensure that the connection succeeds.
  6. Once the connection has been checked, fill in the other fields as follows:
      1. Do not fail if the package already exists: If set to true, the existing Package will be updated. It will also allow to update/add properties and dynamic properties to the existing package.

        • Only new Components can be added to an existing Package.
        • The Components already added to an existing Package will not be modified.
      2. Auto assign artifacts: If set to true, the latest artifact will be automatically assigned to the Components which are not assigned any artifact. This option is used while creating a new Package.
      3. Package Name: name of the Package to be created in Continuous Delivery Automation.

        Notes:

        • This value can also contain variables (for example: Build environment variable). Variables must start with $.
        • Archived Packages are not supported.
      4. Package Type: Deployment (more types may be added by the CDA administrator).

        Note: This value can also contain variables. Variables must start with $.

      5. Application: Application name.

        Notes:

        • This value can also contain variables. Variables must start with $.
        • Archived applications are not supported.

      6. Folder: folder in which the Package should be created.

        Notes:

        • Folders are used to manage user rights.
        • This value can also contain variables. Variables must start with $.
      7. Owner: Owner name.

        Notes:

        • Owners are used for filtering entities and managing user rights, as they are stored in folders.
        • This value can also contain variables. Variables must start with $.
      8. Components: by default, all Components of the Application are assigned to the Package. If you click Add Component, only the selected Components will be assigned.
        1. (Optional) you can specify one or more conditions for each Component, so that only the ones which comply with the conditions are added to the Package. To do so:
          1. Click Add condition.
          2. Select the condition operation from the drop-down list and provide a value.

          Notes:

          • Values are case insensitive and can contain regular expressions and variables. Variables must start with $. If the value is not specified, the corresponding condition is skipped.
          • A Component is added into a Package only if all conditions are met
          • Archived Components are not supported.
        2. Properties: click Set Property if you want to overwrite the custom properties of the Package.

          Note: You can set the property type as a Link or as Others. The link property type must have the following format: "{PropertyName}": "{Link} {Title}"

          Example:

          • In the Type Of Property field, select “Link”
          • In the Property Name field, enter “chart_location”
          • In the Property Value field, enter “http://test.com text”
        3. Dynamic Properties: click Add Dynamic Property if you want to overwrite the dynamic properties of the Package.

          Note: Custom and dynamic property values can also contain variables (for example: Build environment variable). Variables must start with $.

  7. Click Generate Pipeline Script. A string containing the Package definition is generated.
  8. Copy the generated content.
  9. Click Back at the top left and select Configuration.
  10. Select the Pipeline tab and paste the copied content to the Script field.
  11. Save your changes.