Artifacts

Mint can extract artifacts from your task once it has finished running. These artifacts can be downloaded in the Mint UI and used in subsequent tasks.

Example

Consider a task which runs your test suite and tracks code coverage statistics. Without artifacts, you might upload those coverage results within the same task. However, with artifacts, you can extract the coverage results and use them in another task.

tasks:
  - key: run-tests
    run: ./run-my-tests.sh
    outputs:
      artifacts:
        - key: coverage
          path: tmp/coverage

  - key: upload-coverage
    after: ${{ run-tests.succeeded || run-tests.failed }}
    run: ./upload-coverage.sh $COVERAGE_DIR
    env:
      COVERAGE_DIR: ${{ tasks.run-tests.artifacts.coverage.path }}

Files

When path points to a file in your task's filesystem, Mint will produce a .tar.gz archive which contains your file at the root. For example, if path were some/path/to/file.txt, the artifact would contain file.txt at the root.

When you reference the artifact with a Mint expression to use in a subsequent task, it'll point to file.txt directly. This lets you use the artifact path as if it were a bash variable.

Directories

When path points to a directory in your task's filesystem, Mint will produce a .tar.gz archive which contains the contents of that directory at the root of the archive. For example, if path were some/path and some/path contains both hello.txt and world.txt, the artifact would contain those two files at the root.

When you reference the artifact with a Mint expression to use in a subsequent task, it'll point to directory containing those files directly. Like files, this lets you use the artifact path as if it were a bash variable.