Working with Artifacts
As an Application Developer, you use Artifacts to identify and re-deploy the exact same version of a Component deployment on a different Environment.
Important! The actions that you can perform depend on your folder permissions. See: Assigning Release Automation Permissions.
This page includes the following:
Artifacts are single versions of Application Component deployments, which are located in a certain repository. To access each repository type, connection properties must be defined at Artifact Source Custom Type level. Artifacts reference real files in the repository, which contain the Component version. Examples of Artifacts are: MyApp_05.02.2018.jar, DB-??.sql, /db/v3/scripts/*.sql, MyRepo LATEST.
An Artifact is a version of a file to be deployed. In a Deployment Package, an Artifact is created for each Component.
Click the image to expand it.
Artifact Sources store all properties that are used to connect to the repository where the Artifacts are located. The type of data stored depends on the Artifact Source type (for example, URI, user, password). You can define an unlimited number of Artifact Sources in the system.
Artifact Source custom types (for example, HTTP or FPT) can be either manually defined or installed via Action Packs.
Prerequisites
Note the following before working with Artifacts and Artifact Sources:
-
CDAF Artifacts are only compatible with the following Action Pack versions:
- PCK.AUTOMIC_BOND 1.2.0 or higher
- PCK.AUTOMIC_ARTIFACTORY 1.2.0 or higher
- PCK.AUTOMIC_FTP 1.2.0 or higher
- PCK.AUTOMIC_HTTP 1.2.0 or higher
- PCK.AUTOMIC_JBDC 1.3.0 or higher
- PCK.AUTOMIC_SMB 1.2.0 or higher
- PCK.AUTOMIC_Tomcat 1.2.0 or higher
- PCK.AUTOMIC_NEXUS 1.2.0 or higher
- PCK.AUTOMIC_NEXUS_V3 1.1.0 or higher
- PCK.AUTOMIC_GIT 1.1.0 or higher
Note: Changing the Properties of an Artifact - If both the Git Branch Name and Git Commit fields are filled in, the Git Commit property is applied.
- PCK.AUTOMIC_SCP 1.2.0 or higher
- PCK.AUTOMIC_SVN 1.2.0 or higher
- PCK.AUTOMIC_TFS 1.3.0 or higher
Note: For more information, see: Automic Compatibility Matrix
-
PCK.AUTOMIC_BOND must be installed/upgraded first. See: Troubleshooting Installation and Upgrade Errors.
Your Artifact Model should be designed in the following order:
- Define the Artifact Source. You may need to create a new Custom Type for the new Artifact Source first.
- Create an Artifact.
- Create a new Package or assign the Component to an existing Package.
- Assign the Artifact to a Component. (See: Assigning Artifacts to Components)
- Assign the Artifact to a Package Component. (See: Creating and Assigning Artifacts to Package Components)
- Open the Release Automation perspective.
- Click the Applications tab.
- Double-click a Component to open it.
- Click the Artifacts tab. The list of Artifacts that are defined for the current Component is displayed.
Note: Alternatively, you can view the Artifacts that are related to a specific Artifact Source from the Artifacts view. See: Working with Artifact Sources
Viewing Installations of an Artifact
Artifact Installations can be accessed:
-
From the Artifacts list of a Component:
- Open the Release Automation perspective.
- Click the Applications tab.
- Double-click a Component to open it.
- Click the Artifacts tab. The list of Artifacts defined for the current Component is displayed.
- The list of recent installations is displayed in the sidebar. To see all installations click Show All Installations.
- Open the Artifact Files list of the Artifact.
-
From the Artifacts list of an Artifact Source:
- Open the Release Automation perspective.
- Click the Artifact Sources tab.
- Double-click an Artifact Source to open it. The list of Artifacts that are defined for the current Artifact Source is displayed.
- The list of recent installations is displayed in the sidebar. To see all installations click Show All Installations.
- Open the Artifact Files list of the Artifact.
Viewing Artifact Assignments
The Package Assignments view shows all Components to which the Artifacts have been assigned.
Artifacts can be created:
-
From an Application Component:
- Open the Release Automation perspective.
- Click the Applications tab.
- Double-click an Application to open it and select a Component.
- Click the Artifacts tab at the top of the view.
- Click the Create Artifact button in the toolbar. The Create Artifact dialog is displayed.
- Select an Artifact Source.
- Enter a name for the new Artifact.
- The Source Path and Archive Type (for example .zip, .tar, .tar.gz) fields are populated with the values defined in the Artifact Source custom type. Both fields are editable.
Note: If the Archive Type is not empty, the system will unpack the content of the Artifact while transferring the Artifact to the Deployment Target.
- Enter the remote artifact checksum file to be downloaded (See: GetArtifact Action in Component Workflows).
Notes:
- The supported checksum types are .md5 and .sha1
- The checksum file name and the source file must be the same. For example:
Source Path: \shared\jpetstore\Jpetstore.zip
Checksum path: \shared\jpetstore\Jpetstore.zip.md5
- Click Create.
-
From the Artifacts list of an Artifact Source:
- Open the Release Automation perspective.
- Click the Artifact Sources tab.
- Double-click an Artifact Source to open it.
- Click the Create Artifact button in the toolbar. The Create Artifact dialog is displayed.
- Enter a name for the new Artifact.
- The Source Path and Archive Type (for example .zip, .tar, .tar.gz) fields are populated with the values defined in the custom type. Both fields are editable.
Note: If the Archive Type is not empty, the system will unpack the content of the Artifact while transferring the Artifact to the Deployment Target.
- Enter the remote artifact checksum file to be downloaded (See: GetArtifact Action in Component Workflows).
- Click Create.
-
From the Components list of a Deployment Package.
- Open the Release Automation perspective.
- Click the Packages tab.
- Select the Components tab.
- Select a Component.
- Click the + inline button next to the Component name to create and assign the Artifact.
- In the dialog, select an Artifact Source.
- Enter a name for the new Artifact.
- The Source Path and Archive Type (for example, .zip, .tar, .tar.gz) fields are populated with the values defined in the custom type. Both fields are editable.
Note: If the Archive Type is not empty, the system will unpack the content of the Artifact while transferring the Artifact to the Deployment Target.
- Enter the remote artifact checksum file to be downloaded (See: GetArtifact Action in Component Workflows).
- Click Create.
Changing the Properties of an Artifact
The properties of an Artifact are defined by the custom type of the Artifact Source.
To change the properties of an Artifact you can use:
- The sidebar next to the Artifacts list.
- The Properties section of an Artifact.
The following properties are displayed:
-
Basic attributes of the Artifact. You can edit the Name, which must be unique within the Artifact Source.
- Source
Path to the remote file/directory and checksum to be downloaded. The archive type must be also selected.
-
Recent Installations
Latest deployments of the Artifact. To see all installations click Show All Installations.
-
Artifact Files
List of files of the Artifact. Click a link to access the file stored in the Artifact Source.
Note: The action executed (for example: open, download, open in another program, and so on) depends on your browser configuration.
If a checksum has been defined, it is displayed below the file path.
-
Actions are located in the toolbar. They can be also triggered from the context menu displayed after right-clicking the entity. You can trigger the following actions (depending on your permissions):
- Duplicate: see Duplicating Artifacts.
- Delete: see Deleting Artifacts.
- Archive: archives the selected entity. If an entity is archived, Restore is available (see also: Archiving Entities)
Assigning Artifacts to Components
- Open the Release Automation perspective.
- Click the Applications tab.
- Double-click an Application to open it and select a Component.
- Click the Artifacts tab at the top of the view.
- Click the Create Artifact button in the toolbar. The Create Artifact dialog is displayed.
- Select an Artifact Source.
- Enter a name for the new Artifact.
- The Source Path and Archive Type (for example .zip, .tar, .tar.gz) fields are populated with the values defined in the Artifact Source custom type. Both fields are editable.
- Enter the remote artifact checksum file to be downloaded (See: GetArtifact Action in Component Workflows).
- Click Create.
Note: An Artifact assigned to a Package cannot be removed from the Component.
Assigning Artifacts to Package Components
- Open a Package and click the Components tab.
- Click the Select Artifact inline button on the right side of the page.
- Select the Artifact that you want to assign to the Package Component.
Important!
- Only Artifacts which have been already assigned to a Component are displayed.
- The latest Artifact assigned to a Component on which the user has the required permissions will be auto-assigned to a Package during creation.
- Click OK.
- Select the Artifact you want to duplicate and click the Duplicate button in the toolbar. The Duplicate dialog is displayed.
- Optionally, enter a new name for the Artifact. It can only contain alphanumeric characters, blanks, ".", "-", "_", "@", "$", "#".
- Clear the checkbox to remove the component assignments from the source artifact.
Important! Passwords are not copied to the new Artifact.
You can delete an Artifact from the Artifacts list of an Artifact Source. Click the Delete button in the toolbar.
Notes:
- The Artifact is not deleted from the system.
- You may only delete the entity when you have the appropriate permission on the containing folder (see Security Concept in CDA) and all of the listed conditions are met.
Conditions to delete entities of type Artifact
- No referenced by any Executions
- No referenced by any Packages
GetArtifact Action in Component Workflows
The GetArtifact Action is included by default in all Component Workflows created with the option Create a blank Component Workflow (see: Adding Component Workflows) or with the Application wizard (see: Creating Applications Using the Wizard).
For compliance purposes, this Action downloads the Artifact and the checksum file from the external artifact source (repository) and transfers them to the local agent. The values retrieved from the repository will be then compared with the values calculated by the system. If the values do not match, you can decide if you want to resume the deployment or cancel it.
You can do the following:
- Define if the checksum should be skipped (if there is no checksum available), ignored or required in the Download Artifact Promptset of the Action.
- Set filter options in the Filter Files promptset of the Action.
- Define which files you want to be transferred or ignored in the Includes and Excludes fields. Wildcards are supported.
- Rename Artifacts. To do so, enter the new name in the Replacement field of the Rename Options section.
- Define whether you want to use the remote staging feature for transferring the Artifact in the Enable Staging Prompset of the GetArtifact Action. If you select the yes option, you must define an Agent and base directory in the Remote Staging section of the Deployment Target.
- In the Force Download prompset, you can define how to proceed in case an Artifact is already stored in the Artifact folder: if the Artifact should be replaced or if the step should be skipped.
Note: Click the image to expand it.
For more information, see: GetArtifact Action
See also: