Creating a Package from a Pipeline in Jenkins
- Go to the main page and create a pipeline (New Item > Pipeline) or use an existing one.
- Open the Pipeline Syntax.
- In the sample step field, select the createDepPckg: CDA Create Package step from the drop-down list.
- Do one of the following:
- Select the Use Centralized CDA Connection Parameters checkbox to authenticate with the centralized connection details . See: Configuring CDA Centralized Connection Details).
- Enter the connection details:
Server
Example:
http://192.000.000.00/cda
Full Username
Examples:
- 1000/USER/DEP
- AUTOMIC/1000/USER/DEP
Password
- Click Test connection to ensure that the connection succeeds.
- Once the connection has been checked, fill in the other fields as follows:
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.
- 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.
- 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.
- Package Type: Deployment (more types may be added by the CDA administrator).
Note: This value can also contain variables. Variables must start with $.
Application: Application name.
Notes:
- This value can also contain variables. Variables must start with $.
- Archived applications are not supported.
- 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 $.
- 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 $.
- 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.
- (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:
- Click Add condition.
- 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.
- 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”
- 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 $.
- (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:
- Click Generate Pipeline Script. A string containing the Package definition is generated.
- Copy the generated content.
- Click Back at the top left and select Configuration.
- Select the Pipeline tab and paste the copied content to the Script field.
- Save your changes.