All pages
Powered by GitBook
1 of 2

Download Artifact

The Download Artifact action enables you to deploy updates to your devices by specifying a path in JFrog Artifactory to a destination path on your device.

The Download Artifact action enables you to create a workflow that pulls artifacts from your Artifactory instance and deploys them to your edge devices. You can one or multiple artifact actions in an update flow.

Deployments using Artifactory consider the checksums of the files delivered. Therefore, the devices will pull only the diffs when downloading updates to files.

Prerequisites

  • JFrog Connect and JFrog Platform accounts. (You receive a JFrog Platform account automatically when you register for a JFrog Connect account.)

  • Connect Agent 6.0 or later and at least one device registered.

  • One or more files ready for deployment and stored in your Artifactory repository.

Drag the Action

To include the Download Artifact action in your update flow, do the following:

  1. Go to Deployment in the left menu and click Create Update Flow.

  2. Drag the Download Artifact action and drop it in the workflow.

Configure the Action

Click the action to open and configure it.

  1. Enter a name for the action.

  1. Enter the Artifactory Path, for example, generic-repo/1.0/file.txt. You can also make all or part of the path a parameter. For example, you could make the version folder a parameter: generic-repo/{{version}}/file.text. Then you enter the version value when the actual deployment is run.

  1. If you want to deliver more than one artifact, add a new action for each artifact.

  2. Enter the Device Destination Path. The directory on the device must exist beforehand, otherwise, the update will fail. Connect does not automatically create directories when deploying updates. You may create a folder using the Run Command action in the General Section.

  3. Configure your On Failure policy and instructions for rolling back, if necessary.

  4. Save your action configuration.

Artifactory Edge

On Failure and Rollback

  • Continue Update Flow: If the Download Artifacts action fails, Connect will simply continue with the next action in the update workflow.

  • Run General Rollback: The action and the entire update workflow are rolled back.

  • Do Action: The action to do when this action is rolled back. In this case, the action is to revert all files.

Revert all Files

As a general precaution, Connect Agent creates a backup of the relevant device folder in a temporary location. If a rollback is required, the agent restores the folder to its initial state.

Free Memory Requirement

In order to enable Rollback functionality, your device's free memory must be greater than the update size. To calculate the amount of free memory required, use the relationship below:

Free Memory Required > Current Folder Size + Update Size + 10MB

What’s Next?

Get Artifactory Path

Get the Artifactory Path you need to configure an update flow action in JFrog Connect.

This page describes how you get the Artifactory Path that you need to configure an update flow action in JFrog Connect.

The procedure is applicable to the following update flow actions:

  • Download Artifact: Can be an artifact of any file type.

  • Update Image: Must be a file of type <image>.swu.

  • Deploy Docker: When you choose Docker Compose as the Deployment Type. The file in the Artifactory Path must be of type <docker compose>.yaml.

  • Download Release Bundle: For Release Bundle Path under Release Bundle Artifact Path and Docker Compose options.

To get the Artifactory path, do the following:

  1. In the left navigation pane of JFrog Connect, choose JFrog Platform.

  1. In the left navigation pane of JFrog Platform, choose Artifactory and Artifacts.

  1. In Artifactory, select the artifact you want to download. If you need help finding your artifact, see Browsing Artifacts in the Artifactory documentation.

  2. In the General Info, copy the Repository Path to the clipboard.

  1. Go to your Download Artifact action configuration in Connect (or any action where you need an Artifactory Path). Paste the Repository Path (already on the clipboard) into the Artifactory Path field.

Now you can complete the rest of your update flow action configuration in Connect and save it.