You are looking at a past revision of this page (ee298556e7ac2538b58efd6f8c2fb8a7c59015ef). Click here to see the latest revision.

Asset Bundle

Asset Bundle

An asset bundle is a tarball that contains executables, libraries, static data or any other artifacts that are required by an app/applet. Asset bundle is represented on the platform as a hidden tarball file which in turn is referenced by a visible record object of type AssetBundle. The record object must have:

  • An output name
  • A type AssetBundle
  • A property with key version and value specifying a version number of the asset
  • A details JSON string containing an object of the following form:

    '{ "name": "hidden_tarball_file_name", "id": {"$dnanexus_link": "hidden_tarball_file_id"} }'

A record object can be created using the following command:

dx new record -o recordname --type AssetBundle [...]

Example:

$ dx new record -o asset-record-name --type AssetBundle --property version=0.0.1 --details '{"name": "test_qiime_asset_library.tar.gz", "id": {"$dnanexus_link": "file-Bq31x500kXGgQ0ZG0G5G6v84"}}' --close

An app/applet will refer to an asset bundle (i.e. a record object) with runSpec.assetDepends metadata. The matadata can be provided in either one of the following two ways:

1. "assetDepends": [

    {
        "id": "record_id"
    }
]

2. "assetDepends": [

    {
        "name": "record_name",
        "project": "record_project_id",
        "folder": "record_folder_name",
        "version": "record_version_number"
    }
]

For each entry in the assetDepends, during the app/applet build process, the file linked to, from the record object's details field will be added to the runSpec.bundledDepends of the executable.

Last edited by Phil Sung, 2016-03-02 06:43:30

 Feedback