You are looking at a past revision of this page (22efa44bf4e04ce99cc097150b6ec7236a25637e). 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 object of the following form:

    { "tarballId": {"$dnanexus_link": "hidden_tarball_file_id"} }

The record can be created using the following command:

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

The record's name is used to identify the asset; see below for an example.

Example:

dx new record -o bwa --type AssetBundle --property version=0.0.1 --details '{"tarballId": {"$dnanexus_link": "file-Bq31x500kXGgQ0ZG0G5G6v84"}}' --close

An app/applet can refer to an asset bundle with runSpec.assetDepends metadata. The asset bundle can be specified in either one of the following two ways:

1.

"assetDepends": [

    {
        "id": "asset_bundle_record_id"
    }
]   

In this scenario, the record object with the given ID is found and its details metadata field is resolved to a bundledDepends.

2.

"assetDepends": [

    {
        "name": "asset_bundle_record_name",
        "project": "asset_bundle_record_project_id",
        "version": "asset_bundle_record_version_number",
        "folder": "asset_bundle_record_folder_name"
    }
]

In this scenario, a record object of type AssetBundle is searched for by the given name, project, folder and with property version, and its details field is resolved to a bundledDepends.

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