Skip to content

Bundles

Alexis Lucattini edited this page Jun 4, 2023 · 2 revisions

Main usage

Usage:
  icav2 bundles <command> <args...>

Plugin Commands:
    init                 Initialise a bundle
    list                 List bundles
    add-data             Add data to a bundle
    add-pipeline         Add pipeline to a bundle
    release              Release a bundle


Flags:
  -h, --help   help for bundles

Global Flags:
  -t, --access-token string    JWT used to call rest service
  -o, --output-format string   output format (default "table")
  -s, --server-url string      server url to direct commands
  -k, --x-api-key string       api key used to call rest service

Use "icav2 bundles [command] --help" for more information about a command.

Init

Initialise a bundle

Help

Usage:
    icav2 bundles init help
    icav2 bundles init <bundle_name>
                       (--short-description <description)
                       (--input-yaml <bundle.yaml>)
                       [--region <region_id_or_city_name>]
                       [--json]

Description:
    Initialise a bundle through a yaml file.

    The yaml file contains the following keys:
      * region: (optional)
        * A string containing either the region id or city-name
      * pipelines
        * A list of pipeline ids or codes to add to the bundle
        * Where each item in the list must contain one of the following keys
          * pipeline_id
          * pipeline_code
      * data
        * A list of data paths or ids to add to the bundle
        * Where each item in the list must contain one of the following keys
          * data_id  (accessed by the Data/ endpoint by default) (iterates through available regions to find data id)
          * data_uri (icav2://project-name-or-id/path-to-data/) (accessed from the projectdata endpoint)
      * analyses  :construction:
        * A list of analysis ids to add to the bundle
        * Where each item in the list must contain one of the following keys
          * analysis_id  (required)
          * pipeline_only (optional boolean)
          * data_only (optional boolean)
          * inputs_only (optional boolean)
          * outputs_only (optional boolean)

    The yaml file may look like the following
    region:
      id: abcdefg
    pipelines:
      - pipeline-code: abcdeg
      - pipeline-id: a1b2c3de-uuid
    data:
      - data-id: fil.12345567
      - data-id: fol.12345678
      - data-uri: icav2://playground/path-to-file/
      - data-uri: icav2://playground/path-to-folder/


Options:
  --short-description=<description>     Required, a short description for the bundle
  --region=<region_id_or_city_name>     Optional, specify a region ID or city name if user has access to multiple regions
                                        One may also specify the region id / city name in the input yaml.
  --input-yaml=<file>                   Required, path to input yaml file
  --json                                Return bundle as json object to stdout

Environment variables:
    ICAV2_BASE_URL           Optional, default set as https://ica.illumina.com/ica/rest

Example:
    icav2 bundles init my-first-bundle --short-description "My very first bundle" --input-yaml file.yaml

GIF Example

🚧

Autocompletion

Use the <tab> command to get the list of available parameters

List

List all bundles

Help

Usage:
    icav2 bundles list help
    icav2 bundles list [--bundle-name <name>]
                       [--status <status>]
                       [--creator=<creator_id_or_username>]
                       [--region <region_id_or_city_name>]

Description:
    List available bundles

Options:
  --status=<status>                     Optional, show only bundles by status (one of DRAFT, RELEASED, DEPRECATED)
  --bundle-name=<name>                  Optional, show only bundles that match a certain bundle name
  --creator=<creator_id_or_username>    Optional, show only bundles that are created by this user
  --region=<region_id_or_city_name>     Optional, show only bundles of a certain region
  --json                                Return bundle list as json list object to stdout (table by default)

Environment variables:
    ICAV2_BASE_URL           Optional, default set as https://ica.illumina.com/ica/rest

Example:
    icav2 bundles release abcdefg.12345

GIF Example

🚧

Autocompletion

N/A

Release

Use the 'release' command to set the bundle status to 'released'

Help

Usage:
    icav2 bundles release help
    icav2 bundles release <bundle_id>

Description:
    Release a bundle

Options:

Environment variables:
    ICAV2_BASE_URL           Optional, default set as https://ica.illumina.com/ica/rest

Example:
    icav2 bundles release abcdefg.12345

GIF Example

🚧

Autocompletion

N/A

Add Data

Add data to a bundle

Help

Usage:
    icav2 bundles add-data help
    icav2 bundles add-data <bundle_id>
                           (--input-yaml=<bundle.yaml> | --data-id=<data_id> | --data-uri=)

Description:
    Add data to a bundle

    The yaml file may look like the following, in this subcommand however, we only look at the 'data' key
    region:
      id: abcdefg
    pipelines:
      - pipeline-code: abcdeg
      - pipeline-id: a1b2c3de-uuid
    data:
      - data-id: fil.12345567
      - data-id: fol.12345678
      - data-uri: icav2://playground/path-to-file/
      - data-uri: icav2://playground/path-to-folder/


Options:
  --input-yaml=<file>                   Optional, path to input yaml file.
  --data-id=<data-id>                   Optional, the data id to add to the bundle
  --data-uri=<data-uri>                 Optional, the data uri to add to the bundle

Environment variables:
    ICAV2_BASE_URL           Optional, default set as https://ica.illumina.com/ica/rest

Example:
    icav2 bundles add-data-to-bundle --input-yaml path-to-input.yaml

GIF Example

🚧

Autocompletion

N/A

Add Pipeline

Usage

Usage:
    icav2 bundles add-pipeline help
    icav2 bundles add-pipeline <bundle_id>
                               (--input-yaml=<bundle.yaml> | --pipeline-id=<pipeline_id> | --pipeline-code=<pipeline_code>)

Description:
    Add a released pipeline to a bundle

    The yaml file may look like the following, in this subcommand however, we only look at the 'pipelines' key
    region:
      id: abcdefg
    pipelines:
      - pipeline-code: abcdeg
      - pipeline-id: a1b2c3de-uuid
    data:
      - data-id: fil.12345567
      - data-id: fol.12345678
      - data-uri: icav2://playground/path-to-file/
      - data-uri: icav2://playground/path-to-folder/


Options:
  --input-yaml=<file>                   Optional, path to input yaml file.
  --pipeline-id=<pipeline-id>           Optional, the pipeline id to add to the bundle
  --pipeline-code=<pipeline-code>       Optional, the pipeline code to add to the bundle

Environment variables:
    ICAV2_BASE_URL           Optional, default set as https://ica.illumina.com/ica/rest

Example:
    icav2 bundles add-pipeline-to-bundle --input-yaml path-to-input.yaml

GIF Example

🚧

Autocompletion

:greentickmark:

Release

Usage

icav2 bundles release --help
Usage:
    icav2 bundles release help
    icav2 bundles release <bundle_id>

Description:
    Release a bundle

Options:

Environment variables:
    ICAV2_BASE_URL           Optional, default set as https://ica.illumina.com/ica/rest

Example:
    icav2 bundles release abcdefg.12345

GIF Example

🚧

Autocompletion

:greentickmark:

Add Bundle to Project

Usage

icav2 bundles add-bundle-to-project --help
Usage:
    icav2 bundles add-bundle-to-project help
    icav2 bundles add-bundle-to-project <bundle_id>
                                        (--input-yaml=<bundle.yaml> | --project=<project_name_or_id>)

Description:
    Add bundle to a project. Bundle MUST be released

    The input yaml may contain one of the following attributes:
    Where the projects key is a list.
    Each list attribute may be a string or a dict containing either the project_id, project_name or project key
    projects:
      - project: <project_name_or_id>
      OR
      - <project_name_or_id>

    If you have only one project to link to, you wish to may specify the project on the commandline instead.

    In order to add a bundle to a project, you will need admin access to the project.


Options:
  --input-yaml=<file>                   Optional, path to input yaml file.
  --project=<project_name_or_id         Optional, the project to add the bundle to

Environment variables:
    ICAV2_BASE_URL           Optional, default set as https://ica.illumina.com/ica/rest

Example:
    icav2 bundles add-bundle-to-project bundle1234 --input-yaml path-to-input.yaml
    icav2 bundles add-bundle-to-project bundle1234 --project my-project

GIF Example

🚧

Autocompletion

:greentickmark: